Skip to content

va: add VA_SURFACE_ATTRIB_USAGE_HINT_PRIVATE - #896

Open
XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:surface_opt
Open

XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:surface_opt

Conversation

@XinfengZhang

@XinfengZhang XinfengZhang commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

There is currently no way for an application to tell the backend
driver at allocation time that a surface will never leave the VA
driver. The existing usage hints only describe intended uses, and the
absence of VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT cannot be distinguished
from an application that simply did not pass a hint, so drivers must
always assume the surface may later be exported and shared with other
components such as compute or display.

Add VA_SURFACE_ATTRIB_USAGE_HINT_PRIVATE to state that the surface is
private to the VA driver and will not be exported. The driver is then
free to choose a memory layout that is not shareable outside of it.
The flag must not be combined with the DISPLAY or EXPORT hints, and
vaExportSurfaceHandle() on such a surface fails with
VA_STATUS_ERROR_INVALID_SURFACE. Drivers that do not recognize the
flag may ignore it, so existing drivers keep working unchanged.

🤖 Generated with Claude Code

@HeJunyan

Copy link
Copy Markdown
Contributor

So this kind of surface can not be exported as DMA buffer?

@XinfengZhang
XinfengZhang marked this pull request as ready for review October 22, 2026 02:29
There is currently no way for an application to tell the backend
driver at allocation time that a surface will never leave the VA
driver. The existing usage hints only describe intended uses, and the
absence of VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT cannot be distinguished
from an application that simply did not pass a hint, so drivers must
always assume the surface may later be exported and shared with other
components such as compute or display.

Add VA_SURFACE_ATTRIB_USAGE_HINT_PRIVATE to state that the surface is
private to the VA driver and will not be exported. The driver is then
free to choose a memory layout that is not shareable outside of it.
The flag must not be combined with the DISPLAY or EXPORT hints, and
vaExportSurfaceHandle() on such a surface fails with
VA_STATUS_ERROR_INVALID_SURFACE. Drivers that do not recognize the
flag may ignore it, so existing drivers keep working unchanged.

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants