panvk: Free drm device in can_present_on_device

Fixes: 08da41f2f1 ("panvk: override can_present_on_device")
Signed-off-by: Kitlith <kitlith@kitl.pw>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39415>
This commit is contained in:
Kitlith 2026-01-20 11:55:25 -08:00 committed by Marge Bot
parent 6a1c8d3a0c
commit 4de41bf27d

View file

@ -33,7 +33,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