diff options
author | Dave Airlie <airlied@redhat.com> | 2012-07-04 20:41:03 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-04 20:41:03 +0100 |
commit | 825ee74b5de8cb8bee5d7d082753a28009602c24 (patch) | |
tree | 97d8f34d577157cc0d5f79a11e4c58b3e96f9cfd | |
parent | 151df9d5e28fe0e5f6463979e812b6b705f1ed94 (diff) |
port to keithp's new APIprime-privates
-rw-r--r-- | src/driver.c | 7 | ||||
-rw-r--r-- | src/drmmode_display.c | 8 | ||||
-rw-r--r-- | src/drmmode_display.h | 3 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/driver.c b/src/driver.c index 4e2cfa0..9f57046 100644 --- a/src/driver.c +++ b/src/driver.c @@ -64,8 +64,6 @@ #define DRM_CAP_DUMB_PREFER_SHADOW 4 #endif -DevPrivateKeyRec msPixmapPrivateKeyRec; - static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y); static Bool CloseScreen(ScreenPtr pScreen); static Bool EnterVT(ScrnInfoPtr pScrn); @@ -426,7 +424,7 @@ static void dispatch_dirty_crtc(ScrnInfoPtr scrn, xf86CrtcPtr crtc) modesettingPtr ms = modesettingPTR(scrn); ScreenPtr pScreen = scrn->pScreen; PixmapPtr pixmap = crtc->randr_crtc->scanout_pixmap; - msPixmapPrivPtr ppriv = msGetPixmapPriv(pixmap); + msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, pixmap); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; DamagePtr damage = drmmode_crtc->slave_damage; int fb_id = ppriv->fb_id; @@ -778,7 +776,8 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv) if (!miSetPixmapDepths()) return FALSE; - if (!dixRegisterPrivateKey(&msPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(msPixmapPrivRec))) { + if (!dixRegisterScreenSpecificPrivateKey(pScreen, &ms->drmmode.pixmapPrivateKeyRec, + PRIVATE_PIXMAP, sizeof(msPixmapPrivRec))) { return FALSE; } diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 61aabef..4083635 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -163,7 +163,7 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix, int fd_handle, int pitch, int size) { ScreenPtr screen = ppix->drawable.pScreen; - msPixmapPrivPtr ppriv = msGetPixmapPriv(ppix); + msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); ppriv->backing_bo = dumb_get_bo_from_handle(drmmode->fd, fd_handle, pitch, size); if (!ppriv->backing_bo) @@ -375,7 +375,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, fb_id = drmmode->fb_id; if (crtc->randr_crtc->scanout_pixmap) { - msPixmapPrivPtr ppriv = msGetPixmapPriv(crtc->randr_crtc->scanout_pixmap); + msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, crtc->randr_crtc->scanout_pixmap); fb_id = ppriv->fb_id; x = y = 0; } else if (drmmode_crtc->rotate_fb_id) { @@ -505,7 +505,7 @@ drmmode_set_slave_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) if (!ppix) { if (crtc->randr_crtc->scanout_pixmap) { - ppriv = msGetPixmapPriv(crtc->randr_crtc->scanout_pixmap); + ppriv = msGetPixmapPriv(drmmode, crtc->randr_crtc->scanout_pixmap); drmModeRmFB(drmmode->fd, ppriv->fb_id); } if (drmmode_crtc->slave_damage) { @@ -516,7 +516,7 @@ drmmode_set_slave_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) return TRUE; } - ppriv = msGetPixmapPriv(ppix); + ppriv = msGetPixmapPriv(drmmode, ppix); if (!drmmode_crtc->slave_damage) { drmmode_crtc->slave_damage = DamageCreate(NULL, NULL, DamageReportNone, diff --git a/src/drmmode_display.h b/src/drmmode_display.h index fac6c28..32a5592 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -58,6 +58,7 @@ typedef struct { Bool shadow_enable; void *shadow_fb; + DevPrivateKeyRec pixmapPrivateKeyRec; } drmmode_rec, *drmmode_ptr; typedef struct { @@ -101,7 +102,7 @@ typedef struct _msPixmapPriv { extern DevPrivateKeyRec msPixmapPrivateKeyRec; #define msPixmapPrivateKey (&msPixmapPrivateKeyRec) -#define msGetPixmapPriv(p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, msPixmapPrivateKey)) +#define msGetPixmapPriv(drmmode, p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &(drmmode)->pixmapPrivateKeyRec)) extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y, int flags); |