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/mipi-dsi: add RGB101010 pixel format
Date: Sun, 22 Mar 2026 04:52:39 +1000	[thread overview]
Message-ID: <review-patch1-20260318-dsi-rgb101010-support-v2-1-698b7612eaeb@pm.me> (raw)
In-Reply-To: <20260318-dsi-rgb101010-support-v2-1-698b7612eaeb@pm.me>

Patch Review

**Enum ordering concern:** The new `MIPI_DSI_FMT_RGB101010` is inserted at the **top** of the enum:

```c
 enum mipi_dsi_pixel_format {
+	MIPI_DSI_FMT_RGB101010,
 	MIPI_DSI_FMT_RGB888,
```

This changes the implicit numeric values of all existing members (`MIPI_DSI_FMT_RGB888` goes from 0 to 1, etc.). While current in-tree users appear to use symbolic names in switch statements rather than relying on numeric values, this is still bad practice. There are 137+ files using these enum values across the DRM subsystem. Any out-of-tree driver or userspace tool that has hardcoded the numeric values would break.

**Recommendation:** Append the new value at the end, after `MIPI_DSI_FMT_RGB565`:

```c
enum mipi_dsi_pixel_format {
	MIPI_DSI_FMT_RGB888,
	MIPI_DSI_FMT_RGB666,
	MIPI_DSI_FMT_RGB666_PACKED,
	MIPI_DSI_FMT_RGB565,
	MIPI_DSI_FMT_RGB101010,
};
```

**Missing handling in `drm_mipi_dsi_get_input_bus_fmt()`:** The function at `drm_mipi_dsi.c:888` switches on all four existing formats and falls through to a `default` case. Adding `MIPI_DSI_FMT_RGB101010` without a corresponding case there will cause compiler warnings (`-Wswitch`) in some configurations, and the function will return 0 for this format. A `MEDIA_BUS_FMT_RGB101010_1X30` case should be added (or the function should explicitly handle it, even if just falling to default with a comment).

The `mipi_dsi_pixel_format_to_bpp()` addition returning 30 is correct.

Already has Reviewed-by from Dmitry Baryshkov, which is good.

---

---
Generated by Claude Code Patch Reviewer

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

Thread overview: 17+ 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 Code Review Bot [this message]
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 review: " Claude Code Review Bot
2026-03-21 18:52 ` Claude review: drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-21  7:52 [PATCH v4 0/5] " Alexander Koskovich
2026-03-21  7:52 ` [PATCH v4 1/5] drm/mipi-dsi: add RGB101010 pixel format Alexander Koskovich
2026-03-21 17:12   ` Claude review: " 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-patch1-20260318-dsi-rgb101010-support-v2-1-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