Skip to content

Commit

Permalink
Use get_gpu_type to detect ivshmem device
Browse files Browse the repository at this point in the history
Tracked-On: OAM-127906
Signed-off-by: Weifeng Liu <[email protected]>
  • Loading branch information
phreer committed Nov 29, 2024
1 parent 1c70a8d commit 30cbaec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cros_gralloc/cros_gralloc_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int32_t cros_gralloc_driver::reload()
}

drmFreeVersion(version);
if (!isVirtioGpuPciDevice(fd)) {
if (get_gpu_type(fd) == GPU_GRP_TYPE_VIRTIO_GPU_IVSHMEM_IDX) {
drv_logi("New added node is virtio-ivishmem node");
gpu_grp_type_ |= GPU_GRP_TYPE_HAS_VIRTIO_GPU_IVSHMEM_BIT;
struct driver *drv = drv_create(fd, gpu_grp_type_);
Expand Down

0 comments on commit 30cbaec

Please sign in to comment.