Skip to content

Conversation

@matte-schwartz
Copy link

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

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]>
@antheas
Copy link

antheas commented Oct 4, 2025

Here is mine
bazzite-org@55c4937

The difference is i added some extra checks on mine for the main color management. Ie here:

	return drm->pPrimaryPlane->GetProperties().AMD_PLANE_DEGAMMA_TF.has_value() &&
			drm->pPrimaryPlane->GetProperties().AMD_PLANE_CTM.has_value() &&
			drm->pPrimaryPlane->GetProperties().AMD_PLANE_SHAPER_LUT.has_value();

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:
bazzite-org@1f2e5f8

Comment on lines -2662 to 2671
{
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)
Copy link

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

@matte-schwartz
Copy link
Author

matte-schwartz commented Oct 4, 2025

checking a bit more about the missing AMD_PLANE_BLEND_TF first to make sure its not another 3DLUT situation where the capability wasn't actually meant to be dropped, going to mark as draft for now + until i address comments

@matte-schwartz matte-schwartz marked this pull request as draft October 4, 2025 15:36
@antheas
Copy link

antheas commented Oct 4, 2025

checking a bit more about the missing AMD_PLANE_BLEND_TF first to make sure its not another 3DLUT situation where the capability wasn't actually meant to be dropped, going to mark as draft for now + until i address comments

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.

@misyltoad
Copy link
Collaborator

I've reached out to AMD about this, so we will hopefully hear back what the situation is hardware wise for support here.

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.

Support color management on DCN32 and later

3 participants