Thread (7 messages) 7 messages, 3 authors, 2022-01-10

Re: [PATCH 1/2] video: vga16fb: Fix logic that checks for the display standard

From: Kris Karas (Bug reporting) <hidden>
Date: 2022-01-09 20:38:38
Also in: dri-devel, lkml

Groetje, Geert,

Geert Uytterhoeven wrote:
quoted
-       par->isVGA = screen_info.orig_video_isVGA;
+       par->isVGA = screen_info.orig_video_isVGA == VIDEO_TYPE_VGAC;
All non-x86 architectures (except for 2 MIPS platforms) treat
orig_video_isVGA as a boolean flag, and just assign 1 to it.
Hence this change would break them.
I see a bit of a conflict with using orig_video_isVGA as a boolean. All 
the modern architecture-agnostic driver code, such as sysfb, 
sysfb_simplefb, and efifb, all use and expect orig_video_isVGA to be an 
integer.  On the other hand, the VGA driver for XEN first sets 
orig_video_isVGA  = 1 (boolean), and then VIDEO_TYPE_VLFB or 
VIDEO_TYPE_EFI (integer).  Overloading the definition for 
orig_video_isVGA to be both boolean and integer - within the same file - 
seems like a recipe for bugs to me.

That said, I think that wrapping the par->isVGA code, above, within a 
check for CONFIG_X86 seems safe and expedient.  But I would be much 
happier if the non-x86 architectures would set it to a proper integer 
value (even if fake) that coincidentally satisfies boolean "true", say 
VIDEO_TYPE_VGAC; that way, there would be no confusion as to data type 
in all the more recent architecture-agnostic framebuffer code.

Kris
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help