From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com [136.143.188.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A78EC3A6B6F; Fri, 17 Jul 2026 22:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784328913; cv=pass; b=prGr93ZoFRSY3+/4+p+ELwGfktGDjEoTjI7e6ah8L0zT6C+NQKRDieqUFtpwzp85iU+0e91+eZQH6/HRhqw2bJmg0CPMqlMYHv8G7LTCe/SIKaGbXw1OrvJhcKgTVDZLCO07XcGhPZj02tygxR5hi0BP7vPSfFHDaPdjJNoHLEY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784328913; c=relaxed/simple; bh=uMPkgSCDynBaQW/Pksj135TvSAFtABpB4a0gf+crsFo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DYdmeEJpnQCDf1QCTGQKWTf2ROaORvSAYMverorslNngoSd11PpWH6OOfPHYeKChDY25KPNDg4bSYpT8838tmgMzszBETw861I9HhCgI5NDAUi3o2ZrK/1wdmI0KcDIhE931QDYNa7mk1WhDqMBmfVkBwZxKVLYdWUNRFqeuWyk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=leandro.ribeiro@collabora.com header.b=cYhZyK8C; arc=pass smtp.client-ip=136.143.188.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=leandro.ribeiro@collabora.com header.b="cYhZyK8C" ARC-Seal: i=1; a=rsa-sha256; t=1784328895; cv=none; d=zohomail.com; s=zohoarc; b=B8dVvF5W0UK/Id6aeqAllIzfgB45tjDS92iLw7PgEIj/CT+xlprVTjsTkNWafNB6jwRxmkQ95l6NwmOU1Q7rE/QqHuwQN3R4/KWLjyY7XjTAHpIqIN5jJds+7YTp+0Z4y+oLaevczKypr6cuknxMmGdbhl1s09VLtr0Ir2uDTUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784328895; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=1axtl3tCNHAHjeKjFPctqjuywHMJ27BqGaKLqopjT9M=; b=WZx9E92q8lDw/4eYdfdAlQYyKq08YMZDymo9j/7+mX+59/Nnvm4Sm6/U3/teIqWJXzP1F5GTUrmvx2I/nnCaLG1cqHM2zyDqAhcjq0NWduQEcnLm2yUWKSM5uMbB9HW+zV6ClsjyVUnm72TkrwF7HUvGCHYxR0BSBOv+955wdQ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=leandro.ribeiro@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1784328895; s=zohomail; d=collabora.com; i=leandro.ribeiro@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=1axtl3tCNHAHjeKjFPctqjuywHMJ27BqGaKLqopjT9M=; b=cYhZyK8CvmXiVJgEqkdt6fW86GT9T0XNoUrYVEw5w9UEymh/tsb90HocTEMiKA/b 7IgmNR/eZLuX1TogU8MMq2ydks1mWA0fSS1blIJ38YyVf39rd4L98HGXEhm8oGcGpiC rTCesg8Hyax6T6aG6Upv/max6wjf3JnrN8YDeQFs= Received: by mx.zohomail.com with SMTPS id 1784328892532746.7691096186728; Fri, 17 Jul 2026 15:54:52 -0700 (PDT) Message-ID: <45d341e6-d438-4e34-bba2-f6d23dbcf7fb@collabora.com> Date: Fri, 17 Jul 2026 19:54:45 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: warnings from validate_blend_mode_for_alpha_formats() in next-20260715 To: Alex Deucher , Bert Karwatzki , "Wentland, Harry" , "Leo (Sunpeng) Li" , Alex Hung Cc: Alex Deucher , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-next@vger.kernel.org, Jesse Zhang , Amber Lin , Mario Limonciello References: <20260716152933.6744-1-spasswolf@web.de> Content-Language: en-US From: Leandro Ribeiro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External On 7/17/26 11:55 AM, Alex Deucher wrote: > + Some display folks > > On Fri, Jul 17, 2026 at 9:04 AM Bert Karwatzki 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