public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/dpu: fix video mode DSC INTF timing width for non 8 bit panels
Date: Sun, 22 Mar 2026 04:52:40 +1000	[thread overview]
Message-ID: <review-patch3-20260318-dsi-rgb101010-support-v2-3-698b7612eaeb@pm.me> (raw)
In-Reply-To: <20260318-dsi-rgb101010-support-v2-3-698b7612eaeb@pm.me>

Patch Review

**The fix itself is mathematically correct.** The compressed INTF timing width should represent how many pixel-clock cycles are needed to output the compressed data. The INTF outputs 3 bytes (24 bits) per pixel clock, so:

```
compressed_width = (width * bpp_compressed) / 24
```

The previous formula `width * bpp_compressed / (bits_per_component * 3)` happens to equal the same thing for 8-bit panels (8×3=24) but produces wrong results for 10-bit panels (10×3=30), which explains the FIFO errors.

**Consistency concern — `dsi_adjust_pclk_for_compression()` at `dsi_host.c:590-591`:**

```c
int new_hdisplay = DIV_ROUND_UP(mode->hdisplay * drm_dsc_get_bpp_int(dsc),
		dsc->bits_per_component * 3);
```

This function uses the **exact same** `bits_per_component * 3` divisor for pclk rate adjustment. If the reasoning in this patch is correct (the divisor should always be 24), then this function likely needs the same fix. Not addressing it could mean the pixel clock rate is calculated incorrectly for 10-bit DSC panels, potentially causing timing issues even after this INTF fix. At minimum, the commit message should explain why this instance is different or add a note that it will be addressed separately.

**Commit message could be improved:** The patch is described as fixing "video mode DSC INTF timing" but the rationale of "matches downstream" is somewhat weak on its own. It would benefit from a brief explanation of *why* 24 is correct (the INTF always outputs 3 bytes per clock regardless of source bit depth), rather than just deferring to downstream behavior.

**Nit:** This patch could arguably carry a `Fixes:` tag pointing to the commit that introduced the `bits_per_component * 3` formula, which would help with backporting to stable kernels.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-21 18:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  3:59 [PATCH v2 0/3] drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Alexander Koskovich
2026-03-19  4:00 ` [PATCH v2 1/3] drm/mipi-dsi: add RGB101010 pixel format Alexander Koskovich
2026-03-21 18:52   ` Claude review: " Claude Code Review Bot
2026-03-19  4:00 ` [PATCH v2 2/3] drm/msm/dsi: Add support for " Alexander Koskovich
2026-03-19  4:21   ` Dmitry Baryshkov
2026-03-19  9:10   ` Konrad Dybcio
2026-03-19  9:25     ` Alexander Koskovich
2026-03-19  9:39       ` Konrad Dybcio
2026-03-21 18:52   ` Claude review: " Claude Code Review Bot
2026-03-19  4:00 ` [PATCH v2 3/3] drm/msm/dpu: fix video mode DSC INTF timing width for non 8 bit panels Alexander Koskovich
2026-03-19  8:34   ` Neil Armstrong
2026-03-19  8:48     ` Alexander Koskovich
2026-03-19 10:33       ` Neil Armstrong
2026-03-19 10:04     ` Konrad Dybcio
2026-03-21 18:52   ` Claude Code Review Bot [this message]
2026-03-21 18:52 ` Claude review: drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch3-20260318-dsi-rgb101010-support-v2-3-698b7612eaeb@pm.me \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox