[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230314115644.3775169-2-gerald.loacker@wolfvision.net>
Date: Tue, 14 Mar 2023 12:56:38 +0100
From: Gerald Loacker <gerald.loacker@...fvision.net>
To: dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Maxime Ripard <mripard@...nel.org>,
Michael Riesch <michael.riesch@...fvision.net>,
Gerald Loacker <gerald.loacker@...fvision.net>
Subject: [PATCH 1/7] drm/panel: sitronix-st7789v: propagate RGB666 format
From: Michael Riesch <michael.riesch@...fvision.net>
The ST7789V display is operated in RGB666 (18-bit) mode. Propagate
this format via the display info.
Signed-off-by: Michael Riesch <michael.riesch@...fvision.net>
Signed-off-by: Gerald Loacker <gerald.loacker@...fvision.net>
---
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index bbc4569cbcdc..9535437271d3 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -5,6 +5,7 @@
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
+#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
@@ -171,6 +172,7 @@ static int st7789v_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
struct drm_display_mode *mode;
+ u32 bus_format = MEDIA_BUS_FMT_RGB666_1X18;
mode = drm_mode_duplicate(connector->dev, &default_mode);
if (!mode) {
@@ -188,6 +190,9 @@ static int st7789v_get_modes(struct drm_panel *panel,
connector->display_info.width_mm = 61;
connector->display_info.height_mm = 103;
+ drm_display_info_set_bus_formats(&connector->display_info, &bus_format,
+ 1);
+
return 1;
}
--
2.37.2
Powered by blists - more mailing lists