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: ensure blend mode supported if alpha exposed
Date: Tue, 05 May 2026 08:17:26 +1000	[thread overview]
Message-ID: <review-patch2-20260504140630.68707-3-leandro.ribeiro@collabora.com> (raw)
In-Reply-To: <20260504140630.68707-3-leandro.ribeiro@collabora.com>

Patch Review

**Verdict: Needs rework — will break existing drivers.**

The design intent is correct: if a plane exposes alpha (either through the alpha property or alpha-containing pixel formats), userspace needs to know the blend mode. Enforcing this at driver registration time is the right place.

**Problem 1: Breaks existing in-tree drivers.** As noted above, at least 6 drivers set `alpha_property` without `blend_mode_property`, and many more support ARGB formats without blend mode. These drivers currently work fine. After this patch, `drm_dev_register()` returns `-EINVAL` and the driver fails to load entirely. The commit message acknowledges this ("Drivers that hit such error must be fixed") but does not include the fixes.

This violates the kernel's regression policy — you cannot merge a change that breaks existing working drivers and expect the fixes to come later. The fixes for all affected drivers must be part of this series (or merged first).

**Problem 2: The pixel format alpha check is extremely broad.** Nearly every DRM driver supports ARGB8888 or similar formats. The `has_alpha` check in `plane_require_blend_mode_for_alpha()` will catch a very large number of drivers that don't set up blend mode. This needs careful auditing of every DRM driver in the tree.

**Problem 3: Naming convention.** The split between `drm_mode_config_validate()` (WARN-based, non-fatal) and `drm_mode_config_enforce()` (error-return, fatal) introduces a new pattern. It would be worth documenting why some checks are hard errors and others are soft warnings, or alternatively, consider making this a WARN for now and hardening it later once all drivers are fixed.

**Minor issues:**

- Typo in commit message: "relly" should be "rely", "don't" should be "doesn't", "count with" should be "count on".

- Alignment uses spaces instead of tab at line 373 of the diff:
```c
		drm_err(dev, "[PLANE:%d:%s] pixel format with alpha exposed but blend mode not setup",
		        plane->base.id, plane->name);
```
The `plane->base.id` line appears to use spaces for alignment — should use tabs per kernel coding style (compare with the `alpha_property` error message a few lines above which uses the correct tab alignment).

- The function `drm_mode_config_enforce` is not exported (`EXPORT_SYMBOL`) which is fine since it's only called from `drm_drv.c`, but it also lacks a kerneldoc comment. Since `drm_mode_config_validate()` also lacks one, this is consistent, but worth noting.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-04 22:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 14:06 [PATCH v2 0/2] drm/drm_blend: allow blend mode property without PREMULTI Leandro Ribeiro
2026-05-04 14:06 ` [PATCH v2 1/2] " Leandro Ribeiro
2026-05-04 22:17   ` Claude review: " Claude Code Review Bot
2026-05-04 14:06 ` [PATCH v2 2/2] drm: ensure blend mode supported if alpha exposed Leandro Ribeiro
2026-05-04 22:17   ` Claude Code Review Bot [this message]
2026-05-04 22:17 ` Claude review: drm/drm_blend: allow blend mode property without PREMULTI 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-patch2-20260504140630.68707-3-leandro.ribeiro@collabora.com \
    --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