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

add interface for modifier query #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

XinfengZhang
Copy link
Contributor

  1. this interface is for modifier query/negotiation. it could query the modifier list for a given format under a config
  2. it support different modifier list for different format. for example: ARGB maybe just support linear, RGB maybe support linear only, NV12 support tile4 etc.

the interface is used to get the modifier list for a format supplying a config

Signed-off-by: Carl Zhang <[email protected]>
add backend function for the interfaces which is used to query additional information of a given format

Signed-off-by: Carl Zhang <[email protected]>
@HeJunyan
Copy link
Contributor

Maybe, I think, we just need to extend the "vaQuerySurfaceAttributes" a little.

For example, we define a new type VASurfaceAttribDRMFormatModifiersForFormat after VASurfaceAttribDRMFormatModifiers.

The VASurfaceAttribDRMFormatModifiers return all possible modifiers for a config, while the VASurfaceAttribDRMFormatModifiersForFormat just return the modifiers for some specific format of that config.

And we define a struct, such as:
struct {
uint32_t format;
VADRMFormatModifierList drm_list;
};
as the VAGenericValue.p of that VASurfaceAttrib query. The format is input and drm_list is the output?

Then we can avoid define a new API.

@ceyusa
Copy link
Contributor

ceyusa commented May 18, 2022

Maybe, I think, we just need to extend the "vaQuerySurfaceAttributes" a little.

But that's already in place #505

Sadly, media-driver, neither mesa still no have an implementation for vaQuerySurfaceAttributes. Mesa only implemented the vaCreateSurface part.

@alatteri
Copy link

any chance to get this mergered? The capability would help us a lot with color accuracy.

@nowrep
Copy link

nowrep commented Aug 3, 2024

Sadly, media-driver, neither mesa still no have an implementation for vaQuerySurfaceAttributes. Mesa only implemented the vaCreateSurface part.

That's because it can't be implemented, the modifier query only makes sense when format is specified which is not the case with vaQuerySurfaceAttributes.

So we would need this PR (vaGetSurfaceFormatAttributes) to implement it in Mesa.

@any1
Copy link

any1 commented Nov 8, 2024

Does there exist a mesa merge request for this?

@nowrep
Copy link

nowrep commented Nov 8, 2024

Does there exist a mesa merge request for this?

No, but I can make one if that can help getting this merged.

@any1
Copy link

any1 commented Nov 8, 2024

Does there exist a mesa merge request for this?

No, but I can make one if that can help getting this merged.

Well, if you're in the mood for it, I'd say: go for it. ;)

@nowrep
Copy link

nowrep commented Nov 8, 2024

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.

6 participants