diff mbox

[1/2] drm/i915: Kill intel_crtc->cursor_bo

Message ID 1450091808-32607-2-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala Dec. 14, 2015, 11:16 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

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>
---
 drivers/gpu/drm/i915/intel_display.c | 5 -----
 drivers/gpu/drm/i915/intel_drv.h     | 1 -
 2 files changed, 6 deletions(-)

Comments

Chris Wilson Dec. 14, 2015, 11:32 a.m. UTC | #1
On Mon, Dec 14, 2015 at 01:16:47PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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.

You could also mention that since updating the cursor is so slow now
through the universal-plane support, that a fast path to avoid a few
writes/checks is also irrelevant.
-Chris
Ville Syrjala Dec. 14, 2015, 3:30 p.m. UTC | #2
On Mon, Dec 14, 2015 at 11:32:23AM +0000, Chris Wilson wrote:
> On Mon, Dec 14, 2015 at 01:16:47PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > 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.
> 
> You could also mention that since updating the cursor is so slow now
> through the universal-plane support, that a fast path to avoid a few
> writes/checks is also irrelevant.

I can add a note.

At some point we really should start measuring things and try to get
some of the speed back for common stuff like cursor movement and page
flips.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e9bb860a55dc..f2a0151b3f14 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14105,9 +14105,6 @@  intel_commit_cursor_plane(struct drm_plane *plane,
 	crtc = crtc ? crtc : plane->crtc;
 	intel_crtc = to_intel_crtc(crtc);
 
-	if (intel_crtc->cursor_bo == obj)
-		goto update;
-
 	if (!obj)
 		addr = 0;
 	else if (!INTEL_INFO(dev)->cursor_needs_physical)
@@ -14116,9 +14113,7 @@  intel_commit_cursor_plane(struct drm_plane *plane,
 		addr = obj->phys_handle->busaddr;
 
 	intel_crtc->cursor_addr = addr;
-	intel_crtc->cursor_bo = obj;
 
-update:
 	intel_crtc_update_cursor(crtc, state->visible);
 }
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 76dfa286cd95..6324c782d062 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -568,7 +568,6 @@  struct intel_crtc {
 	int adjusted_x;
 	int adjusted_y;
 
-	struct drm_i915_gem_object *cursor_bo;
 	uint32_t cursor_addr;
 	uint32_t cursor_cntl;
 	uint32_t cursor_size;