xserver: fix build with glamor disabled.
This fixes modesetting when glamor is disabled. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
3703c88ac1
commit
e3624aa5fd
|
@ -1000,6 +1000,7 @@ msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle)
|
|||
static Bool
|
||||
msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
|
||||
{
|
||||
#ifdef GLAMOR
|
||||
ScreenPtr screen = ppix->drawable.pScreen;
|
||||
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
|
||||
modesettingPtr ms = modesettingPTR(scrn);
|
||||
|
@ -1020,6 +1021,9 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
|
|||
return ret;
|
||||
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
|
|
@ -146,6 +146,7 @@ drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo,
|
|||
Bool
|
||||
drmmode_bo_for_pixmap(drmmode_ptr drmmode, drmmode_bo *bo, PixmapPtr pixmap)
|
||||
{
|
||||
#ifdef GLAMOR
|
||||
ScreenPtr screen = xf86ScrnToScreen(drmmode->scrn);
|
||||
uint16_t pitch;
|
||||
uint32_t size;
|
||||
|
@ -165,9 +166,9 @@ drmmode_bo_for_pixmap(drmmode_ptr drmmode, drmmode_bo *bo, PixmapPtr pixmap)
|
|||
"Failed to get fd for flip to new front.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bo->dumb = dumb_get_bo_from_fd(drmmode->fd, fd, pitch, size);
|
||||
close(fd);
|
||||
#endif
|
||||
|
||||
return bo->dumb != NULL;
|
||||
}
|
||||
|
|
|
@ -641,8 +641,8 @@ static present_screen_info_rec ms_present_screen_info = {
|
|||
.flush = ms_present_flush,
|
||||
|
||||
.capabilities = PresentCapabilityNone,
|
||||
.check_flip = ms_present_check_flip,
|
||||
#ifdef GLAMOR
|
||||
.check_flip = ms_present_check_flip,
|
||||
.flip = ms_present_flip,
|
||||
.unflip = ms_present_unflip,
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user