freedreno: fix HAVE_FREEDRENO_KGSL check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>
This commit is contained in:
Eric Engestrom
2019-06-25 09:17:35 +01:00
committed by Marge Bot
parent 55731f1d25
commit 0f0dac0f65

View File

@@ -34,7 +34,7 @@
#include "freedreno_priv.h"
struct fd_device *msm_device_new(int fd, drmVersionPtr version);
#if HAVE_FREEDRENO_VIRTIO
#ifdef HAVE_FREEDRENO_VIRTIO
struct fd_device *virtio_device_new(int fd, drmVersionPtr version);
#endif
@@ -60,7 +60,7 @@ fd_device_new(int fd)
}
dev = msm_device_new(fd, version);
#if HAVE_FREEDRENO_VIRTIO
#ifdef HAVE_FREEDRENO_VIRTIO
} else if (!strcmp(version->name, "virtio_gpu")) {
DEBUG_MSG("virtio_gpu DRM device");
dev = virtio_device_new(fd, version);
@@ -122,7 +122,7 @@ fd_device_open(void)
int fd;
fd = drmOpenWithType("msm", NULL, DRM_NODE_RENDER);
#if HAVE_FREEDRENO_VIRTIO
#ifdef HAVE_FREEDRENO_VIRTIO
if (fd < 0)
fd = drmOpenWithType("virtio_gpu", NULL, DRM_NODE_RENDER);
#endif