From e113b21cb77976eb527373b50c03235448a83f51 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 26 Oct 2018 18:02:20 -0700 Subject: v3d: Add renderonly support. I've been using this with the kmsro series to test v3d on VKMS without my old KMS hack in the v3d kernel driver. KMSRO still needs some cleanup, but v3d RO support seems reasonable. --- src/gallium/winsys/v3d/drm/v3d_drm_public.h | 2 ++ src/gallium/winsys/v3d/drm/v3d_drm_winsys.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gallium/winsys/v3d') diff --git a/src/gallium/winsys/v3d/drm/v3d_drm_public.h b/src/gallium/winsys/v3d/drm/v3d_drm_public.h index 46aed9d4e18..1813825436b 100644 --- a/src/gallium/winsys/v3d/drm/v3d_drm_public.h +++ b/src/gallium/winsys/v3d/drm/v3d_drm_public.h @@ -25,7 +25,9 @@ #define __VC5_DRM_PUBLIC_H__ struct pipe_screen; +struct renderonly; struct pipe_screen *v3d_drm_screen_create(int drmFD); +struct pipe_screen *v3d_drm_screen_create_renderonly(struct renderonly *ro); #endif /* __VC5_DRM_PUBLIC_H__ */ diff --git a/src/gallium/winsys/v3d/drm/v3d_drm_winsys.c b/src/gallium/winsys/v3d/drm/v3d_drm_winsys.c index 63b7a5717f5..a4786068bba 100644 --- a/src/gallium/winsys/v3d/drm/v3d_drm_winsys.c +++ b/src/gallium/winsys/v3d/drm/v3d_drm_winsys.c @@ -31,5 +31,11 @@ struct pipe_screen * v3d_drm_screen_create(int fd) { - return v3d_screen_create(fcntl(fd, F_DUPFD_CLOEXEC, 3)); + return v3d_screen_create(fcntl(fd, F_DUPFD_CLOEXEC, 3), NULL); +} + +struct pipe_screen * +v3d_drm_screen_create_renderonly(struct renderonly *ro) +{ + return v3d_screen_create(fcntl(ro->gpu_fd, F_DUPFD_CLOEXEC, 3), ro); } -- cgit v1.2.3