modesetting: Export two functions I want to reuse from DRI2/Present.
This renames dumb_get_bo_from_handle(), since it wasn't using a handle (GEM terminology) but a dmabuf fd. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
34a98c8103
commit
7064b00d47
|
@ -116,7 +116,7 @@ dumb_bo_unmap(int fd, struct dumb_bo *bo)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
int
|
||||||
dumb_bo_destroy(int fd, struct dumb_bo *bo)
|
dumb_bo_destroy(int fd, struct dumb_bo *bo)
|
||||||
{
|
{
|
||||||
struct drm_mode_destroy_dumb arg;
|
struct drm_mode_destroy_dumb arg;
|
||||||
|
@ -137,8 +137,8 @@ dumb_bo_destroy(int fd, struct dumb_bo *bo)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dumb_bo *
|
struct dumb_bo *
|
||||||
dumb_get_bo_from_handle(int fd, int handle, int pitch, int size)
|
dumb_get_bo_from_fd(int fd, int handle, int pitch, int size)
|
||||||
{
|
{
|
||||||
struct dumb_bo *bo;
|
struct dumb_bo *bo;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -164,7 +164,7 @@ drmmode_SetSlaveBO(PixmapPtr ppix,
|
||||||
msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix);
|
msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix);
|
||||||
|
|
||||||
ppriv->backing_bo =
|
ppriv->backing_bo =
|
||||||
dumb_get_bo_from_handle(drmmode->fd, fd_handle, pitch, size);
|
dumb_get_bo_from_fd(drmmode->fd, fd_handle, pitch, size);
|
||||||
if (!ppriv->backing_bo)
|
if (!ppriv->backing_bo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,9 @@ Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode);
|
||||||
void drmmode_free_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,
|
void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmmode,
|
||||||
int *depth, int *bpp);
|
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
|
#ifndef DRM_CAP_DUMB_PREFERRED_DEPTH
|
||||||
#define DRM_CAP_DUMB_PREFERRED_DEPTH 3
|
#define DRM_CAP_DUMB_PREFERRED_DEPTH 3
|
||||||
|
|
Loading…
Reference in New Issue