diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:53:06 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-07-30 13:53:06 +0300 |
commit | d701278ada5115c40cd4d58ce0fb1169479c0bf6 (patch) | |
tree | 3439f2c8e57069176e2d524031b6cfc88923d3b0 /drivers/gpu/drm/armada | |
parent | dae2155bb07bb2063ce604049e9aa4e862b6db0a (diff) | |
download | linux-d701278ada5115c40cd4d58ce0fb1169479c0bf6.tar.xz |
drm/armada: remove unnecessary armada_ovl_plane structure
We no longer need a private plane structure, so get rid of it. Use the
drm_plane structure directly.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/gpu/drm/armada')
-rw-r--r-- | drivers/gpu/drm/armada/armada_overlay.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index ec2043b6f61f..eb7dfb65ef47 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -25,12 +25,6 @@ #define DEFAULT_SATURATION 0x4000 #define DEFAULT_ENCODING DRM_COLOR_YCBCR_BT601 -struct armada_ovl_plane { - struct armada_plane base; -}; -#define drm_to_armada_ovl_plane(p) \ - container_of(p, struct armada_ovl_plane, base.base) - struct armada_overlay_state { struct drm_plane_state base; u32 colorkey_yr; @@ -301,11 +295,8 @@ fail: static void armada_ovl_plane_destroy(struct drm_plane *plane) { - struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane); - drm_plane_cleanup(plane); - - kfree(dplane); + kfree(plane); } static void armada_overlay_reset(struct drm_plane *plane) @@ -550,38 +541,31 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs) { struct armada_private *priv = dev->dev_private; struct drm_mode_object *mobj; - struct armada_ovl_plane *dplane; + struct drm_plane *overlay; int ret; ret = armada_overlay_create_properties(dev); if (ret) return ret; - dplane = kzalloc(sizeof(*dplane), GFP_KERNEL); - if (!dplane) + overlay = kzalloc(sizeof(*overlay), GFP_KERNEL); + if (!overlay) return -ENOMEM; - ret = armada_drm_plane_init(&dplane->base); - if (ret) { - kfree(dplane); - return ret; - } - - drm_plane_helper_add(&dplane->base.base, - &armada_overlay_plane_helper_funcs); + drm_plane_helper_add(overlay, &armada_overlay_plane_helper_funcs); - ret = drm_universal_plane_init(dev, &dplane->base.base, crtcs, + ret = drm_universal_plane_init(dev, overlay, crtcs, &armada_ovl_plane_funcs, armada_ovl_formats, ARRAY_SIZE(armada_ovl_formats), NULL, DRM_PLANE_TYPE_OVERLAY, NULL); if (ret) { - kfree(dplane); + kfree(overlay); return ret; } - mobj = &dplane->base.base.base; + mobj = &overlay->base; drm_object_attach_property(mobj, priv->colorkey_prop, 0x0101fe); drm_object_attach_property(mobj, priv->colorkey_min_prop, @@ -601,7 +585,7 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs) drm_object_attach_property(mobj, priv->saturation_prop, DEFAULT_SATURATION); - ret = drm_plane_create_color_properties(&dplane->base.base, + ret = drm_plane_create_color_properties(overlay, BIT(DRM_COLOR_YCBCR_BT601) | BIT(DRM_COLOR_YCBCR_BT709), BIT(DRM_COLOR_YCBCR_LIMITED_RANGE), |