Skip to content

Commit

Permalink
drm/panel: ilitek-ili9881c: Report subpixel order according to rotation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Philipp Zabel authored and Neil Armstrong committed Oct 9, 2024
1 parent b64e7d5 commit 655b92c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,10 @@ static int ili9881c_get_modes(struct drm_panel *panel,

connector->display_info.width_mm = mode->width_mm;
connector->display_info.height_mm = mode->height_mm;
if (ctx->address_mode == 0x3)
connector->display_info.subpixel_order = SubPixelHorizontalBGR;
else
connector->display_info.subpixel_order = SubPixelHorizontalRGB;

/*
* TODO: Remove once all drm drivers call
Expand Down

0 comments on commit 655b92c

Please sign in to comment.