radeonsi: return effective modifier for PIPE_RESOURCE_PARAM_MODIFIER
What does this MR do and why?
When a gbm bo is created with gbm_bo_create
, gbm_bo_get_modifier
always returns DRM_FORMAT_MOD_INVALID
on radeonsi. From a quick look, the other hw gallium drivers return the effective modifier instead. This MR changes radeonsi's behavior to match others.
This is done specifically for chrome on radv. radv requires a valid modifier for dma-buf import. chrome always uses gbm_bo_get_modifier
to get the modifier, but does not always use gbm_bo_create_with_modifiers
to allocate the bo.
I am on the fence whether we want this change or not. Do we consider this a misuse of the gbm api? In which case, we should drop this MR. I might take a step futher to make gbm consistently return DRM_FORMAT_MOD_INVALID
instead.