Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6fc3b68 authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Stone
Browse files

drm: Plumb modifiers through plane init



This is the plumbing for supporting fb modifiers on planes. Modifiers
have already been introduced to some extent, but this series will extend
this to allow querying modifiers per plane. Based on this, the client to
enable optimal modifications for framebuffers.

This patch simply allows the DRM drivers to initialize their list of
supported modifiers upon initializing the plane.

v2: A minor addition from Daniel

v3:
* Updated commit message
* s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu)
* Remove some excess newlines (Liviu)
* Update comment for > 64 modifiers (Liviu)

v4: Minor comment adjustments (Liviu)

v5: Some new platforms added due to rebase

v6: Add some missed plane inits (or maybe they're new - who knows at
this point) (Daniel)

Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Stone <daniels@collabora.com> (v2)
Reviewed-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
parent d7429669
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -217,6 +217,7 @@ static struct drm_plane *arc_pgu_plane_init(struct drm_device *drm)


	ret = drm_universal_plane_init(drm, plane, 0xff, &arc_pgu_plane_funcs,
	ret = drm_universal_plane_init(drm, plane, 0xff, &arc_pgu_plane_funcs,
				       formats, ARRAY_SIZE(formats),
				       formats, ARRAY_SIZE(formats),
				       NULL,
				       DRM_PLANE_TYPE_PRIMARY, NULL);
				       DRM_PLANE_TYPE_PRIMARY, NULL);
	if (ret)
	if (ret)
		return ERR_PTR(ret);
		return ERR_PTR(ret);
+1 −0
Original line number Original line Diff line number Diff line
@@ -315,6 +315,7 @@ static struct drm_plane *hdlcd_plane_init(struct drm_device *drm)


	ret = drm_universal_plane_init(drm, plane, 0xff, &hdlcd_plane_funcs,
	ret = drm_universal_plane_init(drm, plane, 0xff, &hdlcd_plane_funcs,
				       formats, ARRAY_SIZE(formats),
				       formats, ARRAY_SIZE(formats),
				       NULL,
				       DRM_PLANE_TYPE_PRIMARY, NULL);
				       DRM_PLANE_TYPE_PRIMARY, NULL);
	if (ret) {
	if (ret) {
		return ERR_PTR(ret);
		return ERR_PTR(ret);
+1 −1
Original line number Original line Diff line number Diff line
@@ -398,7 +398,7 @@ int malidp_de_planes_init(struct drm_device *drm)
					DRM_PLANE_TYPE_OVERLAY;
					DRM_PLANE_TYPE_OVERLAY;
		ret = drm_universal_plane_init(drm, &plane->base, crtcs,
		ret = drm_universal_plane_init(drm, &plane->base, crtcs,
					       &malidp_de_plane_funcs, formats,
					       &malidp_de_plane_funcs, formats,
					       n, plane_type, NULL);
					       n, NULL, plane_type, NULL);
		if (ret < 0)
		if (ret < 0)
			goto cleanup;
			goto cleanup;


+1 −0
Original line number Original line Diff line number Diff line
@@ -1269,6 +1269,7 @@ static int armada_drm_crtc_create(struct drm_device *drm, struct device *dev,
				       &armada_primary_plane_funcs,
				       &armada_primary_plane_funcs,
				       armada_primary_formats,
				       armada_primary_formats,
				       ARRAY_SIZE(armada_primary_formats),
				       ARRAY_SIZE(armada_primary_formats),
				       NULL,
				       DRM_PLANE_TYPE_PRIMARY, NULL);
				       DRM_PLANE_TYPE_PRIMARY, NULL);
	if (ret) {
	if (ret) {
		kfree(primary);
		kfree(primary);
+1 −0
Original line number Original line Diff line number Diff line
@@ -460,6 +460,7 @@ int armada_overlay_plane_create(struct drm_device *dev, unsigned long crtcs)
				       &armada_ovl_plane_funcs,
				       &armada_ovl_plane_funcs,
				       armada_ovl_formats,
				       armada_ovl_formats,
				       ARRAY_SIZE(armada_ovl_formats),
				       ARRAY_SIZE(armada_ovl_formats),
				       NULL,
				       DRM_PLANE_TYPE_OVERLAY, NULL);
				       DRM_PLANE_TYPE_OVERLAY, NULL);
	if (ret) {
	if (ret) {
		kfree(dplane);
		kfree(dplane);
Loading