1. 23 9月, 2009 4 次提交
  2. 19 9月, 2009 2 次提交
  3. 18 9月, 2009 9 次提交
  4. 12 9月, 2009 2 次提交
    • C
      drm/i915: Only destroy a constructed mmap offset · 7e616158
      Chris Wilson 提交于
      drm_ht_remove_item() does not handle removing an absent item and the hlist
      in particular is incorrectly initialised. The easy remedy is simply skip
      calling i915_gem_free_mmap_offset() unless we have actually created the
      offset and associated ht entry.
      
      This also fixes the mishandling of a partially constructed offset which
      leaves pointers initialized after freeing them along the
      i915_gem_create_mmap_offset() error paths.
      
      In particular this should fix the oops found here:
      https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/415357/comments/8Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Cc: stable@kernel.org
      7e616158
    • E
      agp/intel: Fix the pre-9xx chipset flush. · e517a5e9
      Eric Anholt 提交于
      Ever since we enabled GEM, the pre-9xx chipsets (particularly 865) have had
      serious stability issues.  Back in May a wbinvd was added to the DRM to
      work around much of the problem.  Some failure remained -- easily visible
      by dragging a window around on an X -retro desktop, or by looking at bugzilla.
      
      The chipset flush was on the right track -- hitting the right amount of
      memory, and it appears to be the only way to flush on these chipsets, but the
      flush page was mapped uncached.  As a result, the writes trying to clear the
      writeback cache ended up bypassing the cache, and not flushing anything!  The
      wbinvd would flush out other writeback data and often cause the data we wanted
      to get flushed, but not always.  By removing the setting of the page to UC
      and instead just clflushing the data we write to try to flush it, we get the
      desired behavior with no wbinvd.
      
      This exports clflush_cache_range(), which was laying around and happened to
      basically match the code I was otherwise going to copy from the DRM.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Signed-off-by: NBrice Goglin <Brice.Goglin@ens-lyon.org>
      Cc: stable@kernel.org
      e517a5e9
  5. 10 9月, 2009 1 次提交
  6. 07 9月, 2009 1 次提交
    • C
      drm/i915: Pad ringbuffer with NOOPs before wrapping · 0ef82af7
      Chris Wilson 提交于
      According to the docs, the ringbuffer is not allowed to wrap in the middle
      of an instruction.
      
      G45 PRM, Vol 1b, p101:
        While the “free space” wrap may allow commands to be wrapped around the
        end of the Ring Buffer, the wrap should only occur between commands.
        Padding (with NOP) may be required to follow this restriction.
      
      Do as commanded.
      
      [Having seen bug reports where there is evidence of split commands, but
      apparently the GPU has continued on merrily before a bizarre and untimely
      death, this may or may not fix a few random hangs.]
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      CC: Eric Anholt <eric@anholt.net>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      0ef82af7
  7. 05 9月, 2009 1 次提交
    • J
      drm/i915: add dynamic clock frequency control · 652c393a
      Jesse Barnes 提交于
      There are several sources of unnecessary power consumption on Intel
      graphics systems. The first is the LVDS clock. TFTs don't suffer from
      persistence issues like CRTs, and so we can reduce the LVDS refresh rate
      when the screen is idle. It will be automatically upclocked when
      userspace triggers graphical activity. Beyond that, we can enable memory
      self refresh. This allows the memory to go into a lower power state when
      the graphics are idle. Finally, we can drop some clocks on the gpu
      itself. All of these things can be reenabled between frames when GPU
      activity is triggered, and so there should be no user visible graphical
      changes.
      Signed-off-by: NJesse Barnes <jesse.barnes@intel.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      652c393a
  8. 03 9月, 2009 1 次提交
  9. 30 8月, 2009 1 次提交
  10. 27 8月, 2009 1 次提交
  11. 06 8月, 2009 1 次提交
  12. 11 7月, 2009 2 次提交
  13. 24 6月, 2009 1 次提交
  14. 23 6月, 2009 1 次提交
  15. 19 6月, 2009 3 次提交
  16. 18 6月, 2009 1 次提交
  17. 10 6月, 2009 6 次提交
    • C
      drm/i915: NOMEM->NOSPC · 2939e1f5
      Chris Wilson 提交于
      To differentiate between encountering an out-of-memory error with running
      out of space in the aperture, use ENOSPC for the later.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      2939e1f5
    • C
      drm/i915: use I915_GEM_GPU_DOMAINS · 21d509e3
      Chris Wilson 提交于
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      21d509e3
    • C
      b1ce786c
    • C
      drm/i915: OR in the COMMAND read domain for the batch buffer. · 5f26a2c7
      Chris Wilson 提交于
      The batch buffer may be shared with another read buffer, so we should not
      ignore any previously set domains, but just or in the command domain (and
      check that the buffer is not writable).
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      5f26a2c7
    • C
      drm/i915: Sanity check execbuffer arguments before touching state. · 83d60795
      Chris Wilson 提交于
      By sending a broken execbuffer (its length was not suitably aligned) I
      triggered an operation upon a freed object. The invalid alignment was
      discovered after updating the write_domain on the object but before the
      object was placed on the active queue. So during the unwind process
      following the error, the now freed object attempts to flush its
      non-existent, but outstanding, GPU writes causing this use-after-free.
      
      [drm:i915_dispatch_gem_execbuffer] *ERROR* alignment
      [drm:i915_gem_execbuffer] *ERROR* dispatch failed -22
      WARNING: at lib/kref.c:43 warn_slowpath_null+0x10/0x15()
      Modules linked in:
      Pid: 4552, comm: lt-csi-drm Not tainted 2.6.30-rc6 #423
      Call Trace:
       [<c0119ef3>] warn_slowpath_fmt+0x57/0x6d
       [<c014de24>] ? get_pageblock_migratetype+0x18/0x1e
       [<c014e8fd>] ? free_hot_page+0xa/0xc
       [<c014e915>] ? __free_pages+0x16/0x1f
       [<c0153ebf>] ? shmem_truncate_range+0x63e/0x656
       [<c015fb2f>] ? slob_page_alloc+0x146/0x1c8
       [<c0119f19>] warn_slowpath_null+0x10/0x15
       [<c01f55f2>] kref_get+0x1b/0x21
       [<c02605db>] i915_gem_object_move_to_active+0x1f/0x56
       [<c0261302>] i915_add_request+0x156/0x19a
       [<c026136e>] i915_gem_object_flush_gpu_write_domain+0x28/0x3f
       [<c0261eca>] i915_gem_object_unbind+0x4a/0x124
       [<c0261fd7>] i915_gem_free_object+0x33/0x9b
       [<c0250d6b>] drm_gem_object_free+0x28/0x4a
       [<c0250d43>] ? drm_gem_object_free+0x0/0x4a
       [<c01f55ce>] kref_put+0x38/0x41
       [<c0250cbf>] drm_gem_object_unreference+0x11/0x13
       [<c0250d06>] drm_gem_object_handle_unreference+0x1e/0x21
       [<c0250d13>] drm_gem_object_release_handle+0xa/0xe
       [<c01f3e6b>] idr_for_each+0x5f/0x98
       [<c0250d09>] ? drm_gem_object_release_handle+0x0/0xe
       [<c0250daf>] drm_gem_release+0x22/0x34
       [<c025046f>] drm_release+0x1e8/0x3c4
       [<c0162d25>] __fput+0xaf/0x146
       [<c0162dce>] fput+0x12/0x14
       [<c01605ef>] filp_close+0x48/0x52
       [<c011b182>] put_files_struct+0x57/0x9b
       [<c011b1e4>] exit_files+0x1e/0x20
       [<c011c6b6>] do_exit+0x16d/0x511
       [<c03704ab>] ? __schedule+0x3d4/0x3e5
       [<c0103f0d>] ? handle_irq+0xd/0x69
       [<c011caa7>] do_group_exit+0x4d/0x73
       [<c011cae0>] sys_exit_group+0x13/0x17
       [<c010268c>] sysenter_do_call+0x12/0x2b
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      83d60795
    • Z
      drm/i915: handle interrupt on new chipset · 036a4a7d
      Zhenyu Wang 提交于
      Update interrupt handling methods for IGDNG with new registers
      for display and graphics interrupt functions. As we won't use
      irq-based vblank sync in dri2, so display interrupt on new chip
      will be used for hotplug only in future.
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      036a4a7d
  18. 04 6月, 2009 2 次提交
    • E
      drm/i915: Change GEM throttling to be 20ms like the comment says. · b962442e
      Eric Anholt 提交于
      keithp didn't like the original 20ms plan because a cooperative client could
      be starved by an uncooperative client.  There may even have been problems
      with cooperative clients versus cooperative clients.  So keithp changed
      throttle to just wait for the second to last seqno emitted by that client.
      It worked well, until we started getting more round-trips to the server
      due to DRI2 -- the server throttles in BlockHandler, and so if you did more
      than one round trip after finishing your frame, you'd end up unintentionally
      syncing to the swap.
      
      Fix this by keeping track of the client's requests, so the client can wait
      when it has an outstanding request over 20ms old.  This should have
      non-starving behavior, good behavior in the presence of restarts, and less
      waiting.  Improves high-settings openarena performance on my GM45 by 50%.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b962442e
    • E
      drm/i915: Remove a bad BUG_ON in the fence management code. · 0e7ddf7e
      Eric Anholt 提交于
      This could be triggered by a gtt mapping fault on 965 that decides to
      remove the fence from another object that happens to be active currently.
      Since the other object doesn't rely on the fence reg for its execution, we
      don't wait for it to finish.  We'll soon be not waiting on 915 most of the
      time as well, so just drop the BUG_ON.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      0e7ddf7e