All of lore.kernel.org
 help / color / mirror / Atom feed
* warnings from validate_blend_mode_for_alpha_formats() in next-20260715
@ 2026-07-16 15:29 Bert Karwatzki
  0 siblings, 0 replies; only message in thread
From: Bert Karwatzki @ 2026-07-16 15:29 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Bert Karwatzki, Leandro Ribeiro, linux-kernel, amd-gfx,
	linux-next, Jesse Zhang, Amber Lin, Mario Limonciello

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
   

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-16 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 15:29 warnings from validate_blend_mode_for_alpha_formats() in next-20260715 Bert Karwatzki

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.