summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2014-12-01 15:40:17 -0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-06 01:46:25 +0100
commite614c3c946ae5b50a679d65d2c981615d8ceccab (patch)
tree091dca936f7137e2b22fe3f992b29a27c0672a60 /drivers
parentc59cb179aaf444931cf9c547a514e383da3d2526 (diff)
drm/i915: Ensure state->crtc is non-NULL for plane updates
When disabling a plane, it is legal to pass crtc = NULL. Since planes on Intel hardware are tied to a fixed CRTC, go ahead and set state->crtc to the appropriate crtc in cases where it is passed to us as NULL. In a future patch, we will start using the update handler for plane disables, so this will help ensure we always have a non-NULL crtc pointer to work with. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f6334e6b378a..4f24cce0fe38 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11898,7 +11898,7 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int ret;
- state.base.crtc = crtc;
+ state.base.crtc = crtc ? crtc : plane->crtc;
state.base.fb = fb;
/* sample coordinates in 16.16 fixed point */