summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-10-26 18:02:20 -0700
committerEric Anholt <[email protected]>2018-11-27 15:03:02 -0800
commite113b21cb77976eb527373b50c03235448a83f51 (patch)
treefe8077d334411054f83733ff70c3f8b222da4534 /src/gallium/winsys
parent55edafa73eccbb0cd04f5203dd47bc0840eda956 (diff)
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.
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/v3d/drm/v3d_drm_public.h2
-rw-r--r--src/gallium/winsys/v3d/drm/v3d_drm_winsys.c8
2 files changed, 9 insertions, 1 deletions
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);
}