1. 04 Sep, 2013 6 commits
    • Chris Wilson's avatar
      drm/i915: Don't destroy the vma placeholder during execbuffer reservation · aaa05667
      Chris Wilson authored
      The execbuffer handle and exec_link were moved from the object into the
      vma. As the vma may be unbound and destroyed whilst attempting to
      reserve the execbuffer objects (either through a forced unbind to fix up
      a misalignment or through an evict-everything call) we need to prevent
      the free of the i915_vma itself. Otherwise not only is the list of
      objects to reserve corrupt, but we continue to reference stale vma
      entries.
      
      Fixes kernel crash with i-g-t/gem_evict_everything
      
      This regression has been introduced in
      
      commit 04038a515d6eda6dd0857c0ade0b3950d372f4c0
      Author:     Ben Widawsky <ben@bwidawsk.net>
      AuthorDate: Wed Aug 14 11:38:36 2013 +0200
      
          drm/i915: Convert execbuf code to use vmas
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      References: http://www.spinics.net/lists/intel-gfx/msg32038.html
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68298Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      aaa05667
    • Daniel Vetter's avatar
      drm/i915: inline vma_create into lookup_or_create_vma · e656a6cb
      Daniel Vetter authored
      In the execbuf code we don't clean up any vmas which ended up not
      getting bound for code simplicity. To make sure that we don't end up
      creating multiple vma for the same vm kill the somewhat dangerous
      vma_create function and inline it into lookup_or_create.
      
      This is just a safety measure to prevent surprises in the future.
      
      Also update the somewhat confused comment in the execbuf code and
      clarify what kind of magic is going on with a new one.
      
      v2: Keep the function separate as requested by Chris. But give it a __
      prefix for paranoia and move it tighter together with the other vma
      stuff.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e656a6cb
    • Ben Widawsky's avatar
      drm/i915: Convert execbuf code to use vmas · 27173f1f
      Ben Widawsky authored
      In order to transition more of our code over to using a VMA instead of
      an <OBJ, VM> pair - we must have the vma accessible at execbuf time. Up
      until now, we've only had a VMA when actually binding an object.
      
      The previous patch helped handle the distinction on bound vs. unbound.
      This patch will help us catch leaks, and other issues before we actually
      shuffle a bunch of stuff around.
      
      This attempts to convert all the execbuf code to speak in vmas. Since
      the execbuf code is very self contained it was a nice isolated
      conversion.
      
      The meat of the code is about turning eb_objects into eb_vma, and then
      wiring up the rest of the code to use vmas instead of obj, vm pairs.
      
      Unfortunately, to do this, we must move the exec_list link from the obj
      structure. This list is reused in the eviction code, so we must also
      modify the eviction code to make this work.
      
      WARNING: This patch makes an already hotly profiled path slower. The cost is
      unavoidable. In reply to this mail, I will attach the extra data.
      
      v2: Release table lock early, and two a 2 phase vma lookup to avoid
      having to use a GFP_ATOMIC. (Chris)
      
      v3: s/obj_exec_list/obj_exec_link/
      Updates to address
      commit 6d2b8885
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Wed Aug 7 18:30:54 2013 +0100
      
          drm/i915: List objects allocated from stolen memory in debugfs
      
      v4: Use obj = vma->obj for neatness in some places (Chris)
      need_reloc_mappable() should return false if ppgtt (Chris)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      [danvet: Split out prep patches. Also remove a FIXME comment which is
      now taken care of.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      27173f1f
    • Daniel Vetter's avatar
      drm/i915: fix i9xx_crtc_clock_get for multiplied pixels · a2dc53e7
      Daniel Vetter authored
      The dpll actually runs at the port clock so we don't need
      to multiply it again with the pixel multiplier to get the
      adjusted_mode.clock. This is in contrast to the ironlake
      pixel clock readout code which uses the fdi dotclock: That
      one does _not_ run with multiplied pixels.
      
      This issue goes back to the original clock readout code added
      in
      
      commit f1f644dc
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Thu Jun 27 00:39:25 2013 +0300
      
          drm/i915: get mode clock when reading the pipe config v9
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a2dc53e7
    • Daniel Vetter's avatar
      drm/i915: handle sdvo input pixel multiplier correctly again · eeb47937
      Daniel Vetter authored
      The sdvo input timing needs to be the actual mode, the sdvo
      encoder automatically adjusts for the need of pixel doubling or
      quadrupling. This was lost in pipe config conversion of the
      pixel multiplier in
      
      commit 6cc5f341
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed Mar 27 00:44:53 2013 +0100
      
          drm/i915: add pipe_config->pixel_multiplier
      
      While at it ditch the intel_ prefix from the crtc in
      intel_sdvo_mode_set.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      eeb47937
    • Daniel Vetter's avatar
      drm/i915: fix hpd work vs. flush_work in the pageflip code deadlock · 645416f5
      Daniel Vetter authored
      Historically we've run our own driver hotplug handling in our own
      work-queue, which then launched the drm core hotplug handling in the
      system workqueue. This is important since we flush our own driver
      workqueue in the pageflip code while hodling modeset locks, and only
      the drm hotplug code grabbed these locks. But with
      
      commit 69787f7d
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Oct 23 18:23:34 2012 +0000
      
          drm: run the hpd irq event code directly
      
      this was changed and now we could deadlock in our flip handler if
      there's a hotplug work blocking the progress of the crucial unpin
      works. So this broke the careful deadlock avoidance implemented in
      
      commit b4a98e57
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Nov 1 09:26:26 2012 +0000
      
          drm/i915: Flush outstanding unpin tasks before pageflipping
      
      Since the rule thus far has been that work items on our own workqueue
      may never grab modeset locks simply restore that rule again.
      
      v2: Add a comment to the declaration of dev_priv->wq to warn readers
      about the tricky implications of using it. Suggested by Chris Wilson.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Stuart Abercrombie <sabercrombie@chromium.org>
      Reported-by: default avatarStuart Abercrombie <sabercrombie@chromium.org>
      References: http://permalink.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/26239
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Squash in a comment at the place where we schedule the work.
      Requested after-the-fact by Chris on irc since the hpd work isn't the
      only place we botch this.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      645416f5
  2. 03 Sep, 2013 20 commits
  3. 02 Sep, 2013 6 commits
  4. 01 Sep, 2013 3 commits
    • Dave Airlie's avatar
      drm/nouveau: fix up 32-bit ioctls and device wake up. · 2254f637
      Dave Airlie authored
      Noticed by kbuild test robot.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      2254f637
    • Dave Airlie's avatar
      drm/tegra: fix up page flip flags. · a5b6f74e
      Dave Airlie authored
      This was one level away from where I'd grepped.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a5b6f74e
    • Dave Airlie's avatar
      Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux into drm-next · 9c725e5b
      Dave Airlie authored
      Alex writes:
      This is the radeon drm-next request.  Big changes include:
      - support for dpm on CIK parts
      - support for ASPM on CIK parts
      - support for berlin GPUs
      - major ring handling cleanup
      - remove the old 3D blit code for bo moves in favor of CP DMA or sDMA
      - lots of bug fixes
      
      [airlied: fix up a bunch of conflicts from drm_order removal]
      
      * 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux: (898 commits)
        drm/radeon/dpm: make sure dc performance level limits are valid (CI)
        drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)
        drm/radeon: gcc fixes for extended dpm tables
        drm/radeon: gcc fixes for kb/kv dpm
        drm/radeon: gcc fixes for ci dpm
        drm/radeon: gcc fixes for si dpm
        drm/radeon: gcc fixes for ni dpm
        drm/radeon: gcc fixes for trinity dpm
        drm/radeon: gcc fixes for sumo dpm
        drm/radeonn: gcc fixes for rv7xx/eg/btc dpm
        drm/radeon: gcc fixes for rv6xx dpm
        drm/radeon: gcc fixes for radeon_atombios.c
        drm/radeon: enable UVD interrupts on CIK
        drm/radeon: fix init ordering for r600+
        drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled
        drm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init
        drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume
        radeon kms: fix uninitialised hotplug work usage in r100_irq_process()
        drm/radeon/audio: set up the sads on DCE3.2 asics
        drm/radeon: fix handling of variable sized arrays for router objects
        ...
      
      Conflicts:
      	drivers/gpu/drm/i915/i915_dma.c
      	drivers/gpu/drm/i915/i915_gem_dmabuf.c
      	drivers/gpu/drm/i915/intel_pm.c
      	drivers/gpu/drm/radeon/cik.c
      	drivers/gpu/drm/radeon/ni.c
      	drivers/gpu/drm/radeon/r600.c
      9c725e5b
  5. 30 Aug, 2013 5 commits