On Fri, May 31, 2013 at 08:07:03PM +0300, ville.syrjala at linux.intel.com wrote: > From: Ville Syrj?l? <ville.syrjala at linux.intel.com> > > plane->enabled is never set, so this code didn't do anything. > > Fix the code for sprites by calling the new drm_plane_force_disable() > function. That means the plane will remain off until someone explicitly > turns it back on. > > And do the same for cursors and the old video overlays, since we only > want to see the primary plane for fbdev. > > v2: Disable sprites/cursors until explicitly re-enabled > > Signed-off-by: Ville Syrj?l? <ville.syrjala at linux.intel.com> > --- > drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++ > drivers/gpu/drm/i915/intel_drv.h | 1 + > drivers/gpu/drm/i915/intel_fb.c | 9 ++------- > 3 files changed, 19 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 944b6d5..1d1a3fd 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -9842,3 +9842,19 @@ intel_display_print_error_state(struct drm_i915_error_state_buf *m, > } > } > #endif > + > +void intel_disable_cursors_and_sprites(struct drm_device *dev) > +{ > + struct drm_crtc *crtc; > + struct drm_plane *plane; > + > + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { > + intel_crtc_dpms_overlay(to_intel_crtc(crtc), false); > + intel_crtc_cursor_set(crtc, NULL, 0, 0, 0); > + } > + > + list_for_each_entry(plane, &dev->mode_config.plane_list, head) { > + if (plane->fb) > + drm_plane_force_disable(plane); This would be neater if drm_plane_force_disable did the check for plane-fb itself. -Chris -- Chris Wilson, Intel Open Source Technology Centre