e090a0a498
I noticed that some times the framebuffer driver gets configured in a
way that the ioctl performed by msm-fb-refresher returns something lower
than zero:
0ed263db09/drivers/video/fbmem.c (L877-L911)
For example when the Xorg starts I noticed it does a ioctl BLANK and
UNBLANK, but if msm-fb-refresher performs a ioctl in that moment it
stops its loop and exit.
For this reason I lost a lot of time trying to understand what was the
problem with Xorg not displaying anything until I noticed that I had
to restart the msm-fb-refresher.
With this change we don't have to care about msm-fb-refresher as it will
continue call ioctl PAN even if the framebuffer returns some negative
error code.
31 lines
796 B
Diff
31 lines
796 B
Diff
From 56589e6d0da89d687e1d84f0cf2a1efbc8d05adc Mon Sep 17 00:00:00 2001
|
|
From: drebrez <drebrez@gmail.com>
|
|
Date: Sun, 2 Dec 2018 02:15:32 +0100
|
|
Subject: [PATCH] Perform ioctl even if there are errors
|
|
|
|
---
|
|
refresher.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
mode change 100644 => 100755 refresher.c
|
|
|
|
diff --git a/refresher.c b/refresher.c
|
|
old mode 100644
|
|
new mode 100755
|
|
index 997a1ec..a49e7cb
|
|
--- a/refresher.c
|
|
+++ b/refresher.c
|
|
@@ -38,8 +38,10 @@ int main(int argc, char *argv[])
|
|
|
|
if(argc > 1 && !strcmp(argv[1], "--loop"))
|
|
{
|
|
- while(ioctl(fd, FBIOPAN_DISPLAY, &var) >= 0)
|
|
+ while(1) {
|
|
+ ioctl(fd, FBIOPAN_DISPLAY, &var);
|
|
usleep(16666);
|
|
+ }
|
|
perror("Failed FBIOPAN_DISPLAY");
|
|
return 1;
|
|
}
|
|
--
|
|
2.19.1
|
|
|