Thread (6 messages) 6 messages, 2 authors, 2016-08-26
STALE3567d

[PATCH 3/3] drm/tilcdc: Advertise the DRM_FORMATs according to the IP revision

From: Karl Beldan <hidden>
Date: 2016-08-23 12:57:01
Also in: dri-devel
Subsystem: drm drivers, drm drivers and misc gpu patches, drm drivers for ti lcdc, the rest · Maintainers: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Jyri Sarha, Tomi Valkeinen, Linus Torvalds

ATM the driver unconditionally advertises support for some 24bpp and
32bpp formats while version 1 of the IP only supports up to 16bpp.

Signed-off-by: Karl Beldan <redacted>
---
 drivers/gpu/drm/tilcdc/tilcdc_plane.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
index 41911e3..11285f6 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
@@ -114,12 +114,17 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
 int tilcdc_plane_init(struct drm_device *dev,
 		      struct drm_plane *plane)
 {
+	struct tilcdc_drm_private *priv = dev->dev_private;
+	unsigned int num_formats = ARRAY_SIZE(tilcdc_formats);
 	int ret;
 
+	if (priv->rev == 1)
+		num_formats = 1;
+
 	ret = drm_plane_init(dev, plane, 1,
 			     &tilcdc_plane_funcs,
 			     tilcdc_formats,
-			     ARRAY_SIZE(tilcdc_formats),
+			     num_formats,
 			     true);
 	if (ret) {
 		dev_err(dev->dev, "Failed to initialize plane: %d\n", ret);
-- 
2.9.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help