device->master_fd = master_fd;
device->local_fd = fd;
- device->drm_device = fd_device_new_dup(fd);
- if (!device->drm_device) {
- if (instance->debug_flags & TU_DEBUG_STARTUP)
- tu_logi("Could not create the libdrm device");
- result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED,
- "could not create the libdrm device");
- goto fail;
- }
-
if (tu_drm_query_param(device, MSM_PARAM_GPU_ID, &val)) {
if (instance->debug_flags & TU_DEBUG_STARTUP)
tu_logi("Could not query the GPU ID");
return VK_SUCCESS;
fail:
- if (device->drm_device)
- fd_device_del(device->drm_device);
close(fd);
if (master_fd != -1)
close(master_fd);
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_intel.h>
-#include "drm/freedreno_ringbuffer.h"
#include "tu_entrypoints.h"
#define MAX_VBS 32
int local_fd;
int master_fd;
- struct fd_device *drm_device;
unsigned gpu_id;
uint32_t gmem_size;