[PATCH 1/2] drm: Add DRM_CAP_PRIME_SCANOUT.

Daniel Stone daniel at fooishbar.org
Tue Apr 4 10:11:42 UTC 2017


Hi,

On 4 April 2017 at 09:31, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Tue, Apr 04, 2017 at 06:13:20PM +1000, raof at ubuntu.com wrote:
>> Until recently, on (at least) nouveau, radeon, and amdgpu attempting to scanout of an
>> imported dma-buf would silently result in the dma-buf sharing being broken.
>>
>> While the hardware is capable of scanning out of imported dma-bufs (at least in some circumstances),
>> these drivers do not currently implement it, so attempts to scan out of such buffers will never succeed.
>>
>> Add a userspace-visible drm capability and associated driver_feature so that userspace can discover
>> when scanning out of an imported dma-buf can work.
>>
>> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers at canonical.com>
>
> This seems like an awful specific special case. Why can't you do the
> entire dance upfront, i.e. import buffer, addfb2? None of that has any
> visible effect, and it will also allow you to check runtime constraints
> which can't be covered with this here.

Oh, that already happens. Chris sent out a series which fixes bugs for
PRIME import across a few drivers, mostly ones which need to pin
scanout buffers to dedicated memory. So this cap is basically
DRM_CAP_PRIME_SCANOUT_ISNT_BUGGY. FWIW, I'm fairly skeptical about
adding caps which essentially declare the absence of bugs like this.

Cheers,
Daniel


More information about the dri-devel mailing list