modesetting: Drop remaining old-xserver compatibility.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Eric Anholt 2014-08-26 11:22:02 -07:00
parent 7b0965a826
commit b84d25fd53
3 changed files with 3 additions and 24 deletions

View File

@ -295,10 +295,8 @@ ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
flag = (CARD32 *)data;
(*flag) = 0;
return TRUE;
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
case SUPPORTS_SERVER_FDS:
return TRUE;
#endif
default:
return FALSE;
}
@ -494,7 +492,7 @@ static void dispatch_dirty(ScreenPtr pScreen)
ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id);
if (ret == -EINVAL || ret == -ENOSYS) {
ms->dirty_enabled = FALSE;
DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, ms->damage);
DamageUnregister(ms->damage);
DamageDestroy(ms->damage);
ms->damage = NULL;
xf86DrvMsg(scrn->scrnIndex, X_INFO, "Disabling kernel dirty updates, not required.\n");
@ -1082,7 +1080,7 @@ CloseScreen(ScreenPtr pScreen)
modesettingPtr ms = modesettingPTR(pScrn);
if (ms->damage) {
DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, ms->damage);
DamageUnregister(ms->damage);
DamageDestroy(ms->damage);
ms->damage = NULL;
}

View File

@ -333,9 +333,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
crtc->x = x;
crtc->y = y;
crtc->rotation = rotation;
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,99,0,0)
crtc->transformPresent = FALSE;
#endif
}
output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
@ -360,10 +358,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
if (!xf86CrtcRotate(crtc)) {
goto done;
}
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,0,0,0)
crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
crtc->gamma_blue, crtc->gamma_size);
#endif
drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
@ -521,8 +517,7 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
drmModeRmFB(drmmode->fd, ppriv->fb_id);
}
if (drmmode_crtc->slave_damage) {
DamageUnregister(&crtc->randr_crtc->scanout_pixmap->drawable,
drmmode_crtc->slave_damage);
DamageUnregister(drmmode_crtc->slave_damage);
drmmode_crtc->slave_damage = NULL;
}
return TRUE;
@ -947,10 +942,8 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property)
static const xf86OutputFuncsRec drmmode_output_funcs = {
.dpms = drmmode_output_dpms,
.create_resources = drmmode_output_create_resources,
#ifdef RANDR_12_INTERFACE
.set_property = drmmode_output_set_property,
.get_property = drmmode_output_get_property,
#endif
.detect = drmmode_output_detect,
.mode_valid = drmmode_output_mode_valid,
@ -1195,10 +1188,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
pitch, drmmode->shadow_fb);
}
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0)
scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr;
#endif
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
@ -1395,11 +1384,9 @@ static void drmmode_load_palette(ScrnInfoPtr pScrn, int numColors,
}
/* Make the change through RandR */
#ifdef RANDR_12_INTERFACE
if (crtc->randr_crtc)
RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b);
else
#endif
crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256);
}
}

View File

@ -32,10 +32,6 @@
#include "libudev.h"
#endif
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
#define DamageUnregister(d, dd) DamageUnregister(dd)
#endif
struct dumb_bo {
uint32_t handle;
uint32_t size;
@ -62,9 +58,7 @@ typedef struct {
Bool shadow_enable;
void *shadow_fb;
#ifdef HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS
DevPrivateKeyRec pixmapPrivateKeyRec;
#endif
} drmmode_rec, *drmmode_ptr;
typedef struct {