On Wed, Dec 06, 2017 at 07:01:59PM -0800, Gurchetan Singh wrote: > When a CRTC is disabled and we used an internally created framebuffer, > this patch disables the cursor plane and drops the reference that was > introduced when we called drm_internal_framebuffer_create. > > Signed-off-by: Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx> What kind of bug are you trying to fix here? plane and cursor uapi is that when you re-enable the crtc, all the planes will be there again. Only exception is the primary plane, but that's only because set_config both disables the crtc _and_ the primary plane. Without more detail of what's going on I have no idea what exactly you're trying to achieve here. -Daniel > --- > drivers/gpu/drm/drm_crtc.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index f0556e654116..d732cca4879f 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -101,12 +101,19 @@ EXPORT_SYMBOL(drm_crtc_from_index); > */ > int drm_crtc_force_disable(struct drm_crtc *crtc) > { > + struct drm_framebuffer *fb; > struct drm_mode_set set = { > .crtc = crtc, > }; > > WARN_ON(drm_drv_uses_atomic_modeset(crtc->dev)); > > + if (crtc->cursor && crtc->cursor->fb && crtc->cursor->fb->internal) { > + fb = crtc->cursor->fb; > + drm_plane_force_disable(crtc->cursor); > + drm_framebuffer_unreference(fb); > + } > + > return drm_mode_set_config_internal(&set); > } > EXPORT_SYMBOL(drm_crtc_force_disable); > -- > 2.13.5 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel