1. 22 Jan, 2014 9 commits
    • Imre Deak's avatar
      drm/i915: g4x/vlv: fix dp aux interrupt mask · bfbdb420
      Imre Deak authored
      Fix typo possibly leading to timed out DP aux transactions on ports C,D.
      
      Introduced in:
      
      Commmit 4aeebd74
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Oct 31 09:53:36 2013 +0100
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72210
      Signed off-by: Imre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      bfbdb420
    • Ben Widawsky's avatar
      drm/i915/ppgtt: Defer request freeing on reset · 1d62beea
      Ben Widawsky authored
      We need to defer the free request until the object/vma is capable of
      being freed - or else we have a problem  when we try to destroy the
      context.
      
      The exact same issue is described and fixed here:
      commit e2078043
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Dec 6 14:11:22 2013 -0800
      
          drm/i915: Defer request freeing
      
      I had this fix previously, but decided not to keep it for some reason I
      can no longer remember.
      
      gem_reset_stats is a really good test at hitting the problem.
      
      For the inquisitive:
      [  170.516392] ------------[ cut here ]------------
      [  170.517227] WARNING: CPU: 1 PID: 105 at drivers/gpu/drm/drm_mm.c:578 drm_mm_takedown+0x2e/0x30 [drm]()
      [  170.518064] Memory manager not clean during takedown.
      [  170.518941] CPU: 1 PID: 105 Comm: kworker/1:1 Not tainted 3.13.0-rc4-BEN+ #28
      [  170.519787] Hardware name: Hewlett-Packard HP EliteBook 8470p/179B, BIOS 68ICF Ver. F.02 04/27/2012
      [  170.520662] Call Trace:
      [  170.521517]  [<ffffffff814f0589>] dump_stack+0x4e/0x7a
      [  170.522373]  [<ffffffff81049e6d>] warn_slowpath_common+0x7d/0xa0
      [  170.523227]  [<ffffffff81049edc>] warn_slowpath_fmt+0x4c/0x50
      [  170.524079]  [<ffffffffa06c414e>] drm_mm_takedown+0x2e/0x30 [drm]
      [  170.524934]  [<ffffffffa07213f3>] gen6_ppgtt_cleanup+0x23/0x110
      [i915]
      [  170.525777]  [<ffffffffa07837ed>] ppgtt_release.part.5+0x24/0x29
      [i915]
      [  170.526603]  [<ffffffffa071aaa5>] i915_gem_context_free+0x195/0x1a0
      [i915]
      [  170.527423]  [<ffffffffa071189d>] i915_gem_free_request+0x9d/0xb0
      [i915]
      [  170.528247]  [<ffffffffa0718af9>] i915_gem_reset+0x1f9/0x3f0 [i915]
      [  170.529065]  [<ffffffffa0700cce>] i915_reset+0x4e/0x180 [i915]
      [  170.529870]  [<ffffffffa070829d>] i915_error_work_func+0xcd/0x120
      [i915]
      [  170.530666]  [<ffffffff8106c13a>] process_one_work+0x1fa/0x6d0
      [  170.531453]  [<ffffffff8106c0d8>] ? process_one_work+0x198/0x6d0
      [  170.532230]  [<ffffffff8106c72b>] worker_thread+0x11b/0x3a0
      [  170.532996]  [<ffffffff8106c610>] ? process_one_work+0x6d0/0x6d0
      [  170.533771]  [<ffffffff810743ef>] kthread+0xff/0x120
      [  170.534548]  [<ffffffff810742f0>] ? insert_kthread_work+0x80/0x80
      [  170.535322]  [<ffffffff814f97ac>] ret_from_fork+0x7c/0xb0
      [  170.536089]  [<ffffffff810742f0>] ? insert_kthread_work+0x80/0x80
      [  170.536847] ---[ end trace 3d4c12892e42d58f ]---
      
      v2: Whitespace fix. (Chris)
      
      Note: This is a bug that only hits the ppgtt topic branch but I've
      figured that doing the request cleanup in this order is generally the
      right thing to do.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Add a code comment to clarify what's actually going on since
      the lifetime rules aroung ppgtt cleanup are ... fuzzy a best atm. Also
      add a note about why we need this.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1d62beea
    • Kristen Carlson Accardi's avatar
      i915: send D1 opregion notification · 1fb2362b
      Kristen Carlson Accardi authored
      The opregion notification for runtime suspend is currently D1, not D3.
      Signed-off-by: default avatarKristen Carlson Accardi <kristen@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      1fb2362b
    • Jesse Barnes's avatar
      drm/i915/bdw: remove preliminary_hw_support flag from BDW · babb1903
      Jesse Barnes authored
      It ought to work ok in 3.14.  We have some fun stuff coming after that,
      but all the basics are in place now and seem relatively stable.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Acked by: Ben Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      babb1903
    • Daniel Vetter's avatar
      drm/i915: Tune down reset_stat output from ERROR to debug · 86648500
      Daniel Vetter authored
      This is user-triggerable and hence we should not allow it to spam
      dmesg. Also, it upsets the nice dmesg tracking piglit does.
      
      Note that this is just extra debugging information, mostly
      unwanted, in case of a hang and that there is a separate message to the
      user giving instructions on how to report a bug for a GPU hang.
      
      v2: Add note as suggests in Chris' reply.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72740
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      86648500
    • Ben Widawsky's avatar
      drm/i915: Make semaphore modparam RO · fae0ce15
      Ben Widawsky authored
      A couple patches in the upcoming rework of semaphores will break if
      semaphores are toggled by the user at various times. Since the code
      cleanups there seem to be an overall win, and toggling semaphores at
      runtime is not a terribly useful thing to do, simply make the module
      parameter read-only.
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      fae0ce15
    • Ben Widawsky's avatar
      drm/i915: Fix disabled semaphores · f0a9f74c
      Ben Widawsky authored
      The ring will emit too many if semaphores are disabled since we do not
      add the correct number to num_dwords anymore.
      
      This was introduced:
      commit 52ed2325
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Mon Dec 16 20:50:38 2013 -0800
      
          drm/i915: Don't emit mbox updates without semaphores
      
      FWIW, the bug was fixed later in the series.
      
      /me hangs head in shame.
      
      Daniel: Also note that we should have merged the read-only semaphore
      modparam before this patch.
      Reported-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f0a9f74c
    • Ben Widawsky's avatar
      drm/i915: Clarify relocation errnos · 8b78f0e5
      Ben Widawsky authored
      While trying to find a random -EINVAL from a failing test, I noticed we
      had a few hard to follow return values.
      
      The first two hunks in this patch replace completely useless
      initialization of ret. The last several hunks help to distinguish
      between altering 'return ret' and 'return <ERROR>'
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      8b78f0e5
    • Geert Uytterhoeven's avatar
  2. 21 Jan, 2014 6 commits
    • Dave Airlie's avatar
      Merge branch 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux into drm-next · f5395ba3
      Dave Airlie authored
      Here's the vblank timestamp pull request you wanted.
      
      I addressed the few bugs that Mario pointed out and added
      the r-bs.
      
      As it has been a while since I made the changes, I gave it a
      quick spin on a few different i915 machines. Fortunately
      everything still seems to be fine.
      
      * 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux:
        drm/i915: Add a kludge for DSL incrementing too late and ISR not working
        drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos()
        drm: Pass 'flags' from the caller to .get_scanout_position()
        drm: Fix vblank timestamping constants for interlaced modes
        drm/i915: Fix scanoutpos calculations for interlaced modes
        drm: Change {pixel,line,frame}dur_ns from s64 to int
        drm: Use crtc_clock in drm_calc_timestamping_constants()
        drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings()
        drm: Simplify the math in drm_calc_timestamping_constants()
        drm: Improve drm_calc_timestamping_constants() documentation
        drm/i915: Call drm_calc_timestamping_constants() earlier
        drm/i915: Kill hwmode save/restore
        drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos()
        drm: Pass the display mode to drm_calc_timestamping_constants()
      f5395ba3
    • Dave Airlie's avatar
      Merge branch 'topic/core-stuff' of git://people.freedesktop.org/~danvet/drm-intel into drm-next · 2b76a676
      Dave Airlie authored
      Some straggling drm core patches
      
      * 'topic/core-stuff' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/gem: Always initialize the gem object in object_init
        drm/edid: Populate picture aspect ratio for CEA modes
        drm/edid: parse the list of additional 3D modes
        drm/edid: split VIC display mode lookup into a separate function
        drm: Make the connector mode_valid() vfunc return a drm_mode_status enum
      2b76a676
    • Dave Airlie's avatar
      Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next · aec476a6
      Dave Airlie authored
      Just a single fix for sparse/smatch warnings introduced by the previous
      vmwgfx-next pull.
      
      * 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux:
        drm/vmwgfx: Fix recently introduced sparse / smatch warnings and errors
      aec476a6
    • Thomas Hellstrom's avatar
    • Daniel Vetter's avatar
      drm/gem: Always initialize the gem object in object_init · 6ab11a26
      Daniel Vetter authored
      At least drm/i915 expects that the obj->dev pointer is set even in
      failure paths. Specifically when the shmem initialization fails we
      call i915_gem_object_free which needs to deref obj->base.dev to get at
      the slab pointer in the device private structure. And the shmem
      allocation can easily fail when userspace is hitting open file limits.
      
      Doing the structure init even when the shmem file allocation fails
      prevents this Oops.
      
      This is a regression from
      
      commit 89c8233f
      Author: David Herrmann <dh.herrmann@gmail.com>
      Date:   Thu Jul 11 11:56:32 2013 +0200
      
          drm/gem: simplify object initialization
      
      v2: Add regression note which Chris supplied.
      
      Testcase: igt/gem_fd_exhaustion
      Reported-and-Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      References: http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6ab11a26
    • Dave Airlie's avatar
      Merge branch 'drm-next-3.14' of git://people.freedesktop.org/~agd5f/linux into drm-next · 8c9b2e32
      Dave Airlie authored
      New tree with the INFO ioctl merge fixed up.  This also adds a couple
      of additional minor fixes.
      
      A few more changes for 3.14, mostly just bug fixes.  Note that:
      drm/radeon: add query to fetch the max engine clock.
      will conflict with 3.13 final, but the fix is pretty obvious.
      
      * 'drm-next-3.14' of git://people.freedesktop.org/~agd5f/linux: (22 commits)
        drm/radeon: add UVD support for OLAND
        drm/radeon: fix minor typos in si_dpm.c
        drm/radeon: set the full cache bit for fences on r7xx+
        drm/radeon: fix surface sync in fence on cayman (v2)
        drm/radeon/dpm: disable mclk switching on desktop RV770
        drm/radeon: fix endian handling in radeon_atom_init_mc_reg_table
        drm/radeon: write gfx pg bases even when gfx pg is disabled
        drm/radeon: bail early from enable ss in certain cases
        drm/radeon: handle ss percentage divider properly
        drm/radeon: add query to fetch the max engine clock (v2)
        drm/radeon/dp: sleep after powering up the display
        drm/radeon/dp: use usleep_range rather than udelay
        drm/radeon/dp: bump i2c-over-aux retries to 7
        drm/radeon: disable ss on DP for DCE3.x
        drm/radeon/cik: use hw defaults for TC_CFG registers
        drm/radeon: disable dpm on BTC
        drm/radeon/cik: use WAIT_REG_MEM special op for CP HDP flush
        drm/radeon/cik: use POLL_REG_MEM special op for sDMA HDP flush
        drm/radeon: consolidate sdma hdp flushing code for CIK
        drm/radeon: consolidate cp hdp flushing code for CIK
        ...
      8c9b2e32
  3. 20 Jan, 2014 25 commits