mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Bert Karwatzki <spasswolf@web.de>,
	"Wentland, Harry" <Harry.Wentland@amd.com>,
	"Leo (Sunpeng) Li" <Sunpeng.Li@amd.com>,
	Alex Hung <alex.hung@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	linux-next@vger.kernel.org, Jesse Zhang <jesse.zhang@amd.com>,
	Amber Lin <Amber.Lin@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: warnings from validate_blend_mode_for_alpha_formats() in next-20260715
Date: Fri, 17 Jul 2026 19:54:45 -0300	[thread overview]
Message-ID: <45d341e6-d438-4e34-bba2-f6d23dbcf7fb@collabora.com> (raw)
In-Reply-To: <CADnq5_PEN=iuspWbQ9C3gJZ5qJVOLmJ5hrsi6FH0Dg2Y_u2mZQ@mail.gmail.com>



On 7/17/26 11:55 AM, Alex Deucher wrote:
> + Some display folks
> 
> On Fri, Jul 17, 2026 at 9:04 AM Bert Karwatzki <spasswolf@web.de> wrote:
>>
>> commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
>> introduces validate_blend_mode_for_alpha_formats() which prints warnings for amdpgu as
>> amdgpu only set blend_mode_property for planes of type DRM_PLANE_TYPE_OVERLAY. I tried to fix
>> this by removing he (plane->type == DRM_PLANE_TYPE_OVERLAY) check in amdgpu_dm_plane_init():
>>
>>         printk(KERN_INFO "%s: plane=%px plane->type=0x%x plane_cap=%px\n", __func__, plane, plane->type, plane_cap);
>>         if (plane_cap)
>>                 printk(KERN_INFO "%s: per_pixel_alpha =%u\n", __func__, plane_cap->per_pixel_alpha);
>>         if (plane_cap && plane_cap->per_pixel_alpha) {
>>                 unsigned int blend_caps = BIT(DRM_MODE_BLEND_PIXEL_NONE) |
>>                                           BIT(DRM_MODE_BLEND_PREMULTI) |
>>                                           BIT(DRM_MODE_BLEND_COVERAGE);
>>
>>                 printk(KERN_INFO "%s: creating alpha and blend mode properties for plane %px\n", __func__, plane);
>>                 drm_plane_create_alpha_property(plane);
>>                 drm_plane_create_blend_mode_property(plane, blend_caps);
>>         }
>>
>> But this does not completely silence the warnings becuase for planes of type DRM_PLANE_TYPE_CURSOR plane_cap is NULL.
>> Is this a problem that should be fixed in amdgpu or is should validate_blend_mode_for_alpha_formats() only be called
>> for planes of certain types?

IMO validate_blend_mode_for_alpha_formats() should be called for all
types of planes. I can't think of anything special about a cursor plane
that would justify it being allowed to expose formats with alpha but not
the blend mode property.

I'm not familiar with the AMD codebase to suggest the best fix, but the
driver would need some way to know whether cursor planes are exposing
formats with alpha.

>>
>> Bert Karwatzki
>>

-- 
Leandro Ribeiro


  reply	other threads:[~2026-07-17 22:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 15:29 Bert Karwatzki
2026-07-17 14:55 ` Alex Deucher
2026-07-17 22:54   ` Leandro Ribeiro [this message]
2026-07-18  9:21     ` Bert Karwatzki
2026-07-18 12:22       ` Bert Karwatzki

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=45d341e6-d438-4e34-bba2-f6d23dbcf7fb@collabora.com \
    --to=leandro.ribeiro@collabora.com \
    --cc=Amber.Lin@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=jesse.zhang@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=spasswolf@web.de \
    /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

Powered by JetHome