File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 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 {
@@ -171,6 +172,7 @@ static const struct drm_display_mode default_mode = {
171
172
172
173
static const struct st7789_panel_info default_panel = {
173
174
.mode = & default_mode ,
175
+ .invert_mode = true,
174
176
.bus_format = MEDIA_BUS_FMT_RGB666_1X18 ,
175
177
};
176
178
@@ -321,7 +323,13 @@ static int st7789v_prepare(struct drm_panel *panel)
321
323
ST7789V_TEST (ret , st7789v_write_data (ctx , ST7789V_NVGAMCTRL_VN61 (0x1b )));
322
324
ST7789V_TEST (ret , st7789v_write_data (ctx , ST7789V_NVGAMCTRL_VN62 (0x28 )));
323
325
324
- ST7789V_TEST (ret , st7789v_write_command (ctx , MIPI_DCS_ENTER_INVERT_MODE ));
326
+ if (ctx -> info -> invert_mode ) {
327
+ ST7789V_TEST (ret , st7789v_write_command (ctx ,
328
+ MIPI_DCS_ENTER_INVERT_MODE ));
329
+ } else {
330
+ ST7789V_TEST (ret , st7789v_write_command (ctx ,
331
+ MIPI_DCS_EXIT_INVERT_MODE ));
332
+ }
325
333
326
334
ST7789V_TEST (ret , st7789v_write_command (ctx , ST7789V_RAMCTRL_CMD ));
327
335
ST7789V_TEST (ret , st7789v_write_data (ctx , ST7789V_RAMCTRL_DM_RGB |
You can’t perform that action at this time.
0 commit comments