-
Notifications
You must be signed in to change notification settings - Fork 296
DRMBackend: check for AMD_PLANE_BLEND_TF in a separate function #1976
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
base: master
Are you sure you want to change the base?
DRMBackend: check for AMD_PLANE_BLEND_TF in a separate function #1976
Conversation
AMD no longer supports AMD_PLANE_BLEND_TF on DCN 3.2+, which means that color management is marked as unsupported on newer hardware. This is not accurate as the hardware still supports AMD_PLANE_DEGAMMA_TF, AMD_PLANE_CTM, and AMD_PLANE_SHAPER_LUT, which is sufficient for color management. Moving the check for AMD_PLANE_BLEND_TF into its own function fixes this. Tested on my ROG Flow Z13 w/ Strix Halo (DCN 3.5.1) and it seems to work fine. Fixes: ValveSoftware#1960 Suggested-by: Antheas Kapenekakis <[email protected]>
|
Here is mine The difference is i added some extra checks on mine for the main color management. Ie here: And I also made it so blend_tf can still work if color management is disabled There is also a secondary commit that forces compositing here: |
| { | ||
| if (!cv_drm_debug_disable_blend_tf && !bSinglePlane) | ||
| liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", drm->pending.output_tf ); | ||
| else | ||
| liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT ); | ||
| if ( drm_supports_blend_tf( drm ) ) | ||
| { | ||
| if (!cv_drm_debug_disable_blend_tf && !bSinglePlane) | ||
| liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", drm->pending.output_tf ); | ||
| else | ||
| liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT ); | ||
| } | ||
|
|
||
| if (!cv_drm_debug_disable_ctm && frameInfo->layers[i].ctm != nullptr) |
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 that extent, here you nest under color management, but the composite check only checks blend tf. This will cause the checks to unsync. Better treat the two capabilities separately
|
checking a bit more about the missing |
I actually tried enabling it. For iGPUs it worked but all dGPUs started crashing. If the device does not have blend tf it does not. |
|
I've reached out to AMD about this, so we will hopefully hear back what the situation is hardware wise for support here. |
AMD no longer supports AMD_PLANE_BLEND_TF on DCN 3.2+, which means that color management is marked as unsupported on newer hardware. This is not accurate as the hardware still supports AMD_PLANE_DEGAMMA_TF, AMD_PLANE_CTM, and AMD_PLANE_SHAPER_LUT, which is sufficient for color management.
Moving the check for AMD_PLANE_BLEND_TF into its own function fixes this. Tested on my ROG Flow Z13 w/ Strix Halo (DCN 3.5.1) and it seems to work fine.
Fixes: #1960
Suggested-by: Antheas Kapenekakis [email protected]
cc @antheas we talked about separating the check for AMD_PLANE_BLEND_TF on Discord a few weeks ago, open to feedback if you implemented this differently but seems to work fine here