The server will always have it.
---
 hw/xfree86/drivers/modesetting/driver.c          | 12 ------------
 hw/xfree86/drivers/modesetting/drmmode_display.c | 17 +----------------
 hw/xfree86/drivers/modesetting/drmmode_display.h |  7 -------
 3 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/driver.c 
b/hw/xfree86/drivers/modesetting/driver.c
index d99b027..4c614fd 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -501,7 +501,6 @@ static void dispatch_dirty(ScreenPtr pScreen)
     }
 }
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 static void dispatch_dirty_crtc(ScrnInfoPtr scrn, xf86CrtcPtr crtc)
 {
     modesettingPtr ms = modesettingPTR(scrn);
@@ -535,7 +534,6 @@ static void dispatch_slave_dirty(ScreenPtr pScreen)
        dispatch_dirty_crtc(scrn, crtc);
     }
 }
-#endif
 
 static void msBlockHandler(BLOCKHANDLER_ARGS_DECL)
 {
@@ -545,11 +543,9 @@ static void msBlockHandler(BLOCKHANDLER_ARGS_DECL)
     pScreen->BlockHandler = ms->BlockHandler;
     pScreen->BlockHandler(BLOCKHANDLER_ARGS);
     pScreen->BlockHandler = msBlockHandler;
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     if (pScreen->isGPU)
         dispatch_slave_dirty(pScreen);
     else
-#endif
     if (ms->dirty_enabled)
         dispatch_dirty(pScreen);
 }
@@ -686,7 +682,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
 
     ms->drmmode.fd = ms->fd;
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     pScrn->capabilities = 0;
 #ifdef DRM_CAP_PRIME
     ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value);
@@ -695,7 +690,6 @@ PreInit(ScrnInfoPtr pScrn, int flags)
             pScrn->capabilities |= RR_Capability_SinkOutput;
     }
 #endif
-#endif
     drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp);
     if (defaultdepth == 24 && defaultbpp == 24)
            bppflags = SupportConvert32to24 | Support24bppFb;
@@ -877,7 +871,6 @@ msShadowInit(ScreenPtr pScreen)
     return TRUE;
 }
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 static Bool
 msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
 {
@@ -894,7 +887,6 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
 
     return TRUE;
 }
-#endif
 
 static Bool
 SetMaster(ScrnInfoPtr pScrn)
@@ -950,12 +942,10 @@ ScreenInit(SCREEN_INIT_ARGS_DECL)
     if (!miSetPixmapDepths())
        return FALSE;
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     if (!dixRegisterScreenSpecificPrivateKey(pScreen, 
&ms->drmmode.pixmapPrivateKeyRec,
         PRIVATE_PIXMAP, sizeof(msPixmapPrivRec))) { 
        return FALSE;
     }
-#endif
 
     pScrn->memPhysBase = 0;
     pScrn->fbOffset = 0;
@@ -1015,9 +1005,7 @@ ScreenInit(SCREEN_INIT_ARGS_DECL)
     ms->BlockHandler = pScreen->BlockHandler;
     pScreen->BlockHandler = msBlockHandler;
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     pScreen->SetSharedPixmapBacking = msSetSharedPixmapBacking;
-#endif
 
     if (!xf86CrtcScreenInit(pScreen))
        return FALSE;
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index c533324..6964e93 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -142,7 +142,6 @@ static int dumb_bo_destroy(int fd, struct dumb_bo *bo)
        return 0;
 }
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 static struct dumb_bo *dumb_get_bo_from_handle(int fd, int handle, int pitch, 
int size)
 {
        struct dumb_bo *bo;
@@ -161,9 +160,7 @@ static struct dumb_bo *dumb_get_bo_from_handle(int fd, int 
handle, int pitch, in
        bo->size = size;
        return bo;
 }
-#endif
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 Bool drmmode_SetSlaveBO(PixmapPtr ppix,
                        drmmode_ptr drmmode, 
                        int fd_handle, int pitch, int size)
@@ -177,7 +174,6 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix,
        close(fd_handle);
        return TRUE;
 }
-#endif
 
 static void
 drmmode_ConvertFromKMode(ScrnInfoPtr   scrn,
@@ -379,14 +375,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
                drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
 
                fb_id = drmmode->fb_id;
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
                if (crtc->randr_crtc->scanout_pixmap) {
                        msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, 
crtc->randr_crtc->scanout_pixmap);
                        fb_id = ppriv->fb_id;
                        x = y = 0;
-               } else 
-#endif
-               if (drmmode_crtc->rotate_fb_id) {
+               } else if (drmmode_crtc->rotate_fb_id) {
                        fb_id = drmmode_crtc->rotate_fb_id;
                        x = y = 0;
                }
@@ -521,7 +514,6 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, 
uint16_t *green,
                            size, red, green, blue);
 }
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 static Bool
 drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
 {
@@ -566,7 +558,6 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix)
        }
        return TRUE;
 }
-#endif
 
 static void *drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 {
@@ -590,9 +581,7 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
 
     .gamma_set = drmmode_crtc_gamma_set,
     .destroy = NULL, /* XXX */
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     .set_scanout_pixmap = drmmode_set_scanout_pixmap,
-#endif
     .shadow_allocate = drmmode_shadow_allocate,
     .shadow_create = drmmode_shadow_create,
 };
@@ -1032,10 +1021,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr 
drmmode, int num, int *num_dv
        /* need to do smart conversion here for compat with non-kms ATI driver 
*/
        if (koutput->connector_type >= MS_ARRAY_SIZE(output_names))
                snprintf(name, 32, "Unknown-%d", koutput->connector_type_id - 
1);
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
        else if (pScrn->is_gpu)
                snprintf(name, 32, "%s-%d-%d", 
output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 
1, koutput->connector_type_id - 1);
-#endif
        else
                snprintf(name, 32, "%s-%d", 
output_names[koutput->connector_type], koutput->connector_type_id - 1);
 
@@ -1549,7 +1536,6 @@ void *drmmode_map_front_bo(drmmode_ptr drmmode)
        
 }
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 void *drmmode_map_slave_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv)
 {
         int ret;
@@ -1563,7 +1549,6 @@ void *drmmode_map_slave_bo(drmmode_ptr drmmode, 
msPixmapPrivPtr ppriv)
 
         return ppriv->backing_bo->ptr;  
 }
-#endif
 
 Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 {
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h 
b/hw/xfree86/drivers/modesetting/drmmode_display.h
index 745c484..1954abf 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -32,11 +32,6 @@
 #include "libudev.h"
 #endif
 
-/* the perfect storm */
-#if XF86_CRTC_VERSION >= 5 && defined(HAVE_DRMPRIMEFDTOHANDLE) && 
HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS
-#define MODESETTING_OUTPUT_SLAVE_SUPPORT 1
-#endif
-
 #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
 #define DamageUnregister(d, dd) DamageUnregister(dd)
 #endif
@@ -103,7 +98,6 @@ typedef struct {
     int enc_clone_mask;
 } drmmode_output_private_rec, *drmmode_output_private_ptr;
 
-#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
 typedef struct _msPixmapPriv {
     uint32_t fb_id;
     struct dumb_bo *backing_bo; /* if this pixmap is backed by a dumb bo */
@@ -119,7 +113,6 @@ void *drmmode_map_slave_bo(drmmode_ptr drmmode, 
msPixmapPrivPtr ppriv);
 Bool drmmode_SetSlaveBO(PixmapPtr ppix,
                        drmmode_ptr drmmode,
                        int fd_handle, int pitch, int size);
-#endif
 
 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);
-- 
2.1.0

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to