Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(drivers): account for the frame buffer virtual resolution deviating from the visible resolution. #5988

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/drivers/display/fb/lv_linux_fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 312,21 @@ static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * colo
return;
}

uint32_t color_pos = (area->x1 dsc->vinfo.xoffset) * px_size area->y1 * dsc->finfo.line_length;
uint32_t fb_pos = color_pos dsc->vinfo.yoffset * dsc->finfo.line_length;
uint32_t fb_pos =
(area->x1 dsc->vinfo.xoffset) * px_size
(area->y1 dsc->vinfo.yoffset) * dsc->finfo.line_length;

uint8_t * fbp = (uint8_t *)dsc->fbp;
int32_t y;
if(LV_LINUX_FBDEV_RENDER_MODE == LV_DISPLAY_RENDER_MODE_DIRECT) {
uint32_t color_pos =
area->x1 * px_size
area->y1 * disp->hor_res * px_size;

for(y = area->y1; y <= area->y2; y ) {
lv_memcpy(&fbp[fb_pos], &color_p[color_pos], w * px_size);
fb_pos = dsc->finfo.line_length;
color_pos = dsc->finfo.line_length;
color_pos = disp->hor_res * px_size;
}
}
else {
Expand Down
Loading