Hi, On Fri, Jun 09, 2023 at 04:59:47PM +0200, Miquel Raynal wrote: > The LCD controller supports RGB444, RGB565 and RGB888. The value that is > written in the COLMOD register indicates using RGB888, so let's clearly > specify the in-use bus format. > > Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> > --- > drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > index e9ca7ebb458a..0abb45bea18d 100644 > --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c > @@ -6,6 +6,7 @@ > #include <linux/delay.h> > #include <linux/gpio/consumer.h> > #include <linux/module.h> > +#include <linux/media-bus-format.h> > #include <linux/regulator/consumer.h> > #include <linux/spi/spi.h> > > @@ -170,6 +171,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; I'm not sure it should be set in stone in the driver. This is a property of the panel/controller, but also one of the RGB controller upstream that will and how the board has been wired. It's not unusual for boards with a limited number of GPIOs to take a RGB888 panel and connect only as a RGB565 with the lowest bits to the ground for example. So I think this should come from the device tree, ideally from the media graph endpoint. Maxime