Linux-Next discussions
 help / color / mirror / Atom feed
From: Bert Karwatzki <spasswolf@web.de>
To: Alex Deucher <alexander.deucher@amd.com>
Cc: Bert Karwatzki <spasswolf@web.de>,
	Leandro Ribeiro <leandro.ribeiro@collabora.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: warnings from validate_blend_mode_for_alpha_formats() in next-20260715
Date: Thu, 16 Jul 2026 17:29:32 +0200	[thread overview]
Message-ID: <20260716152933.6744-1-spasswolf@web.de> (raw)

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?

Bert Karwatzki
   

                 reply	other threads:[~2026-07-16 15:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260716152933.6744-1-spasswolf@web.de \
    --to=spasswolf@web.de \
    --cc=Amber.Lin@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=jesse.zhang@amd.com \
    --cc=leandro.ribeiro@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mario.limonciello@amd.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