[PATCH xf86-video-amdgpu] Use DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags when available
Michel Dänzer
michel at daenzer.net
Thu Nov 24 02:41:07 UTC 2016
On 23/11/16 02:01 AM, Emil Velikov wrote:
> Hi Michel,
>
> On 22 November 2016 at 07:58, Michel Dänzer <michel at daenzer.net> wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> (Ported from radeon commit 1106b2f773ad0611c729b27f4c192a26b43ef1e7)
>>
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>> ---
>
>> +static Bool drmmode_probe_page_flip_target(AMDGPUEntPtr pAMDGPUEnt)
>> +{
>> +#ifdef DRM_CAP_PAGE_FLIP_TARGET
>> + uint64_t cap_value;
>> +
>> + return drmGetCap(pAMDGPUEnt->fd, DRM_CAP_PAGE_FLIP_TARGET,
>> + &cap_value) == 0 && cap_value != 0;
>> +#else
>> + return FALSE;
>> +#endif
> Since the ABI is already set, it would be better to add a fallback
> define and always use drmGetCap. The latter will (should?) return !=
> 0, thus things will work as expected.
> Atm there's a hidden dependency on DRM_CAP_PAGE_FLIP_TARGET aware
> libdrm(?). Without the above one will need to rebuild the DDX after
> updating libdrm.
Thanks for your suggestions. Actually, xf86-video-amdgpu already
requires libdrm >= 2.4.72 at build time, so I can just drop the
preprocessor guards in this patch. I might apply your suggestions to
xf86-video-ati though (or I might just bump the libdrm requirement there
as well).
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the amd-gfx
mailing list