dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karl Beldan <kbeldan@baylibre.com>
To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org
Cc: Karl Beldan <karl.beldan+oss@gmail.com>,
	Kevin Hilman <khilman@baylibre.com>, Sekhar Nori <nsekhar@ti.com>,
	Jyri Sarha <jsarha@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Karl Beldan <kbeldan@baylibre.com>
Subject: [PATCH 3/3] drm/tilcdc: Advertise the DRM_FORMATs according to the IP revision
Date: Tue, 23 Aug 2016 12:57:01 +0000	[thread overview]
Message-ID: <20160823125701.25700-4-kbeldan@baylibre.com> (raw)
In-Reply-To: <20160823125701.25700-1-kbeldan@baylibre.com>

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 <kbeldan@baylibre.com>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-08-23 12:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 12:56 [PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1 Karl Beldan
2016-08-23 12:56 ` [PATCH 1/3] drm/tilcdc: Adjust the FB_CEILING address Karl Beldan
2016-08-23 12:57 ` [PATCH 2/3] drm/tilcdc: Enable EOF interrupts for v1 LCDC Karl Beldan
2016-08-23 12:57 ` Karl Beldan [this message]
2016-08-23 16:24 ` [PATCH 0/3] drm/tilcdc: Some fixes for LCDC rev1 Jyri Sarha
2016-08-26 16:54   ` Karl Beldan
2016-08-31 22:11   ` Kevin Hilman
2016-09-02 12:29     ` Jyri Sarha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160823125701.25700-4-kbeldan@baylibre.com \
    --to=kbeldan@baylibre.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=karl.beldan+oss@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=nsekhar@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox