All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Huacai Chen" <chenhuacai@loongson.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH V3] drm/loongson: Create blend mode property for cursor plane
Date: Thu, 03 Sep 2026 08:56:30 +0000	[thread overview]
Message-ID: <20260903085630.83E4B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903084212.3621540-1-chenhuacai@loongson.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] State mismatch between blend mode property and atomic state initialization rejects atomic commits.
--

commit e4c1ccbb76c983c05930b35bbb7291c8273016d7
Author: Huacai Chen <chenhuacai@kernel.org>

drm/loongson: Create blend mode property for cursor plane

This commit adds a blend mode property for cursor planes, exposing only
the DRM_MODE_BLEND_COVERAGE mode since the hardware does not support
DRM_MODE_BLEND_PREMULTI.

> diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c b/drivers/gpu/drm/loongson/lsdc_plane.c
> index bea42215796d4..bcc0ffa17bdf2 100644
> --- a/drivers/gpu/drm/loongson/lsdc_plane.c
> +++ b/drivers/gpu/drm/loongson/lsdc_plane.c
[ ... ]
> @@ -765,7 +766,7 @@ int ls7a1000_cursor_plane_init(struct drm_device *ddev,
>  
>  	drm_plane_helper_add(plane, &ls7a1000_cursor_plane_helper_funcs);
>  
> -	return 0;
> +	return drm_plane_create_blend_mode_property(plane, BIT(DRM_MODE_BLEND_COVERAGE));
>  }

[Severity: High]
Will this cause atomic commits to fail during modesetting?

This adds a blend mode property supporting only COVERAGE, but the driver's
plane functions use the default reset hook:

drivers/gpu/drm/loongson/lsdc_plane.c:lsdc_plane_funcs {
        ...
        .reset = drm_atomic_helper_plane_reset,
        ...
}

The default drm_atomic_helper_plane_reset() unconditionally initializes
the plane state to PREMULTI.

Because PREMULTI is not registered as a supported enum value in the plane's
blend mode property mask, when compositors query the current properties and
submit them back, validation fails in drm_property_change_valid_get()
returning -EINVAL.

Should the driver provide a custom reset hook that initializes the state to
DRM_MODE_BLEND_COVERAGE instead?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903084212.3621540-1-chenhuacai@loongson.cn?part=1

  reply	other threads:[~2026-09-03  8:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  8:42 [PATCH V3] drm/loongson: Create blend mode property for cursor plane Huacai Chen
2026-09-03  8:56 ` sashiko-bot [this message]
2026-09-03  9:01 ` Icenowy Zheng
2026-09-04  8:39 ` Jianmin Lv
2026-09-17  5:08 ` Icenowy Zheng
2026-09-17  6:16   ` Thomas Zimmermann
2026-09-17  7:16 ` Icenowy Zheng

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=20260903085630.83E4B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.