[PATCH v2 2/6] modesetting: Use a gbm buffer for shadow if we are using glamor

Jason Ekstrand jason at jlekstrand.net
Thu Jan 8 20:30:12 PST 2015


On Thu, Jan 8, 2015 at 2:10 PM, Keith Packard <keithp at keithp.com> wrote:

> Jason Ekstrand <jason at jlekstrand.net> writes:
>
> > +    old_shadow = drmmode->shadow_bo;
> >
> >      if (!drmmode_create_bo(drmmode, &drmmode->front_bo,
> >                             width, height, scrn->bitsPerPixel))
> > @@ -1218,13 +1219,9 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int
> width, int height)
> >      }
> >
> >      if (drmmode->shadow_enable) {
> > -        uint32_t size = scrn->displayWidth * scrn->virtualY *
> > -            ((scrn->bitsPerPixel + 7) >> 3);
> > -        new_pixels = calloc(1, size);
> > -        if (new_pixels == NULL)
> > +        if (!drmmode_create_bo(drmmode, &drmmode->shadow_bo,
> > +                               width, height, scrn->bitsPerPixel))
> >              goto fail;
> > -        free(drmmode->shadow_fb);
> > -        drmmode->shadow_fb = new_pixels;
> >      }
>
> I don't see the old shadow_bo getting freed anywhere; did I miss
> something?
>

The real answer is that, as far as I can tell, this code shouldn't be
touching the shadow and the shadow shouldn't be in the drmmode structure at
all.  Unless I'm competely missing everything, shadows should be per-crtc.
If that's correct, then the modesetting driver's shadow handling is just
completely bogus.  I'm reworking things again.

This patch series just keeps getting longer...


>
> The rest of this patch looks good and is
>
> Reviewed-by: Keith Packard <keithp at keithp.com>
>
> --
> -keith
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150108/ff93f24a/attachment.html>


More information about the xorg-devel mailing list