From 6bf4ae002aa252824ee3c80e485b16ae1ffd73a4 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Mon, 9 May 2022 20:28:28 +0300 Subject: [PATCH] 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 Reviewed-by: Antonio Caggiano Reviewed-by: Rob Clark Part-of: --- 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 c06ae1e..908aabf 100644 --- a/src/tool/pps/pps_device.cc +++ b/src/tool/pps/pps_device.cc @@ -101,7 +101,7 @@ std::optional 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); } -- 2.7.4