[Mesa-dev] [PATCH mesa 2/9] anv: Add KHR_display extension to anv [v5]

Keith Packard keithp at keithp.com
Thu Jun 14 18:42:53 UTC 2018


Jason Ekstrand <jason at jlekstrand.net> writes:

>> +   if (instance->enabled_extensions.KHR_display) {
>> +      master_fd = open(path, O_RDWR | O_CLOEXEC);
>>
>
> Is this supposed to be opening primary_path instead?

Yes, and this section of code needs to occur before anv_init_wsi.

I appear to have skipped testing this path on ANV and only tested it on
RADV -- RADV has the code in the right order. Thanks for catching this;
sorry I messed up and didn't test it.

> This could just be
>
> if (anv_gem_get_param(master_fd, I915_PARAM_CHIPSET_ID) == 0) {
>    close(master_fd);
>    master_fd = -1;
> }
>
> No need to type out all that IOCTL stuff.

Thanks, that's lots shorter (RADV doesn't appear to have a similar helper).

Here's an amendment to the proposed patch which fixes the bug and
switches to the simpler detection method.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-anv-Open-DRM-master-before-initializing-WSI-layer.-C.patch
Type: text/x-diff
Size: 2708 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180614/56ae97f2/attachment.patch>
-------------- next part --------------

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180614/56ae97f2/attachment.sig>


More information about the mesa-dev mailing list