[PATCH] modesetting: add support for background none.

Jasper St. Pierre jstpierre at mecheye.net
Tue Mar 8 17:56:23 UTC 2016


As mentioned in the original email, it relies on this series:

https://lists.x.org/archives/xorg-devel/2016-February/048758.html

On Tue, Mar 8, 2016 at 9:41 AM, Adam Jackson <ajax at nwnk.net> wrote:
> 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
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel



-- 
  Jasper


More information about the xorg-devel mailing list