aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-12-14 10:35:02 -0500
committerJani Nikula <jani.nikula@intel.com>2015-12-22 05:59:06 -0500
commit57a2af6bbc7a4f1b145cc216c34476402836f0b8 (patch)
tree892aefe2ba755b0a838b0f32518dffe12712b1c3 /drivers/gpu
parentef8dd37af85a8f37ca3a29074647511e52c56181 (diff)
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450107302-17171-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 1264859d648c4bdc9f0a098efbff90cbf462a075) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 69e158789365..beb0374a19f1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13801,9 +13801,6 @@ intel_commit_cursor_plane(struct drm_plane *plane,
13801 crtc = crtc ? crtc : plane->crtc; 13801 crtc = crtc ? crtc : plane->crtc;
13802 intel_crtc = to_intel_crtc(crtc); 13802 intel_crtc = to_intel_crtc(crtc);
13803 13803
13804 if (intel_crtc->cursor_bo == obj)
13805 goto update;
13806
13807 if (!obj) 13804 if (!obj)
13808 addr = 0; 13805 addr = 0;
13809 else if (!INTEL_INFO(dev)->cursor_needs_physical) 13806 else if (!INTEL_INFO(dev)->cursor_needs_physical)
@@ -13812,9 +13809,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,
13812 addr = obj->phys_handle->busaddr; 13809 addr = obj->phys_handle->busaddr;
13813 13810
13814 intel_crtc->cursor_addr = addr; 13811 intel_crtc->cursor_addr = addr;
13815 intel_crtc->cursor_bo = obj;
13816 13812
13817update:
13818 if (crtc->state->active) 13813 if (crtc->state->active)
13819 intel_crtc_update_cursor(crtc, state->visible); 13814 intel_crtc_update_cursor(crtc, state->visible);
13820} 13815}
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f2a1142bff34..0d00f07b7163 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -550,7 +550,6 @@ struct intel_crtc {
550 int adjusted_x; 550 int adjusted_x;
551 int adjusted_y; 551 int adjusted_y;
552 552
553 struct drm_i915_gem_object *cursor_bo;
554 uint32_t cursor_addr; 553 uint32_t cursor_addr;
555 uint32_t cursor_cntl; 554 uint32_t cursor_cntl;
556 uint32_t cursor_size; 555 uint32_t cursor_size;