pmaports/device/.shared-patches/linux/sprd/sprdfb-check-for-buffering.patch
Shinjo Park 89aafe235a
shared-patches: add spreadtrum patches (MR 3242)
Merge and move Spreadtrum patches from these kernels to shared-patches:
* linux-finepower-f1
* linux-samsung-{gtel3g,gtelwifi,j1mini3g,j3xnlte}
* linux-zte-p731a20

[ci:skip-build]: already built successfully in CI
2022-06-19 10:57:00 +02:00

24 lines
1.1 KiB
Diff

sprdfb_check_var() has two problems:
I) it is not buffering-aware, which all Spreadtrum devices use;
II) it checks values that are already in yres_virtual, not those that we
are trying to overwrite.
Those problems stop X11 and charging-sdl from working properly.
X11 error:
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
This patch fixes first problem, however, the correct way is fixing
the second one, as this might have less side effects.
diff --git a/drivers/video/sprdfb/sprdfb_main.c b/drivers/video/sprdfb/sprdfb_main.c
index 43876285..751616a1 100644
--- a/drivers/video/sprdfb/sprdfb_main.c
+++ b/drivers/video/sprdfb/sprdfb_main.c
@@ -531,7 +531,8 @@ static int sprdfb_check_var(struct fb_var_screeninfo *var, struct fb_info *fb)
if ((var->xres != fb->var.xres) ||
(var->yres != fb->var.yres) ||
(var->xres_virtual != fb->var.xres_virtual) ||
- (var->yres_virtual != fb->var.yres_virtual) ||
+ // (var->yres_virtual != fb->var.yres_virtual) ||
+ (fb->var.yres_virtual % var->yres_virtual != 0) ||
(var->xoffset != fb->var.xoffset) ||
#ifndef BIT_PER_PIXEL_SURPPORT
(var->bits_per_pixel != fb->var.bits_per_pixel) ||