summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-30 00:25:37 -0800
committerEric Anholt <eric@anholt.net>2014-08-21 15:31:43 -0700
commit91c775f200c615dce9712d41235dc26629e66374 (patch)
treeda7a1ba1efa69467c1a6273a33c8ecb71c62a230
parenta2cc54370a2c63ac38440f9d3e2826f4a2f08d01 (diff)
Export two functions I want to reuse from Present.
-rw-r--r--src/drmmode_display.c7
-rw-r--r--src/drmmode_display.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 6134897..2f1cfa0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -122,7 +122,8 @@ static int dumb_bo_unmap(int fd, struct dumb_bo *bo)
}
#endif
-static int dumb_bo_destroy(int fd, struct dumb_bo *bo)
+int
+dumb_bo_destroy(int fd, struct dumb_bo *bo)
{
struct drm_mode_destroy_dumb arg;
int ret;
@@ -142,8 +143,8 @@ static int dumb_bo_destroy(int fd, struct dumb_bo *bo)
return 0;
}
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
-static struct dumb_bo *
+#ifdef HAVE_DRMPRIMEFDTOHANDLE
+struct dumb_bo *
dumb_get_bo_from_fd(int drm_fd, int fd, int pitch, int size)
{
struct dumb_bo *bo;
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index f9eb79e..18a55a6 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -136,6 +136,8 @@ void *drmmode_map_front_bo(drmmode_ptr drmmode);
Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
void drmmode_free_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmmode, int *depth, int *bpp);
+struct dumb_bo *dumb_get_bo_from_fd(int drm_fd, int fd, int pitch, int size);
+int dumb_bo_destroy(int fd, struct dumb_bo *bo);
#ifndef DRM_CAP_DUMB_PREFERRED_DEPTH