Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable memory location query and set #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XinfengZhang
Copy link
Contributor

  1. app could specify the memory location by vaCreateSurfaces
  2. app could query the memory regions supported by backend driver
  3. app could query the surface memory location by vaDeriveImage

Signed-off-by: XinfengZhang [email protected]

va/va.h Outdated
* Image flags , app could retrieve surface informations by this flag after calling vaDeriveImage
* the flags could include the memory location/region etc.
* bit0 = 1: the flags is valid flags
* bit1-2: memory location: 0 system memeory, 1 local memory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, which bit is for system memory and which for local? did you intent to have bit1 only here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit 1 -2 represent 2bit values, if bit0 is valid, then bit1 is 0 represent system memory, bit1 is 1 represent local memory, bit 2 is used for future, I will update it.

* bit0 = 1: the flags is valid flags
* bit1-2: memory location: 0 system memeory, 1 local memory.
*/
uint32_t flags;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we introduce some bit masks to help users understand what's going on?

* bit0 = 1: the flags is valid flags
* bit1-2: memory location: 0 system memeory, 1 local memory.
*/
uint32_t flags;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need add this "flags" member in VAImage, since we can query memory region info through surfaceattributes (e.g., surface_attrib.value.value.i) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is we could not get surfaceattributes for one dedicate surface

1. app could specify the memory location by vaCreateSurfaces
2. app could query the memory regions supported by backend driver
3. app could query the surface memory location by vaDeriveImage

Signed-off-by: XinfengZhang <[email protected]>
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
1. it need definitions in intel/libva#601
2. default behavior is determined by driver (local memory prefered)
3. it will be impacted by platform WA such as WaForceAllocateLML3

Signed-off-by: Carl Zhang <[email protected]>
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
1. it need definitions in intel/libva#601
2. default behavior is determined by driver (local memory prefered)
3. it will be impacted by platform WA such as WaForceAllocateLML3

Signed-off-by: Carl Zhang <[email protected]>
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
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.

3 participants