libva
                                
                                
                                
                                    libva copied to clipboard
                            
                            
                            
                        Add new interface vaGetDeviceInfo
For get specific information about device from the backend driver
Signed-off-by: Anton Grishin [email protected]
what's the purpose to get such information?
@XinfengZhang
what's the purpose to get such information?
I think that such an API and nicely selected information to expose would be useful. I have few cases when this is needed in mind:
- To answer classic questions like: "I have just installed driver, does it work?", "I have dual GPU system, which GPU works?" As of now we need to explain a pretty low level theory of operation - see below. But for the user who just installed something and typed 'vainfo' we can significantly simplify life by just printing out device ID!
 - In case of X11 or Wayland displays such info is more trickier to get - again printing this out in vainfo will help.
 - Sometimes higher level libraries differentiate features depending on device IDs and device caps - that's what mediasdk is doing and that's where this request comes from. As of now mediasdk is limited to i915 driver only and such API will permit to relax this restiction.
 
You might have 2 cards available as: /dev/dri/card0 /dev/dri/card1 /dev/dri/renderD128 /dev/dri/renderD129
D128 corresponds to card0. Make sure that you user login can access both devices – check that your account is a member of groups which own above devices. If not – add to both. Usually that’s render and video groups: sudo usermod -aG video
sudo usermod -aG render Don’t forget to relogin to the system for above commands take effect. To identify which card is which run this: # cat /sys/class/drm/card0/device/device xxxx # cat /sys/class/drm/card1/device/device yyyy The output is device ID. Check against device ID lists what is what.
hi @dvrogozh
- all component has such question, not only media, so I think you may need another standalone method which is not related with media or 3d or ocl
 - application will convey the device fd into media , such as vainfo --device .
 - feature set should depend on the capability report , not device id
 
I reviewed this PR and did not have concern about the specific code changes. Just not very clear about the motivation of code changes although I saw simliar code changes in MSDK(the usage of MSDK is in sample app which demonstrates to the user how to use dual adapter).
If it is for workload submission to the different device, app can query caps and submit the corresponding workload. Currently, iHD does not expose the specific features which is related to local memory.
Thanks, Furong