Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
add multiple backend driver support #351
enable multiple driver support, if there are no vaSetDriverName is called or environment variable LIBVA_DRIVER_NAME is set. driver will select driver from g_driver_name_map, if there are i965 and iHD.
dvrogozh left a comment
I don't understand from the code how this is supposed to work. Can you, please, add some description of the algorithm, preferably as a comment in the code, but at least in the commit message. Are there any expectations from the drivers to have some kind of devices id white/black lists?
@dvrogozh , I have to revert to previous change, because i965 driver need drm is authenticated, so va_drm_authenticate should be called anyway, and drm_state->auth_type = VA_DRM_AUTH_CUSTOM; should be set, if we refactor this part, it will not call this part with some conditions , so I still need the complex logic inside vaInitialize
add multiple backend driver support part 1 add new function pointer in va_backend.h vaGetCandidatesNum is used to get driver candidates number vaGetDriverNameByIndex is used to get driver name by candidate index and basic implementation of va_getDriverCandidateNum and va_getDriverNameByIndex Signed-off-by: Carl Zhang <email@example.com>
add multiple backend driver support part 2 try to open driver one by one 1. get candidates number 2. try to load driver one by one until one driver loaded successfully Signed-off-by: Carl Zhang <firstname.lastname@example.org>
add multiple backend driver support part 3 enable vaGetDriverNameByIndex for DRM add comments for the implementation mv authenticate operation into vaGetNumCandidates function from vaGetDriverName. Signed-off-by: Carl Zhang <email@example.com>