Skip to content
Snippets Groups Projects
Commit 7c9dbcd3 authored by Francesco Pham's avatar Francesco Pham
Browse files

openharmony-standard: use drmWaitVBlank hack also on EINVAL


On raspberry pi with VC4 drm graphics driver DRM_IOCTL_WAIT_VBLANK
is failing returning EINVAL for some reason, applying  drmWaitVBlank hack
also on EINVAL until a proper solution is provided.

Signed-off-by: default avatarFrancesco Pham <francesco.pham@huawei.com>
parent 9fefea24
No related branches found
No related tags found
1 merge request!116openharmony-standard: raspberrypi4-64 support
......@@ -9,7 +9,11 @@ is essential for the inner workings of the OpenHarmony graphic stack, therefore
adding a hack that simulates this behaviour until a proper solution is
provided.
Apply hack also when DRM_IOCTL_WAIT_VBLANK fails for other reasons and returns
EINVAL (e.g. on Rpi4 with VC4 drm drivers).
Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: Francesco Pham <francesco.pham@huawei.com>
Upstream-Status: Pending
diff --git a/xf86drm.c b/xf86drm.c
......@@ -20,7 +24,7 @@ index b49d42f70dbe..ab8bb563c344 100644
break;
}
}
+ else if (ret && errno == ENOTSUP) {
+ else if (ret && (errno == ENOTSUP || errno == EINVAL)) {
+ /* Simulate VBLANK @ 60Hz when DRM driver does not support VBLANK */
+ long delay_us;
+ clock_gettime(CLOCK_MONOTONIC, &cur);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment