linux-postmarketos-exynos4: add patch to fix GPU issue (MR 3028)

Fixes/works around issue where some applications using the GPU
would crash with DRM_IOCTL_MODE_CREATE_DUMB failed.

See https://gitlab.com/postmarketOS/pmaports/-/issues/1246

[ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
Newbyte 2022-03-24 11:50:19 +01:00
parent 8021b27169
commit c2178fbe1a
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
2 changed files with 35 additions and 1 deletions

View file

@ -0,0 +1,32 @@
From afa77e0b9ca9ba36327aa42f8da43aea4b891f29 Mon Sep 17 00:00:00 2001
From: Newbyte <newbie13xd@gmail.com>
Date: Thu, 24 Mar 2022 11:25:26 +0100
Subject: [PATCH] drm: Allow DRM_IOCTL_MODE_CREATE_DUMB on render nodes
Due to a change in Mesa, the render node ends up being picked
instead of the primary node when using Exynos DRM kmsro. In turn,
this results in that dumb buffers cannot be allocated with
DRM_IOCTL_MODE_CREATE_DUMB, so many applications crash. This works
around that by allowing dumb buffers to be created by render nodes.
Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5510
---
drivers/gpu/drm/drm_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 51fcf1298023..eada5e9aac89 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -672,7 +672,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb_ioctl, 0),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_PAGE_FLIP, drm_mode_page_flip_ioctl, DRM_MASTER),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_DIRTYFB, drm_mode_dirtyfb_ioctl, DRM_MASTER),
- DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, 0),
+ DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_DUMB, drm_mode_create_dumb_ioctl, DRM_RENDER_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_MAP_DUMB, drm_mode_mmap_dumb_ioctl, 0),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_DESTROY_DUMB, drm_mode_destroy_dumb_ioctl, 0),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_OBJ_GETPROPERTIES, drm_mode_obj_get_properties_ioctl, 0),
--
2.35.1

View file

@ -4,7 +4,7 @@
pkgname=linux-postmarketos-exynos4
pkgver=5.16.2
pkgrel=1
pkgrel=2
pkgdesc="Mainline kernel fork for Samsung Exynos4 devices"
arch="armv7"
_carch="arm"
@ -49,6 +49,7 @@ source="
0008-ARM-dts-exynos-i9100-Use-interrupt-for-BCM4330-ho.patch
0009-ARM-dts-driver-exynos-n710x-add-panel.patch
0010-ARM-dts-exynos-n710x-add-leds.patch
0011-drm-Allow-DRM_IOCTL_MODE_CREATE_DUMB-on-render-nodes.patch
initramfs.list
init
"
@ -100,6 +101,7 @@ de87e6a6608165cdc35a03bd10dedef1c12a2a9e1f66f500879c05b287bae7181cc95021a3a2aad6
4ad139898236dd7035ace862c4a9be2d92351977f2d0c38072434c82f2a7f89c224f9b366fcf44755849788f92ed8cdc019cf6c82453b85d5257bf6737a6bb68 0008-ARM-dts-exynos-i9100-Use-interrupt-for-BCM4330-ho.patch
054a03b327386b32b516cf7f9fdbf15adba9b3fb6d0d20473493f7e4538202496829443eb18f9a928b4959b1296ee98171d4a19d8fcf58439d4fdb122fbb97ac 0009-ARM-dts-driver-exynos-n710x-add-panel.patch
63c9e1a1d92e1deb286d6623e116e1cce36bfbae3f9b5db60dc1751573af7477003c7680afe054e7170fee632fd11e38c1bea12ec51299d547557112784f762f 0010-ARM-dts-exynos-n710x-add-leds.patch
56b08a9b72760f26cdbda9f89875ee4b502dca4d9dd15bf33c8ed1cda82cf75c9588514a378fd2e942a41e52378348cc8e55da303660cce59bf8a12287568daf 0011-drm-Allow-DRM_IOCTL_MODE_CREATE_DUMB-on-render-nodes.patch
aaff0332b90e1f9f62de1128cace934717336e54ab09de46477369fa808302482d97334e43a85ee8597c1bcab64d3484750103559fea2ce8cd51776156bf7591 initramfs.list
09f1f214a24300696809727a7b04378887c06ca6f40803ca51a12bf2176a360b2eb8632139d6a0722094e05cb2038bdb04018a1e3d33fc2697674552ade03bee init
"