Skip to content

Commit 655b92c

Browse files
pH5superna9999
authored andcommitted
drm/panel: ilitek-ili9881c: Report subpixel order according to rotation
Assume a default RGB subpixel order and flip it around if 180° rotation is configured via address mode. Report subpixel order to userspace. Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de
1 parent b64e7d5 commit 655b92c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/panel/panel-ilitek-ili9881c.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,10 @@ static int ili9881c_get_modes(struct drm_panel *panel,
14711471

14721472
connector->display_info.width_mm = mode->width_mm;
14731473
connector->display_info.height_mm = mode->height_mm;
1474+
if (ctx->address_mode == 0x3)
1475+
connector->display_info.subpixel_order = SubPixelHorizontalBGR;
1476+
else
1477+
connector->display_info.subpixel_order = SubPixelHorizontalRGB;
14741478

14751479
/*
14761480
* TODO: Remove once all drm drivers call

0 commit comments

Comments
 (0)