lkml.org 
[lkml]   [2023]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] firmware/sysfb: Fix wrong stride when bits-per-pixel is calculated
From
After careful reading of the comments in f35cd3fa7729, would this
be an appropriate fix ? Does it still address all the issues raised
by Thomas ?

(not tested)

diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c
index 82c64cb9f531..9f5299d54732 100644
--- a/drivers/firmware/sysfb_simplefb.c
+++ b/drivers/firmware/sysfb_simplefb.c
@@ -56,10 +56,11 @@ __init bool sysfb_parse_mode(const struct screen_info *si,
* don't specify alpha channels.
*/
if (si->lfb_depth > 8) {
- bits_per_pixel = max(max3(si->red_size + si->red_pos,
+ bits_per_pixel = max3(max3(si->red_size + si->red_pos,
si->green_size + si->green_pos,
si->blue_size + si->blue_pos),
- si->rsvd_size + si->rsvd_pos);
+ si->rsvd_size + si->rsvd_pos,
+ si->lfb_depth);
} else {
bits_per_pixel = si->lfb_depth;
}
\
 
 \ /
  Last update: 2023-04-13 03:13    [W:0.091 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site