[PATCH v6 10/11] modesetting: Disable Reverse PRIME for i915
Alex Goins
agoins at nvidia.com
Mon Jun 13 23:10:49 UTC 2016
Thanks for the feedback, Emil!
> IMHO the proposed patch does not sound like a reasonable long-term
> solution. Ideally the driver will expose a flag, based on which Xorg
> will enable/disable reverse prime. That said, as a short-term fix this
> is fine, barring the issues mentioned below.
I'll address this lower in the thread.
> > diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
> > index f7abd1e..403cb96 100644
> > --- a/hw/xfree86/drivers/modesetting/driver.c
> > +++ b/hw/xfree86/drivers/modesetting/driver.c
> > @@ -1378,9 +1378,13 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
> > xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
> > "Failed to initialize the Present extension.\n");
> > }
> > - /* enable reverse prime if we are a GPU screen, and accelerated */
> > - if (pScreen->isGPU)
> > - ms->drmmode.reverse_prime_offload_mode = TRUE;
> > + /* enable reverse prime if we are a GPU screen, and accelerated, and not
> > + * i915. i915 is happy scanning out from sysmem. */
> > + if (pScreen->isGPU) {
> > + drmVersionPtr version = drmGetVersion(ms->drmmode.fd);
> > + if (strncmp("i915", version->name, version->name_len))
> 'version' can be null.
>
> > + ms->drmmode.reverse_prime_offload_mode = TRUE;
> > + }
> We're leaking 'version'.
>
> Same two apply for the UDL patch.
>
> Regards,
> Emil
You're right, thanks for the catch. I have these fixed locally now, but I'll
wait a little while to see if there's any more feedback before sending out
another revision.
Thanks,
Alex
More information about the xorg-devel
mailing list