[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#909832: Debian VPP patches break vaGetImage



Hi

On 2018-09-29 12:32:37, Steinar H. Gunderson wrote:
> Package: i965-va-driver
> Version: 2.2.0+dfsg1-1
> Severity: important
> 
> Hi,
> 
> I'm developing an application that uses VA-API to decode JPEGs, and then
> fetch the decoded data down to the CPU. For this, you have two choices;
> either call vaDeriveImage() on the surface (which always gives you uncached
> memory, which is unusably slow to read data from), or create your own image and
> then vaGetImage() the surface into said image.
> 
> However, on my Haswell laptop, vaGetImage() simply returns
> VA_STATUS_ERROR_UNIMPLEMENTED when running the Debian version of i965-va-driver.
> It turns out that after the patches to remove nonfree VPP shaders, .has_vpp = 0
> on Haswell (and several others), but it still advertises a hardware getImage
> (.has_accelerated_getimage = 1). i965_hw_getimage() calls i965_image_processing()
> to do its bidding, which hits this code path:
> 
>       VAStatus status = VA_STATUS_ERROR_UNIMPLEMENTED;
> 
>       if (HAS_VPP(i965)) {  // Checks .has_vpp
>             ...
>       }
>       return status;
> 
> Now, since .has_vpp has been set to 0 in Debian, this means that the simple
> operation of copying a surface to an image breaks completely, which breaks a
> major part of VA functionality. As far as I can see, this does not require
> any nonfree shaders; if I remove the part of 0002-Disable-post-processing-shaders.patch
> that sets .has_vpp = 0 for Haswell, vaGetImage() works just like it should.
> 
> Is perhaps this patch too heavy-handed, and something more fine-grained required?

That might be. I tried multiple times to get feedback from upstream what we need
to disable after removing the non-free shaders, but they simply ignore the
issue. So please, especially since you have the hardware to test it (I only
tried video decoding on Skylake - I don't have a Haswell machine), I'm happy to
take patches.

FWIW all of that should be easier once we switch to the new driver currently
under development. It has an explicit switch to disable all non-free parts.

Cheers
-- 
Sebastian Ramacher

Attachment: signature.asc
Description: PGP signature


Reply to: