-
Notifications
You must be signed in to change notification settings - Fork 306
report the capability of memory support #514
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
Conversation
it is another option for #503 |
b7ffba9
to
48ba454
Compare
va/va.h
Outdated
@@ -4828,7 +4828,17 @@ VAStatus vaDeassociateSubpicture ( | |||
* brightness etc. in the rendering process. The application can query what | |||
* attributes are supported by the driver, and then set the appropriate attributes | |||
* before calling vaPutSurface() | |||
* | |||
* Display attributes also are used to query/set display adaptor (vaDisplay) related information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. in the end of the sentence
va/va.h
Outdated
@@ -4828,7 +4828,17 @@ VAStatus vaDeassociateSubpicture ( | |||
* brightness etc. in the rendering process. The application can query what | |||
* attributes are supported by the driver, and then set the appropriate attributes | |||
* before calling vaPutSurface() | |||
* | |||
* Display attributes also are used to query/set display adaptor (vaDisplay) related information | |||
* These attributes does not depend on vaConfig, only related with platform or display adaptor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "do not".
'.' in the end of the sentence
va/va.h
Outdated
* App could call vaQueryDisplayAttributes/vaGetDisplayAttributes to query these attributes | ||
* at anytime after vaInitialize, but only could call vaSetDisplayAttributes for these attributes | ||
* after vaInitialize and before any other function call if the attributes is settable. | ||
* To distinguish these two types display attributes, this display adaptor related attributres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to types >>>of<<<
va/va.h
Outdated
* | ||
* Display attributes also are used to query/set display adaptor (vaDisplay) related information | ||
* These attributes does not depend on vaConfig, only related with platform or display adaptor | ||
* It could not used for vaPutSurface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: >>>They<< could not >>>be<<< used
82b8536
to
72fbd48
Compare
va/va.h
Outdated
* They could not be used for vaPutSurface. | ||
* App could call vaQueryDisplayAttributes/vaGetDisplayAttributes to query these attributes | ||
* at anytime after vaInitialize, but only could call vaSetDisplayAttributes for these attributes | ||
* after vaInitialize and before any other function call if the attributes is settable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we modify the behavior to:
App could call vaQueryDisplayAttributes/vaGetDisplayAttributes to query these attributes at anytime after vaInitialize,
but only could call vaSetDisplayAttributes for these attributes BEFORE vaInitialize.
Which make the vaInitialize a time point to bind the tile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we make the change just like your suggestion, it means that there are still no vaSetDisplayAttributes function pointer before initialize, part of the logic should in libva instead of backend driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then I can accept this.
va/va.h
Outdated
* reg.value = reg_attr.value; | ||
* | ||
* for(int i = 0; i < reg.bits.local_memory_regions; i ++ ){ | ||
* if((1<<i) & reg.bits.memory_region){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we use "reg.bits.memory_region_masks" instead?
va/va.h
Outdated
@@ -4885,6 +4895,44 @@ typedef enum | |||
#define VA_RENDER_DEVICE_LOCAL 1 | |||
#define VA_RENDER_DEVICE_EXTERNAL 2 | |||
|
|||
/** Memory info */ | |||
typedef union _VADisplayAttribValMemoryInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this structure seems not necessary as we can derive if there is local memory or not from the query of VADisplayAttribValMemoryRegion. can we just remove it to make the interface concise?
064500e
to
a1a2fb7
Compare
va/va.h
Outdated
*} | ||
* \endcode | ||
*/ | ||
uint32_t memroy_region_masks : 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix typos: s/memroy/memory/. And should we use plural in a different way: memory_regions_mask
?
* called after vaInitialize and before any other function call. | ||
* | ||
* To distinguish these two types of display attributes, display adaptor related attributes | ||
* should be marked as "HW attribute" in the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean platform related information is not 'HW attribute' ?
How about to use VADisplayAdaptorAttrib instead of VADisplayAttrib as prefix?
va/va.h
Outdated
uint32_t memory_regions_masks : 16; | ||
}bits; | ||
uint32_t value; | ||
}VADisplayAttribValMemoryRegion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use VADisplayAdaptorAttrib as prefix ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is good idea, do we need to change the VADisplayAttribSubDevice also, if we changed it, in the enum, the prefix looks not aligned.
va/va.h
Outdated
*} | ||
* \endcode | ||
*/ | ||
uint32_t memory_regions_masks : 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 16 enough for future use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not , we could consider use min_value and max_value.
af5ef97
to
6d0c68e
Compare
va/va.h
Outdated
@@ -4929,6 +4939,47 @@ typedef enum | |||
#define VA_RENDER_DEVICE_LOCAL 1 | |||
#define VA_RENDER_DEVICE_EXTERNAL 2 | |||
|
|||
/**\brief sub device info | |||
* Sub-device is the concept basing on the "device" behind "vaDisplay". | |||
* If a device could be divided to several sub device, the task of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to several sub devices", plural
va/va.h
Outdated
* If a device could be divided to several sub device, the task of | ||
* decode/encode/vpp could be assigned on one sub-device. So, application | ||
* could choose the sub device and attach it to vaDisplay before | ||
* any other operations. after that, all of the task execution/resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"After", capital letter
va/va.h
Outdated
* Sub-device is the concept basing on the "device" behind "vaDisplay". | ||
* If a device could be divided to several sub device, the task of | ||
* decode/encode/vpp could be assigned on one sub-device. So, application | ||
* could choose the sub device and attach it to vaDisplay before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite like "attach". It sounds like in the future we might be able to attach multiple sub-devices to vaDisplay. Is that we want to have? This will require API change however since since right now we have only current_sub_device
, but we will need a mask.
va/va.h
Outdated
*} | ||
* \endcode | ||
*/ | ||
uint32_t sub_devices_masks : 16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many plurals. I suggest sub_devices_mask
b396a9c
to
969d7b8
Compare
Extend display attibute to include adaptor/hw/platform attribute and add new attributes to indicate whether there are several sub device behind vaDisplay Signed-off-by: Carl Zhang <carl.zhang@intel.com>
* [Media Common] implement multiple tile selection interfaces against intel/libva#514 add some comments for the init function move the implementation of display attributes into MediaLibvaCaps class implement VADisplayAttribSubDevice for some platforms
1. add VADisplayAttribSubDevice support 2. add comments for media context init 3. this pr is against: github.com/intel/libva/pull/514
extend display attibute to include adaptor/hw/platform attribute
and add two new attributes to indicate whether there are on device memory
and whether there are different memory region on the device
Signed-off-by: Carl Zhang carl.zhang@intel.com