[RFCv3 04/14] drm/exynos: Restrict plane loops to only operate on overlay planes

Daniel Vetter daniel at ffwll.ch
Wed Mar 19 04:51:03 PDT 2014


On Tue, Mar 18, 2014 at 05:22:49PM -0700, Matt Roper wrote:
> Before we add additional types of planes to the DRM plane list, ensure
> that existing loops over all planes continue to operate only on
> "overlay" planes and ignore primary & cursor planes.
> 
> Cc: Inki Dae <inki.dae at samsung.com>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_encoder.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> index 06f1b2a..2fa2685 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
> @@ -127,6 +127,9 @@ static void disable_plane_to_crtc(struct drm_device *dev,
>  	 * (encoder->crtc)
>  	 */
>  	list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
> +		if (plane->type != DRM_PLANE_TYPE_OVERLAY)

I think a drm_for_each_legacy_plane iteration helper would be neat for
this one and the following i915 patch.
-Daniel

> +			continue;
> +
>  		if (plane->crtc == old_crtc) {
>  			/*
>  			 * do not change below call order.
> @@ -247,6 +250,9 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
>  
>  	/* all planes connected to this encoder should be also disabled. */
>  	list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
> +		if (plane->type != DRM_PLANE_TYPE_OVERLAY)
> +			continue;
> +
>  		if (plane->crtc == encoder->crtc)
>  			plane->funcs->disable_plane(plane);
>  	}
> -- 
> 1.8.5.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list