Lvgl seems to be adding some kind of screen tear

SAME54 Xplained Pro (ATSAME54P20A)
LCD Controller: SSD1963

I ran a test to see if my driver was fine, and that code is here (thanks to deonm) :

lv_area_t area = {
.x1 = 0, .x2 = LV_HOR_RES_MAX-1,
.y1 = 0, .y2 = 9,
static lv_color_t buf[LV_HOR_RES_MAX * 10];
for( int i = 0; i < LV_HOR_RES_MAX * 10; ++i )
/* This is the buffer you gave to lv_disp_buf_init */
buf[i] = LV_COLOR_WHITE;
ssd1963_flush(NULL, &area, buf);

The result is as expected (little white block at the top):

But when I run normal code (without calling flush manually), I get the following result:

main.c code:

int main(void)

static lv_disp_buf_t disp_buf;
static lv_color_t buf[LV_HOR_RES_MAX * 10]; /Declare a buffer for 10 lines/
lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10); /Initialize the display buffer/
lv_disp_drv_t disp_drv; /Descriptor of a display driver/
lv_disp_drv_init(&disp_drv); /Basic initialization/
disp_drv.flush_cb = ssd1963_flush; /Set your driver function/
disp_drv.buffer = &disp_buf; /Assign the buffer to the display/
lv_disp_drv_register(&disp_drv); /Finally register the driver/

lv_obj_t * scr = lv_disp_get_scr_act(NULL); /Get the current screen/
///Create a simple objects/
lv_obj_t * obj1;
obj1 = lv_obj_create(scr, NULL);
lv_obj_set_pos(obj1, 0, 10);
lv_obj_set_size(obj1, 320, 30);

/Add a label to the object/
lv_obj_t * label;
label = lv_label_create(obj1, NULL);
lv_label_set_text(label, “-- SAME54 LCD Demo --”);
lv_obj_align(label, obj1, LV_ALIGN_CENTER, 0, 0);

/Create a simple objects/
lv_obj_t * body;
body = lv_obj_create(scr, NULL);
lv_obj_set_pos(body, 20, 50);
lv_obj_set_size(body, 280, 170);
lv_obj_set_style(body, &lv_style_plain_color);

while (1) {


This is odd because I’m running extremely similar code on a SAMD21 and I am not getting this tear.

It looks like lines aren’t being drawn at the same starting location (they are sometimes offset by a few random pixels). Check the coordinates being passed to your flush function and verify that they are correct (i.e. not offset like this). If so, the problem is in your driver.

After looking, the problem is definitely somewhere in my driver. I just dont see where the coords could be set other than my flush function which is copied and pasted from my d21 implementation which works near flawlessly (the color is a bit weird on it, like still expected colors by not crystal clear). ill have to dive into it. Thanks!