提交 1264859d 编写于 作者: V Ville Syrjälä

drm/i915: Kill intel_crtc->cursor_bo

The vma may have been rebound between the last time the cursor was
enabled and now, so skipping the cursor gtt offset deduction is not
safe unless we would also reset cursor_bo to NULL when disabling the
cursor. Just thow cursor_bo to the bin instead since it's lost all
other uses thanks to universal plane support.

Chris pointed out that cursor updates are currently too slow
via universal planes that micro optimizations like these wouldn't
even help.

v2: Add a note about futility of micro optimizations (Chris)

Cc: drm-intel-fixes@lists.freedesktop.org
References: http://lists.freedesktop.org/archives/intel-gfx/2015-December/082976.html
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450107302-17171-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
上级 7370c68d
...@@ -14105,9 +14105,6 @@ intel_commit_cursor_plane(struct drm_plane *plane, ...@@ -14105,9 +14105,6 @@ intel_commit_cursor_plane(struct drm_plane *plane,
crtc = crtc ? crtc : plane->crtc; crtc = crtc ? crtc : plane->crtc;
intel_crtc = to_intel_crtc(crtc); intel_crtc = to_intel_crtc(crtc);
if (intel_crtc->cursor_bo == obj)
goto update;
if (!obj) if (!obj)
addr = 0; addr = 0;
else if (!INTEL_INFO(dev)->cursor_needs_physical) else if (!INTEL_INFO(dev)->cursor_needs_physical)
...@@ -14116,9 +14113,7 @@ intel_commit_cursor_plane(struct drm_plane *plane, ...@@ -14116,9 +14113,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,
addr = obj->phys_handle->busaddr; addr = obj->phys_handle->busaddr;
intel_crtc->cursor_addr = addr; intel_crtc->cursor_addr = addr;
intel_crtc->cursor_bo = obj;
update:
intel_crtc_update_cursor(crtc, state->visible); intel_crtc_update_cursor(crtc, state->visible);
} }
......
...@@ -568,7 +568,6 @@ struct intel_crtc { ...@@ -568,7 +568,6 @@ struct intel_crtc {
int adjusted_x; int adjusted_x;
int adjusted_y; int adjusted_y;
struct drm_i915_gem_object *cursor_bo;
uint32_t cursor_addr; uint32_t cursor_addr;
uint32_t cursor_cntl; uint32_t cursor_cntl;
uint32_t cursor_size; uint32_t cursor_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册