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

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: sitronix-st7789v: avoid hardcoding invert mode

While the default panel uses invert mode, some panels
require non-invert mode instead.

Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714013756.1546769-12-sre@kernel.org

authored by

Sebastian Reichel and committed by
Neil Armstrong
7a628872 a4b563b1

+9 -1
+9 -1
drivers/gpu/drm/panel/panel-sitronix-st7789v.c
··· 112 112 struct st7789_panel_info { 113 113 const struct drm_display_mode *mode; 114 114 u32 bus_format; 115 + bool invert_mode; 115 116 }; 116 117 117 118 struct st7789v { ··· 172 171 173 172 static const struct st7789_panel_info default_panel = { 174 173 .mode = &default_mode, 174 + .invert_mode = true, 175 175 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, 176 176 }; 177 177 ··· 323 321 ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN61(0x1b))); 324 322 ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_NVGAMCTRL_VN62(0x28))); 325 323 326 - ST7789V_TEST(ret, st7789v_write_command(ctx, MIPI_DCS_ENTER_INVERT_MODE)); 324 + if (ctx->info->invert_mode) { 325 + ST7789V_TEST(ret, st7789v_write_command(ctx, 326 + MIPI_DCS_ENTER_INVERT_MODE)); 327 + } else { 328 + ST7789V_TEST(ret, st7789v_write_command(ctx, 329 + MIPI_DCS_EXIT_INVERT_MODE)); 330 + } 327 331 328 332 ST7789V_TEST(ret, st7789v_write_command(ctx, ST7789V_RAMCTRL_CMD)); 329 333 ST7789V_TEST(ret, st7789v_write_data(ctx, ST7789V_RAMCTRL_DM_RGB |