[PATCH 1/3] drm/omap: fix missing disable for unused encoder
Rob Clark
robdclark at gmail.com
Thu Apr 3 07:53:43 PDT 2014
On Thu, Apr 3, 2014 at 9:45 AM, Tomi Valkeinen <tomi.valkeinen at ti.com> wrote:
> When an encoder is no longer connected to a crtc, the driver will leave
> the encoder enabled.
>
> This patch adds code to track the encoder used for a crtc, and when the
> encoder changes, the old one is disabled.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
Reviewed-by: Rob Clark <robdclark at gmail.com>
> ---
> drivers/gpu/drm/omapdrm/omap_crtc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 4f624c59a660..beccff2ccf84 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -33,6 +33,7 @@ struct omap_crtc {
> int pipe;
> enum omap_channel channel;
> struct omap_overlay_manager_info info;
> + struct drm_encoder *current_encoder;
>
> /*
> * Temporary: eventually this will go away, but it is needed
> @@ -593,6 +594,11 @@ static void omap_crtc_pre_apply(struct omap_drm_apply *apply)
> }
> }
>
> + if (omap_crtc->current_encoder && encoder != omap_crtc->current_encoder)
> + omap_encoder_set_enabled(omap_crtc->current_encoder, false);
> +
> + omap_crtc->current_encoder = encoder;
> +
> if (!omap_crtc->enabled) {
> set_enabled(&omap_crtc->base, false);
> if (encoder)
> --
> 1.8.3.2
>
More information about the dri-devel
mailing list