Module: Mesa
Branch: main
Commit: 6bf4ae002aa252824ee3c80e485b16ae1ffd73a4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6bf4ae002aa252824ee3c80e485b16ae1ffd73a4

Author: Danylo Piliaiev <[email protected]>
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 <[email protected]>
Reviewed-by: Antonio Caggiano <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16406>

---

 src/tool/pps/pps_device.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
    }
 

Reply via email to