[PATCH] modesetting: add support for background none.

Adam Jackson ajax at nwnk.net
Tue Mar 8 17:41:30 UTC 2016


On Wed, 2016-02-10 at 15:45 +1000, Dave Airlie wrote:

> From: Dave Airlie <airlied at redhat.com>
> 
> This adds support using glamor for background None.
> 
> loosely based off the amdgpu code. relies on the
> glamor_finish code.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>

NAK:

> +void
> +drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
> +{
> +    xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
> +    ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
> +    PixmapPtr src, dst;
> +    int fbcon_id = 0;
> +    GCPtr gc;
> +    int i;
> +
> +    for (i = 0; i < xf86_config->num_crtc; i++) {
> +        drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[i]->driver_private;
> +        if (drmmode_crtc->mode_crtc->buffer_id)
> +            fbcon_id = drmmode_crtc->mode_crtc->buffer_id;
> +    }
> +
> +    if (!fbcon_id)
> +        return;
> +
> +    if (fbcon_id == drmmode->fb_id) {
> +        /* in some rare case there might be no fbcon and we might already
> +         * be the one with the current fb to avoid a false deadlck in
> +         * kernel ttm code just do nothing as anyway there is nothing
> +         * to do
> +         */
> +        return;
> +    }
> +
> +    src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id);
> +    if (!src)
> +        return;
> +
> +    dst = pScreen->GetScreenPixmap(pScreen);
> +
> +    gc = GetScratchGC(pScrn->depth, pScreen);
> +    ValidateGC(&dst->drawable, gc);
> +
> +    (*gc->ops->CopyArea)(&src->drawable, &dst->drawable, gc, 0, 0,
> +                         pScrn->virtualX, pScrn->virtualY, 0, 0);
> +
> +    FreeScratchGC(gc);
> +
> +    glamor_finish(pScreen);

drmmode_display.c: In function 'drmmode_copy_fb':
drmmode_display.c:377:5: error: implicit declaration of function 'glamor_finish' [-Werror=implicit-function-declaration]
     glamor_finish(pScreen);

- ajax


More information about the xorg-devel mailing list