sna: Compilation fixes for stable distros
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
7a371f6bef
commit
d1bf75f155
|
|
@ -140,6 +140,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
|
|||
#define LOCAL_I915_PARAM_HAS_WT 27
|
||||
#define LOCAL_I915_PARAM_MMAP_VERSION 30
|
||||
|
||||
#define LOCAL_I915_EXEC_BLT (2<<0)
|
||||
#define LOCAL_I915_EXEC_IS_PINNED (1<<10)
|
||||
#define LOCAL_I915_EXEC_NO_RELOC (1<<11)
|
||||
#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12)
|
||||
|
|
@ -1399,7 +1400,7 @@ static bool test_can_blt_y(struct kgem *kgem)
|
|||
memset(&execbuf, 0, sizeof(execbuf));
|
||||
execbuf.buffers_ptr = (uintptr_t)&object;
|
||||
execbuf.buffer_count = 1;
|
||||
execbuf.flags = I915_EXEC_BLT;
|
||||
execbuf.flags = LOCAL_I915_EXEC_BLT;
|
||||
|
||||
ret = do_ioctl(kgem->fd,
|
||||
DRM_IOCTL_I915_GEM_EXECBUFFER2,
|
||||
|
|
|
|||
|
|
@ -5216,11 +5216,23 @@ static inline void sigio_unblock(int was_blocked)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void enable_fb_access(ScrnInfoPtr scrn, int state)
|
||||
{
|
||||
scrn->EnableDisableFBAccess(
|
||||
#ifdef XF86_HAS_SCRN_CONV
|
||||
scrn,
|
||||
#else
|
||||
scrn->scrnIndex,
|
||||
#endif
|
||||
state);
|
||||
}
|
||||
|
||||
|
||||
static void __restore_swcursor(ScrnInfoPtr scrn)
|
||||
{
|
||||
DBG(("%s: attempting to restore SW cursor\n", __FUNCTION__));
|
||||
scrn->EnableDisableFBAccess(scrn, FALSE);
|
||||
scrn->EnableDisableFBAccess(scrn, TRUE);
|
||||
enable_fb_access(scrn, FALSE);
|
||||
enable_fb_access(scrn, TRUE);
|
||||
|
||||
RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)__restore_swcursor,
|
||||
(WakeupHandlerProcPtr)NoopDDA,
|
||||
|
|
|
|||
|
|
@ -155,6 +155,20 @@ struct sna_dri2_event {
|
|||
static void sna_dri2_flip_event(struct sna_dri2_event *flip);
|
||||
inline static DRI2BufferPtr dri2_window_get_front(WindowPtr win);
|
||||
|
||||
static struct kgem_bo *
|
||||
__sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region,
|
||||
DRI2BufferPtr src, DRI2BufferPtr dst,
|
||||
unsigned flags);
|
||||
|
||||
inline static void
|
||||
__sna_dri2_copy_event(struct sna_dri2_event *info, unsigned flags)
|
||||
{
|
||||
info->bo = __sna_dri2_copy_region(info->sna, info->draw, NULL,
|
||||
info->back, info->front,
|
||||
flags);
|
||||
info->front->flags = info->back->flags;
|
||||
}
|
||||
|
||||
static int front_pitch(DrawablePtr draw)
|
||||
{
|
||||
DRI2BufferPtr buffer;
|
||||
|
|
@ -314,6 +328,7 @@ inline static DRI2BufferPtr dri2_window_get_front(WindowPtr win)
|
|||
}
|
||||
#else
|
||||
inline static void *dri2_window_get_front(WindowPtr win) { return NULL; }
|
||||
#define APPLY_DAMAGE 0
|
||||
#endif
|
||||
|
||||
#if DRI2INFOREC_VERSION < 6
|
||||
|
|
@ -537,7 +552,7 @@ sna_dri2_create_buffer(DrawablePtr draw,
|
|||
if (draw->type != DRAWABLE_PIXMAP)
|
||||
buffer = dri2_window_get_front((WindowPtr)draw);
|
||||
if (buffer == NULL)
|
||||
buffer = sna_pixmap_get_buffer(pixmap);
|
||||
buffer = (DRI2Buffer2Ptr)sna_pixmap_get_buffer(pixmap);
|
||||
if (buffer) {
|
||||
private = get_private(buffer);
|
||||
|
||||
|
|
@ -1231,15 +1246,6 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region,
|
|||
return bo;
|
||||
}
|
||||
|
||||
inline static void
|
||||
__sna_dri2_copy_event(struct sna_dri2_event *info, unsigned flags)
|
||||
{
|
||||
info->bo = __sna_dri2_copy_region(info->sna, info->draw, NULL,
|
||||
info->back, info->front,
|
||||
flags);
|
||||
info->front->flags = info->back->flags;
|
||||
}
|
||||
|
||||
static void
|
||||
sna_dri2_copy_region(DrawablePtr draw,
|
||||
RegionPtr region,
|
||||
|
|
@ -1727,7 +1733,7 @@ can_flip(struct sna * sna,
|
|||
if (sna_pixmap_get_buffer(pixmap) != front) {
|
||||
DBG(("%s: no, DRI2 drawable is no longer attached (old name=%d, new name=%d) to pixmap=%ld\n",
|
||||
__FUNCTION__, front->name,
|
||||
sna_pixmap_get_buffer(pixmap) ? ((DRI2BufferPtr)sna_pixmap_get_buffer(pixmap))->name : 0,
|
||||
sna_pixmap_get_buffer(pixmap) ? sna_pixmap_get_buffer(pixmap)->name : 0,
|
||||
pixmap->drawable.serialNumber));
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue