Mesa (staging/22.0): pps: Open writable renderer node in DrmDevice::create

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 13 17:04:18 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: 5011970ff3991a27b4853b6d6f56559fd7619c43
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5011970ff3991a27b4853b6d6f56559fd7619c43

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Mon May  9 20:28:28 2022 +0300

pps: Open writable renderer node in DrmDevice::create

DrmDevice::create_all correctly opened the node with O_RDWR, while
DrmDevice::create was not, causing failure to create writable buffer.

Fixes pps-config on Freedreno.

Fixes: 1cc72b2aef82373247466c2e7b81970c867ad0fa
("pps: Gfx-pps v0.3.0")

Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano at collabora.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16406>
(cherry picked from commit 6bf4ae002aa252824ee3c80e485b16ae1ffd73a4)

---

 .pick_status.json          | 2 +-
 src/tool/pps/pps_device.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 8b2a3a61803..2973f86f394 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1420,7 +1420,7 @@
         "description": "pps: Open writable renderer node in DrmDevice::create",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": "1cc72b2aef82373247466c2e7b81970c867ad0fa"
     },
     {
diff --git a/src/tool/pps/pps_device.cc b/src/tool/pps/pps_device.cc
index c06ae1e336c..908aabfc15b 100644
--- a/src/tool/pps/pps_device.cc
+++ b/src/tool/pps/pps_device.cc
@@ -101,7 +101,7 @@ std::optional<DrmDevice> DrmDevice::create(int32_t gpu_num)
 
    if (num_devices > 0 && gpu_num < num_devices) {
       drmDevicePtr device = devices[gpu_num];
-      int fd = open(device->nodes[DRM_NODE_RENDER], O_RDONLY);
+      int fd = open(device->nodes[DRM_NODE_RENDER], O_RDWR);
       ret = create_drm_device(fd, gpu_num);
    }
 



More information about the mesa-commit mailing list