drm/exynos: Restrict plane loops to only operate on overlay planes (v2)
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 1 Apr 2014 22:22:31 +0000 (15:22 -0700)
committerRob Clark <robdclark@gmail.com>
Wed, 2 Apr 2014 00:11:18 +0000 (20:11 -0400)
Ensure that existing driver loops over all planes do not change behavior
when we begin adding new types of planes (primary and cursor) to the DRM
plane list in future patches.

v2: Switch to using drm_for_each_legacy_plane()

Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_encoder.c

index 9cc92ae6b71089724a60bba37d0753368da61832..5c9afa198b2fb09bcd047a25e243aff7a20b9c4c 100644 (file)
@@ -190,7 +190,7 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
 
        exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
 
-       list_for_each_entry(plane, &crtc->dev->mode_config.plane_list, head) {
+       drm_for_each_legacy_plane(plane, &crtc->dev->mode_config.plane_list) {
                if (plane->crtc != crtc)
                        continue;
 
index 835c0f1e88a71c48dc0f8672c6f19a89a7365654..7e282e3d603826cefb4f43d53a588dc3a2d55830 100644 (file)
@@ -101,7 +101,7 @@ static void exynos_drm_encoder_disable(struct drm_encoder *encoder)
        exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
 
        /* all planes connected to this encoder should be also disabled. */
-       list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
+       drm_for_each_legacy_plane(plane, &dev->mode_config.plane_list) {
                if (plane->crtc == encoder->crtc)
                        plane->funcs->disable_plane(plane);
        }