diff --git a/.pick_status.json b/.pick_status.json index 847613ebea4..931f5216314 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1044,7 +1044,7 @@ "description": "panvk: Free drm device in can_present_on_device", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "08da41f2f198571d7aac23c75bcf076517047226", "notes": null diff --git a/src/panfrost/vulkan/panvk_wsi.c b/src/panfrost/vulkan/panvk_wsi.c index cabb90d14c4..680d7adaf9c 100644 --- a/src/panfrost/vulkan/panvk_wsi.c +++ b/src/panfrost/vulkan/panvk_wsi.c @@ -50,7 +50,11 @@ panvk_can_present_on_device(VkPhysicalDevice pdevice, int fd) return false; /* Allow on-device presentation for all devices with bus type PLATFORM. * Other device types such as PCI or USB should use the PRIME blit path. */ - return device->bustype == DRM_BUS_PLATFORM; + bool match = device->bustype == DRM_BUS_PLATFORM; + + drmFreeDevice(&device); + + return match; } VkResult