Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp544462lqs; Thu, 13 Jun 2024 19:47:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWq5CKJf0u0W4hBfvF5Z+wS0a4dRJq2z+pmhfbiDgdnxOn+4EVqFLR0JNFFTzlLTO3B1ttQ6d0lYOTW0LdvE+Rs8SQvRo5hzE0J5EIHbQ== X-Google-Smtp-Source: AGHT+IEiGl30hIBiLhByZ5NNSVlt/M7+LGPsheImvudmAEEzQhDBMiSk9JHSl2aonLRXTWOST9tJ X-Received: by 2002:a05:690c:4489:b0:615:20db:4a4d with SMTP id 00721157ae682-6322402ff74mr16751487b3.35.1718333278520; Thu, 13 Jun 2024 19:47:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718333278; cv=pass; d=google.com; s=arc-20160816; b=MvxsDHcFt6GGbjtlqLt/fFqiJjd7bi7A+w8osbEuDEqcKd0AOZ/eVB1oeUQcywwXvO v0pLiyUYJwfpMmW35AdTbp2ZdgeK3E1/xPAus2dvdq/kPejOW6rNq3C7+9BsWgtf5h0U FiEqRbL/f1VsZCHtQnM0cdUTQqrLOnpZT6AEhEoJn9pKfZEVPJ5y8L9zjFRUNUEGn8X2 dAYBYsbzYZg1HHxzDSiIf8xoPE21SWHXg5GYNaghXWPHc5R78vDsI0QPQj6FcKkZmv+c y2a4T/E6fIX6qu4CqXnlihyXQ6ZIwZ4y43Y4pE6ODHcOBxlDcO1QBVHy8ARq+8RWep06 UZ2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dj4y3TjMpJOFW7mABZnCDxfHdozH/Jr9EVuCNDNHtk8=; fh=Cte0M41KL382K/845AypIeaUjyBIokCILHK+7S14cpc=; b=qDhjSbCcjttboZ1RqxmstsmdgqGUqTdmtF0qy1XW1Zm3ykzuk2y0o5IzXZErc1buS4 yPF+RxOo548TJjT/iHR4r+shwu7+6w4QgaVbw4x61nOtZXwRNGB8dNOVrMijqXYmbjJx ArvUl48lwe57UA+QofeGyT3yY0JVgWyDe+DeNRjw4Ccpy2NMZ+VIIzZoDHN5aZAHvB3c HulXMfsunhp7STfsTrMmVUr6ZKOICgGm6AeJfB/HatcrwQzpYybli/DEDEi/U4mo7HL+ mELCK9YyDSUEDk4Q1dDSOOGx5bFYktA/gwI8mPYsOSTJDCa+q63TviTUTsZ799WZtu8x iTWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VgLrKIl9; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-214257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b8b2b5si28247596d6.583.2024.06.13.19.47.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 19:47:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VgLrKIl9; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-214257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 392B61C20CE6 for ; Fri, 14 Jun 2024 02:47:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B3E3186E4C; Fri, 14 Jun 2024 02:46:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="VgLrKIl9" Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (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 88CC7184136 for ; Fri, 14 Jun 2024 02:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718333193; cv=none; b=SKngwhA7aeFOt8G8F3UxQ68lkPP9mZLWACp1rUlLU1fCCywZOC+/skBvqAjgKCOoarEtLBoWmLgq3YuEx592MEKGdODtHva3Tw/Rm/We/nq9mEVTwVNmb3thtH6xpN7xYquCaHETIF1cfafQ1YcDJDGMm+Ozrv3wN/tlpYIvxmk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718333193; c=relaxed/simple; bh=dTggPV7sZaEvU0IiodIBgCnYwX1dIfQGHvo2TqzQqjg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mfakpwUZ/Ji2jyOwvUnWWol074Eu/8XqsjOVBAlyT67ARyRKXhmqCg/CGyfMRysCJZ3JsCEHu3of3ylRqWEJo/4d1NIMO9KZFMcuHVTF0EiFhF09ClbacQailNWs1VpUYSHxYI3riLERKP/4QKzrLp0gWSIY8jwdFLqkLYrV6BI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=VgLrKIl9; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 4b67c3ee29f811efa22eafcdcd04c131-20240614 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=dj4y3TjMpJOFW7mABZnCDxfHdozH/Jr9EVuCNDNHtk8=; b=VgLrKIl9bDE3Im93NM1eurOjJLi+zj+q8djYmiWZPOU1JVpv3PG58gblFxeXxQOugWEEtxaz1CK/P6CjvMe0Q0qaxM5MtKdPXoe/HsaqYwJQ5QtQ0Te7QYxqL71aGysuBZ136HWMhWc3sgyMTevVqVC255oLFo8vjEcEfir5QDc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:f35ad39e-4cfc-44f7-b573-557a33c62ff6,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:393d96e,CLOUDID:9ec6f893-e2c0-40b0-a8fe-7c7e47299109,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1, SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 4b67c3ee29f811efa22eafcdcd04c131-20240614 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1521459447; Fri, 14 Jun 2024 10:46:26 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 14 Jun 2024 10:46:24 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 14 Jun 2024 10:46:24 +0800 From: Shawn Sung To: Chun-Kuang Hu CC: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , AngeloGioacchino Del Regno , "Bibby Hsieh" , CK Hu , "Nancy . Lin" , Sean Paul , Jason Chen , Fei Shao , , , , , Hsiao Chien Sung Subject: [PATCH v9 15/21] drm/mediatek: Support "None" blending in Mixer Date: Fri, 14 Jun 2024 10:46:14 +0800 Message-ID: <20240614024620.19011-16-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240614024620.19011-1-shawn.sung@mediatek.com> References: <20240614024620.19011-1-shawn.sung@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--2.904600-8.000000 X-TMASE-MatchedRID: B7xIh5hTocDX3tqA7xZNm8ULzBBTAHAlG9Itfzsy8/WOUV82NDH4AlO4 BD7nLMxnTiQecD9aKoSRYJdMgDxPlopsQeZV7e/elUgQqGVMqmwk227IvqakhZsoi2XrUn/Jn6K dMrRsL14qtq5d3cxkNaGL6FinfedKXOIkAKiucmJZmVQnF9pSCWIbWLMPCbj4iY7MY8aB/ufMpj /sWaNtu8RH5snjo2MJUqFRtWIorbGQJHt+yuvvF6DE4wLr4uZ8dATQdtPksR+3/JiWOe6GXXSWg Q2GpXdZbxffl9hhCBw= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.904600-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: FD0522F46D4E455882CE90A124D6603712A181DCE2A92C0AF48E82A4F385B26F2000:8 X-MTK: N From: Hsiao Chien Sung Support "None" alpha blending mode on MediaTek's chips. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/mediatek/mtk_ethdr.c index 7eaafd44f320..907c0ed34c64 100644 --- a/drivers/gpu/drm/mediatek/mtk_ethdr.c +++ b/drivers/gpu/drm/mediatek/mtk_ethdr.c @@ -3,6 +3,7 @@ * Copyright (c) 2021 MediaTek Inc. */ +#include #include #include #include @@ -175,7 +176,8 @@ void mtk_ethdr_layer_config(struct device *dev, unsigned int idx, alpha_con |= state->base.alpha & MIXER_ALPHA; } - if (state->base.fb && !state->base.fb->format->has_alpha) { + if ((state->base.fb && !state->base.fb->format->has_alpha) || + state->base.pixel_blend_mode == DRM_MODE_BLEND_PIXEL_NONE) { /* * Mixer doesn't support CONST_BLD mode, * use a trick to make the output equivalent -- 2.18.0