On 10/22/26 10:50, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] drm/amd/display: undeclared DRM_COLOROP_FIXED_MATRIX breaks KUnit 
test build
--

commit fa1c05a038fce65c050bce3e6d89515560ce7081
Author: John Harrison <[email protected]>

drm/amd/display: Update colorop pipeline tests for new fixed matrix op

This commit updates the expected colorop pipeline arrays in the amdgpu_dm
KUnit tests to begin with DRM_COLOROP_FIXED_MATRIX.

diff --git 
a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c
index 90cc5592ef5de..00f1d5b33b1f0 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c
@@ -192,6 +192,7 @@ static void dm_expect_colorop_pipeline(struct kunit *test, 
struct drm_device *dr
  static void dm_test_initialize_default_pipeline(struct kunit *test)
  {
        static const enum drm_colorop_type expected[] = {
+               DRM_COLOROP_FIXED_MATRIX,
                DRM_COLOROP_1D_CURVE,   /* degam TF */
                DRM_COLOROP_MULTIPLIER,
                DRM_COLOROP_CTM_3X4,
@@ -257,6 +258,7 @@ static void dm_test_initialize_default_pipeline_caps(struct 
kunit *test,
  static void dm_test_initialize_default_pipeline_dpp_3d_lut(struct kunit *test)
  {
        static const enum drm_colorop_type expected[] = {
+               DRM_COLOROP_FIXED_MATRIX,
                DRM_COLOROP_1D_CURVE,
                DRM_COLOROP_MULTIPLIER,
                DRM_COLOROP_CTM_3X4,
@@ -278,6 +280,7 @@ static void 
dm_test_initialize_default_pipeline_dpp_3d_lut(struct kunit *test)
  static void dm_test_initialize_default_pipeline_mpc_preblend(struct kunit 
*test)
  {
        static const enum drm_colorop_type expected[] = {
+               DRM_COLOROP_FIXED_MATRIX,
                DRM_COLOROP_1D_CURVE,
                DRM_COLOROP_MULTIPLIER,
                DRM_COLOROP_CTM_3X4,
@@ -299,6 +302,7 @@ static void 
dm_test_initialize_default_pipeline_mpc_preblend(struct kunit *test)
  static void dm_test_initialize_default_pipeline_no_3d_lut(struct kunit *test)
  {
        static const enum drm_colorop_type expected[] = {
+               DRM_COLOROP_FIXED_MATRIX,
                DRM_COLOROP_1D_CURVE,
                DRM_COLOROP_MULTIPLIER,
                DRM_COLOROP_CTM_3X4,
[Severity: Medium]
Does this break the build when CONFIG_DRM_AMD_DC_KUNIT_TEST is enabled?

This patch adds DRM_COLOROP_FIXED_MATRIX to the expected[] arrays in
dm_test_initialize_default_pipeline(),
dm_test_initialize_default_pipeline_dpp_3d_lut(),
dm_test_initialize_default_pipeline_mpc_preblend(), and
dm_test_initialize_default_pipeline_no_3d_lut() in
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c.

The commit references Fixes: 6d103ad11583 ("drm/amd/display: Add fixed matrix
colorop to color pipeline"), which in turn depends on f6c58e4ae87c
("drm/colorop: Add DRM_COLOROP_FIXED_MATRIX"), but neither commit is present
in this branch.

In include/uapi/drm/drm_mode.h, enum drm_colorop_type does not define
DRM_COLOROP_FIXED_MATRIX:

     enum drm_colorop_type {
             DRM_COLOROP_1D_CURVE,
             DRM_COLOROP_1D_LUT,
             DRM_COLOROP_CTM_3X4,
             DRM_COLOROP_MULTIPLIER,
             DRM_COLOROP_3D_LUT,
     };

In addition, amdgpu_dm_build_default_pipeline() in
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c still starts the
default pipeline with DRM_COLOROP_1D_CURVE:

     /* 1D curve - DEGAM TF */
     ops[i] = colorop_kzalloc_obj();
     if (!ops[i]) {
             ret = -ENOMEM;
             goto cleanup;
     }

     ret = colorop_curve_1d_init(dev, ops[i], plane, &dm_colorop_funcs,
                                 amdgpu_dm_supported_degam_tfs,
                                 DRM_COLOROP_FLAG_ALLOW_BYPASS);

Should this patch only be applied to a branch that already contains commits
f6c58e4ae87c and 6d103ad11583?

What branch is Sashiko using? The web page report says it is based on 77f548b127c6de34ce271fa09ba270cb1ef9f2da which is a hash that does not exist in any tree I have locally. My patches are based on drm-tip, which very definitely contains the FIXED_MATRIX support (merged August 27th according to the patch itself).

John.

Reply via email to