]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/imx: ipuv3-plane: decouple zpos from plane type
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 19 Feb 2026 11:32:57 +0000 (12:32 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 13 Mar 2026 15:26:44 +0000 (16:26 +0100)
The overlay plane may be placed over or under the primary plane. Using
zpos to determine, if the plane is the primary or overlay plane is not
valid anymore.

Use the plane type for determining the name of the plane in the error
message.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patch.msgid.link/20260219-drm-imx-underlay-plane-v2-1-26ef829c5483@pengutronix.de
drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c

index 0ea70b8fd74304fe3048a6eb88b4acace6dcea8f..ff483089b26b9b4fd9746dc213f0c9a62c306ce9 100644 (file)
@@ -915,7 +915,7 @@ struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
                                               type, NULL);
        if (IS_ERR(ipu_plane)) {
                DRM_ERROR("failed to allocate and initialize %s plane\n",
-                         zpos ? "overlay" : "primary");
+                         (type == DRM_PLANE_TYPE_PRIMARY) ? "primary" : "overlay");
                return ipu_plane;
        }
 
@@ -949,7 +949,7 @@ struct ipu_plane *ipu_plane_init(struct drm_device *dev, struct ipu_soc *ipu,
        ret = ipu_plane_get_resources(dev, ipu_plane);
        if (ret) {
                DRM_ERROR("failed to get %s plane resources: %pe\n",
-                         zpos ? "overlay" : "primary", &ret);
+                         (type == DRM_PLANE_TYPE_PRIMARY) ? "primary" : "overlay", &ret);
                return ERR_PTR(ret);
        }