drm/mediatek: plane: Remove plane zpos/index
authorDaniel Kurtz <djkurtz@chromium.org>
Thu, 4 Aug 2016 02:59:52 +0000 (10:59 +0800)
committerSean Paul <seanpaul@chromium.org>
Mon, 8 Aug 2016 18:20:00 +0000 (14:20 -0400)
It is not actually useful to a mtk plane to know its zpos/index, so just
remove this field.

This let's completely remove struct mtk_drm_plane in a follow up patch.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1470279597-60453-3-git-send-email-bibby.hsieh@mediatek.com
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/mediatek/mtk_drm_plane.c
drivers/gpu/drm/mediatek/mtk_drm_plane.h

index 24aa3bad1e762a228616bc542dbb077f9ebe08c8..18211ab21dafbab3e38c3fff8ecb6a106c3b949e 100644 (file)
@@ -559,7 +559,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
                                (zpos == 1) ? DRM_PLANE_TYPE_CURSOR :
                                                DRM_PLANE_TYPE_OVERLAY;
                ret = mtk_plane_init(drm_dev, &mtk_crtc->planes[zpos],
-                                    BIT(pipe), type, zpos);
+                                    BIT(pipe), type);
                if (ret)
                        goto unprepare;
        }
index 5f2516fca079b9ba3784f5508261b64d4cf17579..32a8e556789cdb8bcf0ee3c3028f3632269e0cb9 100644 (file)
@@ -189,8 +189,7 @@ static const struct drm_plane_helper_funcs mtk_plane_helper_funcs = {
 };
 
 int mtk_plane_init(struct drm_device *dev, struct mtk_drm_plane *mtk_plane,
-                  unsigned long possible_crtcs, enum drm_plane_type type,
-                  unsigned int zpos)
+                  unsigned long possible_crtcs, enum drm_plane_type type)
 {
        int err;
 
@@ -203,7 +202,6 @@ int mtk_plane_init(struct drm_device *dev, struct mtk_drm_plane *mtk_plane,
        }
 
        drm_plane_helper_add(&mtk_plane->base, &mtk_plane_helper_funcs);
-       mtk_plane->idx = zpos;
 
        return 0;
 }
index 72a7b3e4c126f8833c29e17775746811c9251533..74dbedad005d8a50375b565f1a897fa84273a4fb 100644 (file)
@@ -20,7 +20,6 @@
 
 struct mtk_drm_plane {
        struct drm_plane                base;
-       unsigned int                    idx;
 };
 
 struct mtk_plane_pending_state {
@@ -53,7 +52,6 @@ to_mtk_plane_state(struct drm_plane_state *state)
 }
 
 int mtk_plane_init(struct drm_device *dev, struct mtk_drm_plane *mtk_plane,
-                  unsigned long possible_crtcs, enum drm_plane_type type,
-                  unsigned int zpos);
+                  unsigned long possible_crtcs, enum drm_plane_type type);
 
 #endif