<p dir="ltr">Is it necessary to keep dri3? AFAIK there hasn't been a release with it...</p>
<div class="gmail_quote">On Aug 10, 2015 3:05 AM, "Michel Dänzer" <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 09.08.2015 17:11, Mario Kleiner wrote:<br>
> Add Option "DRI" to allow selection of maximum DRI level.<br>
><br>
> This allows the user to select the maximum level of DRI<br>
> implementation to use, DRI2 or DRI3. It replaces the old<br>
> option "DRI3" which had exactly the same purpose, but<br>
> differs from the method used in both intel ddx and nouveau ddx.<br>
> Make this consistent before a new stable driver is released.<br>
<br>
Thanks for this. The following applies to the amdgpu patch as well:<br>
<br>
First of all, I think Option "DRI3" should continue working for<br>
backwards compatibility with existing configurations. It doesn't need to<br>
be documented anymore though.<br>
<br>
<br>
> @@ -1517,7 +1517,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)<br>
> RADEONInfoPtr info = RADEONPTR(pScrn);<br>
> int subPixelOrder = SubPixelUnknown;<br>
> MessageType from;<br>
> - Bool value;<br>
> + int value;<br>
> const char *s;<br>
> void *front_ptr;<br>
><br>
> @@ -1628,13 +1628,13 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)<br>
> }<br>
> #endif<br>
><br>
> - value = FALSE;<br>
> - if (xf86GetOptValBool(info->Options, OPTION_DRI3, &value))<br>
> + value = 2;<br>
> + if (xf86GetOptValInteger(info->Options, OPTION_DRI, &value))<br>
> from = X_CONFIG;<br>
> else<br>
> from = X_DEFAULT;<br>
><br>
> - if (value) {<br>
> + if (value >= 3) {<br>
> value = radeon_sync_init(pScreen) &&<br>
> radeon_present_screen_init(pScreen) &&<br>
> radeon_dri3_screen_init(pScreen);<br>
> @@ -1642,6 +1642,9 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)<br>
> if (!value)<br>
> from = X_WARNING;<br>
> }<br>
> + else<br>
> + value = 0;<br>
> +<br>
> xf86DrvMsg(pScrn->scrnIndex, from, "DRI3 %sabled\n", value ? "en" : "dis");<br>
><br>
> pScrn->vtSema = TRUE;<br>
><br>
<br>
This mixture of treating 'value' as an integer and as a boolean is a bit<br>
ugly. To keep Option "DRI3" working, it's probably better to keep the<br>
Bool variable and add an int one:<br>
<br>
1. Initialize Bool variable to FALSE<br>
2. xf86GetOptValBool(info->Options, OPTION_DRI3, &<Bool variable>)<br>
3. xf86GetOptValInteger(info->Options, OPTION_DRI, &<int variable>),<br>
set Bool variable = <int variable> == 3.<br>
<br>
In 3. it might be safer to ignore values other than 3 or 2, but I'm fine<br>
either way.<br>
<br>
<br>
--<br>
Earthling Michel Dänzer | <a href="http://www.amd.com" rel="noreferrer" target="_blank">http://www.amd.com</a><br>
Libre software enthusiast | Mesa and X developer<br>
</blockquote></div>