Hi,

On 22-06-16 21:19, Emil Velikov wrote:
Hi Hans,

On 16 June 2016 at 14:37, Hans de Goede <[email protected]> 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.

Regards,

Hans
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to