From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/i915/color: Program fixed-function CSC on SDR planes Date: Sun, 12 Apr 2026 13:07:23 +1000 Message-ID: In-Reply-To: <20260408051514.608781-4-chaitanya.kumar.borah@intel.com> References: <20260408051514.608781-1-chaitanya.kumar.borah@intel.com> <20260408051514.608781-4-chaitanya.kumar.borah@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Critical bug**: The new SDR colorop-based CSC programming in `glk_plane_c= olor_ctl()` conflicts with the existing legacy YUV handling. For SDR planes with YUV framebuffers, the existing code (lines 1279-1293) s= ets the CSC mode and YUV range correction based on legacy `color_encoding` = and `color_range` properties. The new code (lines 1300-1305) then ORs in *a= dditional* CSC mode and range correction bits: ```c // EXISTING (line 1279): for YUV on SDR planes if (fb->format->is_yuv && !icl_is_hdr_plane(display, plane->id)) { // Sets CSC mode based on color_encoding (e.g., YUV601_TO_RGB601 =3D 1) ... } // NEW (line 1300): for ALL SDR planes if (!icl_is_hdr_plane(display, plane->id)) { plane_color_ctl |=3D intel_csc_ff_type_to_csc_mode(...); // May OR a DIFFERENT CSC mode value } ``` The CSC mode field is `GENMASK(19, 17)` =E2=80=94 ORing two different encod= ed values (e.g., `FIELD_PREP(MASK, 1) | FIELD_PREP(MASK, 2)` =3D `FIELD_PRE= P(MASK, 3)`) corrupts the field and selects the wrong conversion. **Additional regression**: Line 1303-1304 unconditionally ORs `PLANE_COLOR_= YUV_RANGE_CORRECTION_DISABLE` when `yuv_range_correct` is false (the defaul= t). This means that even without using the color pipeline, **all SDR planes= now have YUV range correction force-disabled**, breaking existing limited-= range YUV content. The fix should gate the new colorop-based path on whether a color pipeline = is actually active, or disable the legacy path when colorops are in use. --- Generated by Claude Code Patch Reviewer