panfrost: Respect offset for imported resources
authorDaniel Stone <daniels@collabora.com>
Thu, 17 Oct 2019 11:49:54 +0000 (13:49 +0200)
committerDaniel Stone <daniels@collabora.com>
Fri, 18 Oct 2019 07:38:52 +0000 (09:38 +0200)
commit40689f5ac0bf2aecdcbf87103a25aed03ba8640f
tree6daea2032021416bd25d99ecddf3d0561120e027
parent22859a18d5c802cf2d486ecff4eb32e3bf88786d
panfrost: Respect offset for imported resources

When we import a resource through Gallium, we need to take account of
the offset parameter passed.

Fixes a failure seen with the VIVID V4L2 driver, which would create NV12
resources within the same BO, with an offset. Sample pipeline to
reproduce (replace videoN with your actual VIVID device node):
    gst-launch-1.0 v4l2src device=/dev/videoN ! video/x-raw,format=NV12 ! glimagesink

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
src/gallium/drivers/panfrost/pan_resource.c