1. 05 Mar, 2014 2 commits
    • Ben Widawsky's avatar
      Revert "drm/i915/bdw: Limit GTT to 2GB" · 7907f45b
      Ben Widawsky authored
      This reverts commit 3a2ffb65.
      
      Now that the code is fixed to use smaller allocations, it should be safe
      to let the full GGTT be used on BDW.
      
      The testcase for this is anything which uses more than half of the GTT,
      thus eclipsing the old limit.
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7907f45b
    • Ben Widawsky's avatar
      drm/i915/bdw: Reorganize PT allocations · 7ad47cf2
      Ben Widawsky authored
      The previous allocation mechanism would get 2 contiguous allocations,
      one for the page directories, and one for the page tables. As each page
      table is 1 page, and there are 512 of these per page directory, this
      goes to 2MB. An unfriendly request at best. Worse still, our HW now
      supports 4 page directories, and a 2MB allocation is not allowed.
      
      In order to fix this, this patch attempts to split up each page table
      allocation into a single, discrete allocation. There is nothing really
      fancy about the patch itself, it just has to manage an extra pointer
      indirection, and have a fancier bit of logic to free up the pages.
      
      To accommodate some of the added complexity, two new helpers are
      introduced to allocate, and free the page table pages.
      
      NOTE: I really wanted to split the way we do allocations, and the way in
      which we identify the page table/page directory being used. I found
      splitting this functionality up to be too unwieldy. I apologize in
      advance to the reviewer. I'd recommend looking at the result, rather
      than the diff.
      
      v2/NOTE2: This patch predated commit:
      6f1cc993
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Dec 31 15:50:31 2013 +0000
      
          drm/i915: Avoid dereference past end of page arr
      
      It fixed the same issue as that patch, but because of the limbo state of
      PPGTT, Chris patch was merged instead. The excess churn is a result of
      my using my original patch, which has my preferred naming. Primarily
      act_* is changed to which_*, but it's mostly the same otherwise. I've
      kept the convention Chris used for the pte wrap (I had something
      slightly different, and broken - but fixable)
      
      v3: Rename which_p[..]e to drop which_ (Chris)
      Remove BUG_ON in inner loop (Chris)
      Redo the pde/pdpe wrap logic (Chris)
      
      v4: s/1MB/2MB in commit message (Imre)
      Plug leaking gen8_pt_pages in both the error path, as well as general
      free case (Imre)
      
      v5: Rename leftover "which_" variables (Imre)
      Add the pde = 0 wrap that was missed from v3 (Imre)
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Squash in fixup from Ben.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7ad47cf2
  2. 04 Mar, 2014 15 commits
  3. 02 Mar, 2014 1 commit
    • Daniel Vetter's avatar
      drm/i915: sprinkle static · b5ea642a
      Daniel Vetter authored
      Apparently we've missed a few more than what Fengguang's 0-day tester
      recently reported in i915_irq.c ... Makes sparse happy again (ignore
      some spurious stuff about ksyms of exported functions).
      
      Cc: kbuild test robot <fengguang.wu@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b5ea642a
  4. 14 Feb, 2014 17 commits
  5. 13 Feb, 2014 5 commits
    • Paulo Zanoni's avatar
      drm/i915: don't reference null pointer at i915_sink_crc · b6ae3c7c
      Paulo Zanoni authored
      Reproducible by runtime suspending a Haswell machine with eDP + HDMI
      outputs connected.
      
      [  209.600086] [drm:i915_runtime_suspend], Suspending device
      [  209.688435] BUG: unable to handle kernel NULL pointer dereference at 0000000000000060
      [  209.688500] IP: [<ffffffffa0109d4e>] i915_sink_crc+0x6e/0xf0 [i915]
      [  209.688577] PGD 36aba067 PUD 35d7f067 PMD 0
      [  209.688613] Oops: 0000 [#1] SMP
      [  209.688641] Modules linked in: fuse ip6table_filter ip6_tables ebtable_nat ebtables iTCO_wdt iTCO_vendor_support x86_pkg_temp_thermal coretemp microcode serio_raw e1000e pcspkr i2c_i801 ptp mei_me mei lpc_ich mfd_core pps_core dm_crypt i915 i2c_algo_bit crc32_pclmul drm_kms_helper crc32c_intel drm ghash_clmulni_intel video
      [  209.688893] CPU: 1 PID: 1797 Comm: pm_pc8 Not tainted 3.13.0+ #118
      [  209.688937] Hardware name: Intel Corporation Shark Bay Client platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0133.R00.1309172123 09/17/2013
      [  209.689023] task: ffff88007fb4b690 ti: ffff88007d9d2000 task.ti: ffff88007d9d2000
      [  209.689074] RIP: 0010:[<ffffffffa0109d4e>]  [<ffffffffa0109d4e>] i915_sink_crc+0x6e/0xf0 [i915]
      [  209.689169] RSP: 0018:ffff88007d9d3e68  EFLAGS: 00010246
      [  209.689205] RAX: 0000000000000000 RBX: ffff880036a03478 RCX: ffff8800366c9770
      [  209.689252] RDX: ffff88014325cf38 RSI: ffff88007fb4bd08 RDI: ffff88007fb4b690
      [  209.689299] RBP: ffff88007d9d3e98 R08: 0000000000000000 R09: 0000000000000000
      [  209.689346] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8800366c9148
      [  209.689393] R13: 00000000ffffffed R14: ffff88007d9d3f50 R15: ffff880036a03478
      [  209.689441] FS:  00007f5a74bc29c0(0000) GS:ffff88014f240000(0000) knlGS:0000000000000000
      [  209.689494] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  209.689533] CR2: 0000000000000060 CR3: 0000000079d7e000 CR4: 00000000001407e0
      [  209.689580] Stack:
      [  209.689594]  0000000000001000 ffff880146083980 ffff880146083980 0000000000000000
      [  209.689649]  ffff880146083980 0000000000000001 ffff88007d9d3f00 ffffffff811d0744
      [  209.689702]  0000000000000046 00007fff7949fe20 ffff880036a034b8 0000000000000080
      [  209.689756] Call Trace:
      [  209.689778]  [<ffffffff811d0744>] seq_read+0x164/0x3e0
      [  209.689816]  [<ffffffff811ab165>] vfs_read+0x95/0x160
      [  209.689851]  [<ffffffff811abc79>] SyS_read+0x49/0xa0
      [  209.689888]  [<ffffffff810ef64c>] ? __audit_syscall_entry+0x9c/0xf0
      [  209.689933]  [<ffffffff81659412>] system_call_fastpath+0x16/0x1b
      
      Testcase: igt/pm_pc8 (do a full run, it will fail at the debugfs-read subtest)
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Flip around NULL check for robustness.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b6ae3c7c
    • Damien Lespiau's avatar
      drm/i915/lvds: Remove dead code from failing case · 7fb4a3a3
      Damien Lespiau authored
      Coverity points out that, if we end up in the 'failed' label, that's
      precisely because we couldn't retrieve a fixed mode (ie fixed_mode is
      NULL) and then "if (fixed_mode)" is always false.
      
      Remove that dead code.
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7fb4a3a3
    • Jesse Barnes's avatar
      drm/i915: don't preserve inherited configs with nothing on v2 · 02f5eebb
      Jesse Barnes authored
      It can be corrected later and may be what was actually desired, but
      generally isn't, so if we find nothing is enabled, let the core DRM fb
      helper figure something out.
      
      v2: free the array too (Jesse)
      
      Note that this also undoes any changes in case we bail out due to hw
      cloning.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      02f5eebb
    • Ben Widawsky's avatar
      drm/i915/bdw: Split up PPGTT cleanup · b45a6715
      Ben Widawsky authored
      This will make the code more readable, and extensible which is needed
      for upcoming feature work. Eventually, we'll do the same for init.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b45a6715
    • Ville Syrjälä's avatar
      drm/i915: Convert DIP port switch cases to a simple macro · 822cdc52
      Ville Syrjälä authored
      We have a couple of switch cases to compute the port value for the
      VIDEO_DIP_CTL register. Replace them with a simple macro.
      
      We do lose a few BUG() calls, but many people may consider that
      an improvement.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      822cdc52