[PATCH xf86-video-ati] Make selection between DRI2 and DRI3 consistent with other drivers.
Ilia Mirkin
imirkin at alum.mit.edu
Mon Aug 10 05:15:08 PDT 2015
Is it necessary to keep dri3? AFAIK there hasn't been a release with it...
On Aug 10, 2015 3:05 AM, "Michel Dänzer" <michel at daenzer.net> wrote:
> On 09.08.2015 17:11, Mario Kleiner wrote:
> > Add Option "DRI" to allow selection of maximum DRI level.
> >
> > This allows the user to select the maximum level of DRI
> > implementation to use, DRI2 or DRI3. It replaces the old
> > option "DRI3" which had exactly the same purpose, but
> > differs from the method used in both intel ddx and nouveau ddx.
> > Make this consistent before a new stable driver is released.
>
> Thanks for this. The following applies to the amdgpu patch as well:
>
> First of all, I think Option "DRI3" should continue working for
> backwards compatibility with existing configurations. It doesn't need to
> be documented anymore though.
>
>
> > @@ -1517,7 +1517,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
> > RADEONInfoPtr info = RADEONPTR(pScrn);
> > int subPixelOrder = SubPixelUnknown;
> > MessageType from;
> > - Bool value;
> > + int value;
> > const char *s;
> > void *front_ptr;
> >
> > @@ -1628,13 +1628,13 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
> > }
> > #endif
> >
> > - value = FALSE;
> > - if (xf86GetOptValBool(info->Options, OPTION_DRI3, &value))
> > + value = 2;
> > + if (xf86GetOptValInteger(info->Options, OPTION_DRI, &value))
> > from = X_CONFIG;
> > else
> > from = X_DEFAULT;
> >
> > - if (value) {
> > + if (value >= 3) {
> > value = radeon_sync_init(pScreen) &&
> > radeon_present_screen_init(pScreen) &&
> > radeon_dri3_screen_init(pScreen);
> > @@ -1642,6 +1642,9 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
> > if (!value)
> > from = X_WARNING;
> > }
> > + else
> > + value = 0;
> > +
> > xf86DrvMsg(pScrn->scrnIndex, from, "DRI3 %sabled\n", value ? "en" :
> "dis");
> >
> > pScrn->vtSema = TRUE;
> >
>
> This mixture of treating 'value' as an integer and as a boolean is a bit
> ugly. To keep Option "DRI3" working, it's probably better to keep the
> Bool variable and add an int one:
>
> 1. Initialize Bool variable to FALSE
> 2. xf86GetOptValBool(info->Options, OPTION_DRI3, &<Bool variable>)
> 3. xf86GetOptValInteger(info->Options, OPTION_DRI, &<int variable>),
> set Bool variable = <int variable> == 3.
>
> In 3. it might be safer to ignore values other than 3 or 2, but I'm fine
> either way.
>
>
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Mesa and X developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-ati/attachments/20150810/a4ce253b/attachment.html>
More information about the xorg-driver-ati
mailing list