Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <p.zabel@pengutronix.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240626-drm-panel-ili9881c-rotation-v1-2-e0ff54173e32@pengutronix.de

authored by

Philipp Zabel and committed by
Neil Armstrong
655b92ca b64e7d59

+4
+4
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
··· 1471 1471 1472 1472 connector->display_info.width_mm = mode->width_mm; 1473 1473 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; 1474 1478 1475 1479 /* 1476 1480 * TODO: Remove once all drm drivers call