[PATCH xserver 1/2] modesetting: Fix swapping of provider sink / source capabilities

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 23 00:22:29 UTC 2016


On 22 June 2016 at 22:02, Hans de Goede <hdegoede at redhat.com> wrote:
> Hi,
>
> On 22-06-16 21:19, Emil Velikov wrote:
>>
>> Hi Hans,
>>
>> On 16 June 2016 at 14:37, Hans de Goede <hdegoede at redhat.com> wrote:
>>>
>>> When a card has import capability it can be an offload _sink_, not
>>> a source and vice versa for export capability.
>>>
>>> This commit fixes the modesetting driver to properly set these
>>> capabilities, this went unnoticed sofar because most gpus have both
>>> import and export capability.
>>>
>> Looking at randr/rrprovider.c ProcRRGetProviderInfo() and the
>> randrproto I'm not sure that this patch is correct.
>>
>> "SourceOffload: This device can source offload buffers"
>
>
> You should read that as:
>
> "SourceOffload: This device can _be a_ source _of_ offload buffers",
> iows it can export buffers,
>
>> My understanding is that such device should have CAP_IMPORT since the
>> buffers will be sourced (imported) to the offload GPU to be processed.
>
>
> No such a device _is_ the offload gpu and can be a source of rendered
> buffers for the master to display.
>
> Also see the actual checks for the caps in randr/rrprovider.c
> ProcRRSetProviderOffloadSink() :
>
>     if (!(provider->capabilities & RR_Capability_SourceOffload))
>         return BadValue;
>
> Where provider is the gpu to which rendering is to be offloaded,
> so that one must be able to export images.
>
> And
>
>         if (!(sink_provider->capabilities & RR_Capability_SinkOffload))
>             return BadValue;
>
> Where sink_provider is the gpu which has the actual screen attached
> (aka the master) and is the one importing the images to display.
>
Ouch, I feel like such a noob. Thanks for the time and patience
bringing clarity to my delusion.

-Emil


More information about the xorg-devel mailing list