Skip to content

Commit

Permalink
drm/mediatek: plane: Remove plane zpos/index
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Bibby Hsieh <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
djkurtz authored and atseanpaul committed Aug 8, 2016
1 parent 73785a9 commit 0d5a32b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mediatek/mtk_drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 1 addition & 3 deletions drivers/gpu/drm/mediatek/mtk_drm_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
4 changes: 1 addition & 3 deletions drivers/gpu/drm/mediatek/mtk_drm_plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

struct mtk_drm_plane {
struct drm_plane base;
unsigned int idx;
};

struct mtk_plane_pending_state {
Expand Down Expand Up @@ -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

0 comments on commit 0d5a32b

Please sign in to comment.