drivers: display: Added support for restricted update.

Added support for restricted updating of monochrome
displays.

Signed-off-by: Rohit Gujarathi <gujju.rohit@gmail.com>
This commit is contained in:
Rohit Gujarathi 2020-08-27 22:51:11 +05:30 committed by Carles Cufí
commit f023df581f
2 changed files with 14 additions and 6 deletions

View file

@ -85,11 +85,16 @@ void lvgl_rounder_cb_mono(struct _disp_drv_t *disp_drv,
display_get_capabilities(display_dev, &cap);
if (cap.screen_info & SCREEN_INFO_MONO_VTILED) {
area->y1 &= ~0x7;
area->y2 |= 0x7;
if (cap.screen_info & SCREEN_INFO_X_ALIGNMENT_WIDTH) {
area->x1 = 0;
area->x2 = cap.x_resolution - 1;
} else {
area->x1 &= ~0x7;
area->x2 |= 0x7;
if (cap.screen_info & SCREEN_INFO_MONO_VTILED) {
area->y1 &= ~0x7;
area->y2 |= 0x7;
} else {
area->x1 &= ~0x7;
area->x2 |= 0x7;
}
}
}