Skip to content

Commit 3025fc0

Browse files
committed
making sure that application writes faster than the backbuffers are read. Otherwise choosing framebuffer directly for smoothness (even if applicative tearing)
1 parent e4dc6f8 commit 3025fc0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/staging/fbtft/fbtft-core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,11 @@ void fbtft_post_process_screen(struct fbtft_par *par)
577577
par->write_line_end = par->info->var.yres - 1;
578578
screen_post_process = true;
579579
}
580-
580+
581581
/* Get last memory buffer not written */
582-
if(par->nb_backbuffers_full > 0){
582+
/* >1 and not >0 because we want to make sure */
583+
/* application writes faster than it's read here */
584+
if(par->nb_backbuffers_full > 1){
583585
par->vmem_ptr = par->vmem_back_buffers[par->vmem_prev_buf_idx];
584586
par->nb_backbuffers_full--;
585587
}

0 commit comments

Comments
 (0)