Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] drm/amd/display: missing Gamma 2.4/2.6 wide curve in cm_helper_translate_curve_to_hw_format() --
commit 9ada1f8d824096557c1dda5282f2d0aa09bccdb4 Author: Harry Wentland <[email protected]> drm/amd/display: Add support for 2.4 and 2.6 Gamma and its Inverse This commit maps the Gamma 2.4 and 2.6 1D curve types to the corresponding DC transfer functions and advertises them in the supported degamma, shaper, and blend transfer function masks. > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c > b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c > index d32bf2bf28478..935c041c1d316 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c > @@ -38,21 +38,27 @@ const u64 amdgpu_dm_supported_degam_tfs = > BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) | > BIT(DRM_COLOROP_1D_CURVE_PQ_125_EOTF) | > BIT(DRM_COLOROP_1D_CURVE_BT2020_INV_OETF) | > - BIT(DRM_COLOROP_1D_CURVE_GAMMA22); > + BIT(DRM_COLOROP_1D_CURVE_GAMMA22) | > + BIT(DRM_COLOROP_1D_CURVE_GAMMA24) | > + BIT(DRM_COLOROP_1D_CURVE_GAMMA26); > EXPORT_IF_KUNIT(amdgpu_dm_supported_degam_tfs); > > const u64 amdgpu_dm_supported_shaper_tfs = > BIT(DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF) | > BIT(DRM_COLOROP_1D_CURVE_PQ_125_INV_EOTF) | > BIT(DRM_COLOROP_1D_CURVE_BT2020_OETF) | > - BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV); > + BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV) | > + BIT(DRM_COLOROP_1D_CURVE_GAMMA24_INV) | > + BIT(DRM_COLOROP_1D_CURVE_GAMMA26_INV); > EXPORT_IF_KUNIT(amdgpu_dm_supported_shaper_tfs); [Severity: Medium] Should cm_helper_translate_curve_to_hw_format() also select the wide 32-region curve for TRANSFER_FUNCTION_GAMMA24 and TRANSFER_FUNCTION_GAMMA26? While commit "drm/amd/display: Use the wide CM3 curve for gamma 2.4 and 2.6" updated cm3_helper_translate_curve_to_hw_format() (used on DCN 3.2 and 4.01), DCN 3.0, 3.01, 3.1, and 3.14 wire set_shaper_3dlut to dcn20_set_shaper_3dlut(), which translates plane_state->cm.shaper_func via cm_helper_translate_curve_to_hw_format(): drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c:cm_helper_translate_curve_to_hw_format() { ... if (output_tf->tf == TRANSFER_FUNCTION_PQ || output_tf->tf == TRANSFER_FUNCTION_GAMMA22) { ... } else { corner_points[0].red.x = dc_fixpt_from_fraction(1, 4096); ... } When userspace configures DRM_COLOROP_1D_CURVE_GAMMA24_INV or DRM_COLOROP_1D_CURVE_GAMMA26_INV on the plane shaper colorop on DCN 3.0..3.14, the shaper LUT falls back to the 12-region (2^-12 to 2^0) curve and crushes dark linear values below 2^-12 to zero. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3
