aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2015-02-27 13:12:00 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-17 17:29:47 -0400
commit3dd512fbda0d87d1c3fb44bf878b262baee98fb6 (patch)
tree8060b3e79cdc3112cfc2740c04ef308a871dfa16 /drivers/gpu/drm/i915/intel_drv.h
parent03be70050c85768e9ce7c0d0887110d1b629e127 (diff)
drm/i915: Kill intel_crtc->cursor_{width, height} (v2)
The cursor size fields in intel_crtc just duplicate the data from cursor->state.crtc_{w,h} so we don't need them any more. Worse, their use in the watermark code actually introduces a subtle bug since they don't get updated to mirror the state values until the plane commit stage, which is *after* we've already used them to calculate new watermark values. This happens because we had to move watermark updates slightly earlier (outside vblank evasion) in commit commit 32b7eeec4d1e861230b09d437e95d76c86ff4a68 Author: Matt Roper <matthew.d.roper@intel.com> Date: Wed Dec 24 07:59:06 2014 -0800 drm/i915: Refactor work that can sleep out of commit (v7) Dropping the intel_crtc fields and just using the state values (which are properly updated by the time watermark updates happen) should solve the problem. Aside from the actual removal of the struct fields (which are formatted in a way that I couldn't figure out how to match in Coccinelle), the rest of this patch was generated via the following semantic patch: // Drop assignment @@ struct intel_crtc *C; struct drm_plane_state S; @@ ( - C->cursor_width = S.crtc_w; | - C->cursor_height = S.crtc_h; ) // Replace usage @@ struct intel_crtc *C; expression E; @@ ( - C->cursor_width + C->base.cursor->state->crtc_w | - C->cursor_height + C->base.cursor->state->crtc_h | - to_intel_crtc(E)->cursor_width + E->cursor->state->crtc_w | - to_intel_crtc(E)->cursor_height + E->cursor->state->crtc_h ) v2: Rebase Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Joe Konno <joe.konno@linux.intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89346 Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f4aa849b243e..773f19bcd498 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -464,7 +464,6 @@ struct intel_crtc {
464 464
465 struct drm_i915_gem_object *cursor_bo; 465 struct drm_i915_gem_object *cursor_bo;
466 uint32_t cursor_addr; 466 uint32_t cursor_addr;
467 int16_t cursor_width, cursor_height;
468 uint32_t cursor_cntl; 467 uint32_t cursor_cntl;
469 uint32_t cursor_size; 468 uint32_t cursor_size;
470 uint32_t cursor_base; 469 uint32_t cursor_base;