Skip to content

enable memory location query and set#601

Open
XinfengZhang wants to merge 1 commit intointel:masterfrom
XinfengZhang:location
Open

enable memory location query and set#601
XinfengZhang wants to merge 1 commit intointel:masterfrom
XinfengZhang:location

Conversation

@XinfengZhang
Copy link
Copy Markdown
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 carl.zhang@intel.com

Comment thread va/va.h Outdated
Comment thread va/va.h Outdated
Comment thread 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
Copy Markdown
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
Copy Markdown
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.

Comment thread va/va.h
* bit0 = 1: the flags is valid flags
* bit1-2: memory location: 0 system memeory, 1 local memory.
*/
uint32_t flags;
Copy link
Copy Markdown
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?

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

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
Copy Markdown
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 <carl.zhang@intel.com>
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 <carl.zhang@intel.com>
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
it need definitions in intel/libva#601

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
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 <carl.zhang@intel.com>
XinfengZhang added a commit to XinfengZhang/media-driver that referenced this pull request Nov 25, 2022
it need definitions in intel/libva#601

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
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