Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Nathan Chancellor <nathan@kernel.org>,
	Leandro Ribeiro <leandro.ribeiro@collabora.com>,
	Dave Airlie <airlied@redhat.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jocelyn Falempe <jfalempe@redhat.com>
Cc: dri-devel@lists.freedesktop.org, airlied@gmail.com,
	daniels@collabora.com, jani.nikula@linux.intel.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	pekka.paalanen@collabora.com, simona@ffwll.ch,
	ville.syrjala@linux.intel.com, linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] drm: ensure blend mode supported if pixel format with alpha exposed
Date: Wed, 22 Jul 2026 13:05:13 +0100	[thread overview]
Message-ID: <126e8bdb-9c39-4fbd-ae8a-26a61dd4f3d6@nvidia.com> (raw)
In-Reply-To: <20260721234802.GA439272@ax162>


On 22/07/2026 00:48, Nathan Chancellor wrote:
> Hi Leandro,
> 
> + ast folks
> 
> On Tue, May 26, 2026 at 03:17:00PM -0300, Leandro Ribeiro wrote:
>> Before "drm/drm_blend: allow blend mode property without PREMULTI",
>> userspace would have to assume that only PREMULTI was supported by
>> drivers that didn't expose the blend mode property. But now userspace
>> shouldn't rely on that, as they can't count with drivers always
>> supporting PREMULTI.
>>
>> Warn if a driver exposes pixel formats with alpha but doesn't expose the
>> blend mode property. This way userspace doesn't have to guess. Drivers
>> triggering this warning must be fixed.
>>
>> Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
>> ---
>>   drivers/gpu/drm/drm_mode_config.c | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
>> index 66f7dc37b597..8cca1dea3b3d 100644
>> --- a/drivers/gpu/drm/drm_mode_config.c
>> +++ b/drivers/gpu/drm/drm_mode_config.c
>> @@ -674,6 +674,25 @@ static void validate_encoder_possible_crtcs(struct drm_encoder *encoder)
>>   	     encoder->possible_crtcs, crtc_mask);
>>   }
>>   
>> +static void validate_blend_mode_for_alpha_formats(struct drm_plane *plane)
>> +{
>> +	const struct drm_format_info *fmt;
>> +	u32 i;
>> +
>> +	/* blend mode property supported, no need to check anything */
>> +	if (plane->blend_mode_property)
>> +		return;
>> +
>> +	for (i = 0; i < plane->format_count; i++) {
>> +		fmt = drm_format_info(plane->format_types[i]);
>> +		if (fmt->has_alpha) {
>> +			WARN(1, "[PLANE:%d:%s] pixel format with alpha exposed but "
>> +			     "blend mode not setup", plane->base.id, plane->name);
> 
> I am seeing this warning trigger on a few of my machines in -next. A
> couple of those use amdgpu, which I see has already been reported in a
> separate thread. Another one uses ast, which I do not see reported
> (apologies if I missed it).
> 
>    [  +0.000137] ------------[ cut here ]------------
>    [  +0.000004] [PLANE:37:plane-1] pixel format with alpha exposed but blend mode not setup
>    [  +0.000019] WARNING: drivers/gpu/drm/drm_mode_config.c:873 at drm_mode_config_validate+0xa24/0xad0, CPU#0: kworker/0:2/507
>    [  +0.000010] Modules linked in: ghash_ce gf128mul nvme ast(+) nvme_core sbsa_gwdt i2c_algo_bit nvme_keyring nvme_auth xgene_hwmon gpio_dwapb fuse scsi_dh_alua scsi_dh_rdac i2c_dev scsi_dh_emc
>    [  +0.000014] CPU: 0 UID: 0 PID: 507 Comm: kworker/0:2 Not tainted 7.2.0-rc4-next-20260721-00002-g17fa9b81f4c4 #1 PREEMPT(lazy)
>    [  +0.000003] Hardware name: To be filled by O.E.M Ampere Altra Developer Platform/Ampere Altra Developer Platform, BIOS TianoCore 2.10.100.02 (SYS: 2.10.20
>    [  +0.000002] Workqueue: sync_wq local_pci_probe_callback
>    [  +0.000004] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
>    [  +0.000003] pc : drm_mode_config_validate+0xa24/0xad0
>    [  +0.000002] lr : drm_mode_config_validate+0xa24/0xad0
>    [  +0.000002] sp : ffff800082df3c30
>    [  +0.000001] x29: ffff800082df3c60 x28: ffffde7ac3633fc2 x27: 0000000000000001
>    [  +0.000004] x26: 0000000000000001 x25: 0000000000000002 x24: 0000000000000000
>    [  +0.000003] x23: ffff07ffb54b0290 x22: ffff07ffb54b0be0 x21: ffffde7ac36ebb13
>    [  +0.000003] x20: 0000000000000001 x19: ffff07ffb54b0000 x18: ffff800082dd5038
>    [  +0.000003] x17: 00000000d949c370 x16: 00000000d949c370 x15: ffffde7ac358f156
>    [  +0.000002] x14: 0000000000000386 x13: ffff081eeebf2850 x12: 0000000000000000
>    [  +0.000003] x11: 0000000000000000 x10: ffffde7ac44b5850 x9 : 738b2a5f3c615c00
>    [  +0.000003] x8 : 738b2a5f3c615c00 x7 : 0000000000000000 x6 : 206c65786970205d
>    [  +0.000003] x5 : ffff081f6fcc917b x4 : ffffde7ac36ebb59 x3 : ffffffffffff0a00
>    [  +0.000002] x2 : 0000000000000001 x1 : 0000000000000000 x0 : 000000000000004b
>    [  +0.000003] Call trace:
>    [  +0.000001]  drm_mode_config_validate+0xa24/0xad0 (P)
>    [  +0.000003]  drm_dev_register+0x44/0x3d8
>    [  +0.000004]  ast_pci_probe+0x330/0x354 [ast]
>    [  +0.000016]  local_pci_probe_callback+0x68/0xc0
>    [  +0.000002]  process_scheduled_works+0x23c/0x668
>    [  +0.000003]  worker_thread+0x218/0x324
>    [  +0.000003]  kthread+0x130/0x180
>    [  +0.000002]  ret_from_fork+0x10/0x20
>    [  +0.000004] ---[ end trace 0000000000000000 ]---

I am also seeing the same warning on -next for Tegra194 based devices.

> If there is any other information I can provide or patches I can test, I
> am more than happy to do so.

Same. Happy to provide any more information or test any other changes.

Jon

-- 
nvpublic


       reply	other threads:[~2026-07-22 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260526181700.25310-1-leandro.ribeiro@collabora.com>
     [not found] ` <20260526181700.25310-3-leandro.ribeiro@collabora.com>
     [not found]   ` <20260721234802.GA439272@ax162>
2026-07-22 12:05     ` Jon Hunter [this message]
2026-08-04  9:07       ` [PATCH v4 2/2] drm: ensure blend mode supported if pixel format with alpha exposed Geert Uytterhoeven
2026-08-04 12:49         ` Geert Uytterhoeven

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=126e8bdb-9c39-4fbd-ae8a-26a61dd4f3d6@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jfalempe@redhat.com \
    --cc=leandro.ribeiro@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nathan@kernel.org \
    --cc=pekka.paalanen@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.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