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:
parent
7b0965a826
commit
b84d25fd53
|
@ -295,10 +295,8 @@ ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
|
||||||
flag = (CARD32 *)data;
|
flag = (CARD32 *)data;
|
||||||
(*flag) = 0;
|
(*flag) = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
|
|
||||||
case SUPPORTS_SERVER_FDS:
|
case SUPPORTS_SERVER_FDS:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -494,7 +492,7 @@ static void dispatch_dirty(ScreenPtr pScreen)
|
||||||
ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id);
|
ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id);
|
||||||
if (ret == -EINVAL || ret == -ENOSYS) {
|
if (ret == -EINVAL || ret == -ENOSYS) {
|
||||||
ms->dirty_enabled = FALSE;
|
ms->dirty_enabled = FALSE;
|
||||||
DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, ms->damage);
|
DamageUnregister(ms->damage);
|
||||||
DamageDestroy(ms->damage);
|
DamageDestroy(ms->damage);
|
||||||
ms->damage = NULL;
|
ms->damage = NULL;
|
||||||
xf86DrvMsg(scrn->scrnIndex, X_INFO, "Disabling kernel dirty updates, not required.\n");
|
xf86DrvMsg(scrn->scrnIndex, X_INFO, "Disabling kernel dirty updates, not required.\n");
|
||||||
|
@ -1082,7 +1080,7 @@ CloseScreen(ScreenPtr pScreen)
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
|
|
||||||
if (ms->damage) {
|
if (ms->damage) {
|
||||||
DamageUnregister(&pScreen->GetScreenPixmap(pScreen)->drawable, ms->damage);
|
DamageUnregister(ms->damage);
|
||||||
DamageDestroy(ms->damage);
|
DamageDestroy(ms->damage);
|
||||||
ms->damage = NULL;
|
ms->damage = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,9 +333,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
|
||||||
crtc->x = x;
|
crtc->x = x;
|
||||||
crtc->y = y;
|
crtc->y = y;
|
||||||
crtc->rotation = rotation;
|
crtc->rotation = rotation;
|
||||||
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,99,0,0)
|
|
||||||
crtc->transformPresent = FALSE;
|
crtc->transformPresent = FALSE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
|
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)) {
|
if (!xf86CrtcRotate(crtc)) {
|
||||||
goto done;
|
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->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
|
||||||
crtc->gamma_blue, crtc->gamma_size);
|
crtc->gamma_blue, crtc->gamma_size);
|
||||||
#endif
|
|
||||||
|
|
||||||
drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
|
drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
|
||||||
|
|
||||||
|
@ -521,8 +517,7 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
|
||||||
drmModeRmFB(drmmode->fd, ppriv->fb_id);
|
drmModeRmFB(drmmode->fd, ppriv->fb_id);
|
||||||
}
|
}
|
||||||
if (drmmode_crtc->slave_damage) {
|
if (drmmode_crtc->slave_damage) {
|
||||||
DamageUnregister(&crtc->randr_crtc->scanout_pixmap->drawable,
|
DamageUnregister(drmmode_crtc->slave_damage);
|
||||||
drmmode_crtc->slave_damage);
|
|
||||||
drmmode_crtc->slave_damage = NULL;
|
drmmode_crtc->slave_damage = NULL;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -947,10 +942,8 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property)
|
||||||
static const xf86OutputFuncsRec drmmode_output_funcs = {
|
static const xf86OutputFuncsRec drmmode_output_funcs = {
|
||||||
.dpms = drmmode_output_dpms,
|
.dpms = drmmode_output_dpms,
|
||||||
.create_resources = drmmode_output_create_resources,
|
.create_resources = drmmode_output_create_resources,
|
||||||
#ifdef RANDR_12_INTERFACE
|
|
||||||
.set_property = drmmode_output_set_property,
|
.set_property = drmmode_output_set_property,
|
||||||
.get_property = drmmode_output_get_property,
|
.get_property = drmmode_output_get_property,
|
||||||
#endif
|
|
||||||
.detect = drmmode_output_detect,
|
.detect = drmmode_output_detect,
|
||||||
.mode_valid = drmmode_output_mode_valid,
|
.mode_valid = drmmode_output_mode_valid,
|
||||||
|
|
||||||
|
@ -1195,10 +1188,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
|
||||||
pitch, drmmode->shadow_fb);
|
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++) {
|
for (i = 0; i < xf86_config->num_crtc; i++) {
|
||||||
xf86CrtcPtr crtc = xf86_config->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 */
|
/* Make the change through RandR */
|
||||||
#ifdef RANDR_12_INTERFACE
|
|
||||||
if (crtc->randr_crtc)
|
if (crtc->randr_crtc)
|
||||||
RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b);
|
RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b);
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256);
|
crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,6 @@
|
||||||
#include "libudev.h"
|
#include "libudev.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
|
|
||||||
#define DamageUnregister(d, dd) DamageUnregister(dd)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct dumb_bo {
|
struct dumb_bo {
|
||||||
uint32_t handle;
|
uint32_t handle;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
|
@ -62,9 +58,7 @@ typedef struct {
|
||||||
Bool shadow_enable;
|
Bool shadow_enable;
|
||||||
void *shadow_fb;
|
void *shadow_fb;
|
||||||
|
|
||||||
#ifdef HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS
|
|
||||||
DevPrivateKeyRec pixmapPrivateKeyRec;
|
DevPrivateKeyRec pixmapPrivateKeyRec;
|
||||||
#endif
|
|
||||||
} drmmode_rec, *drmmode_ptr;
|
} drmmode_rec, *drmmode_ptr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user