summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arc/arcpgu_crtc.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2021-01-12 11:43:47 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2021-02-25 14:03:13 +0300
commit418fa908025a27136b3254c741956a2b3352f70b (patch)
treeded4e5e5158d8019e7a2ca41dfd1662646141ef7 /drivers/gpu/drm/arc/arcpgu_crtc.c
parent4eaf70d43d88911204082e475fd861917712805f (diff)
downloadlinux-418fa908025a27136b3254c741956a2b3352f70b.tar.xz
drm/arc: Embedded a drm_simple_display_pipe
This is a prep step to convert arc over to the simple kms helpers, for now we just use this as an embedding container to drop all the various allocations. Big change is the removal of the various devm_kzalloc, which have the wrong lifetimes anyway. Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-4-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/arc/arcpgu_crtc.c')
-rw-r--r--drivers/gpu/drm/arc/arcpgu_crtc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
index 2254421cceb3..bcf3c3f077a6 100644
--- a/drivers/gpu/drm/arc/arcpgu_crtc.c
+++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
@@ -180,9 +180,7 @@ static struct drm_plane *arc_pgu_plane_init(struct drm_device *drm)
struct drm_plane *plane = NULL;
int ret;
- plane = devm_kzalloc(drm->dev, sizeof(*plane), GFP_KERNEL);
- if (!plane)
- return ERR_PTR(-ENOMEM);
+ plane = &arcpgu->pipe.plane;
ret = drm_universal_plane_init(drm, plane, 0xff, &arc_pgu_plane_funcs,
arc_pgu_supported_formats,
@@ -193,7 +191,6 @@ static struct drm_plane *arc_pgu_plane_init(struct drm_device *drm)
return ERR_PTR(ret);
drm_plane_helper_add(plane, &arc_pgu_plane_helper_funcs);
- arcpgu->plane = plane;
return plane;
}
@@ -208,13 +205,13 @@ int arc_pgu_setup_crtc(struct drm_device *drm)
if (IS_ERR(primary))
return PTR_ERR(primary);
- ret = drm_crtc_init_with_planes(drm, &arcpgu->crtc, primary, NULL,
+ ret = drm_crtc_init_with_planes(drm, &arcpgu->pipe.crtc, primary, NULL,
&arc_pgu_crtc_funcs, NULL);
if (ret) {
drm_plane_cleanup(primary);
return ret;
}
- drm_crtc_helper_add(&arcpgu->crtc, &arc_pgu_crtc_helper_funcs);
+ drm_crtc_helper_add(&arcpgu->pipe.crtc, &arc_pgu_crtc_helper_funcs);
return 0;
}