Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1042168lqm; Thu, 2 May 2024 03:39:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJghwOEqrOlPQ3fsuAnwlFUmd3mq4mWtvAvUNcy/iSSLSefIp7uuCEYPLvxQedRyP143DS5pVV+Db8J3Qd7knr3nEaooDCfrPM0dg2jg== X-Google-Smtp-Source: AGHT+IF7eO57fe1nkYf2kDsNHuqkV8OCvNu3BJimMPQBZWa85HeqXCLDg4MqHu5ibqkiIYJZ7a9E X-Received: by 2002:a05:620a:1a26:b0:790:72ab:251d with SMTP id bk38-20020a05620a1a2600b0079072ab251dmr3817877qkb.12.1714646396362; Thu, 02 May 2024 03:39:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714646396; cv=pass; d=google.com; s=arc-20160816; b=czQCIAIHo6YR4/1XiEHh3jiZe2G9lfCbSB1ujGz4aH3IWmlTwRuugbznu+wlxF7WT/ vFNJoeKUe0gCqv1ZUzyfK9jA+NHj/ZDE06qOAAUm+840HDEll5h7oI35ijVjHCz851jQ xeXiYi9wNxV0BVFx1RWEyQq5ffpO2ecaP677CRWRk0xFtbkZcZ+inUZ1yjBSuLJWhbTH pcHiYZ1c8WdOJDQMpar1HrfDfE3E3b76W/LFGW7DsBq+jy/V0PCYqUJfzPdr1t6eW9XP HGC8Pxp9RPeNf2uUFSz3oFCi8wR+y+p5YUGyIpeNnSLhlyJ7FPLS7bYGMMRO2i02/f6z Fmaw== 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=4jB8fc4gJ0f7qF/dlJk7l+biGZsYIZnuAq+fFyhiGKg=; fh=WDbJBf7vmcLtsuNVv5t5UxvBRtuOFYPCW/4VP7Yx+3k=; b=p4rpowwoBaJanSYCOzFYRelM0HvuJhUGl/sxigDHFR9vEhbTuJT+4n/USYiPIFDg6L wvBZm07T5rp34cVFz/wSJx9Izy42Gmj0/5baKarVCE6bCoZOl7POBhmsG8tnMC5DARWz xnLnVujr26PoqYMLsGvLCuIcmVEfIJfG+L+T2s2z2913c85sgg2rPkKyN9I63i2l5Ehr iN4qCDVydRRsJdzOlp2ELOgXa8JS0fk6f3kONOiEoo5wEd4roLNCwO5V04gCjqY/jzha XnNZFS/Jq5TyCLm+ErLgN9avvKK4JIjk0XfZEAmvjo5R4C49l/q4MN+n0XDoefMi7dps s3PA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=knBFtEjP; 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-166318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166318-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c5-20020ac87d85000000b0043ae85ab7c3si697258qtd.4.2024.05.02.03.39.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 03:39:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=knBFtEjP; 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-166318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166318-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 1B17F1C21F11 for ; Thu, 2 May 2024 10:39:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 487D669956; Thu, 2 May 2024 10:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="knBFtEjP" 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 231F65DF3B for ; Thu, 2 May 2024 10:39:03 +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=1714646345; cv=none; b=rJ2POi4yvq8B2UpP7lSKH+5fRasnCBBX/9QNMPeJAXJr9H5CouCuxAE9dqni3HqbLBRS69IIC03xdiTkqUahZ0PpNH7Qab7i69A5MHPWpBxs00xYQXLWkpwCzsf5MEIXBepnxuTSchB0TIoZD83XOODZgASI0Drx+DpqtGai5W4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714646345; c=relaxed/simple; bh=uDbktYi9LPAobFoqXk1NYhKd//A//1E8N8FFaOkeq/w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y/q4vJivJp1IP0uF7jzscvDECpdz6sbhFnXEmQmIYHqnk/FfczuhpNPT4/2LawMj5xQOFQoEB5ECG1HJUXyxvouKU5Eh1T1Mo39uHC+6Alm8oyucPBxQBoYZznEmyMBRGmDIcK5Zco+rdNJ6YeWLeqr8Ownv7lGub4+6Mclda3s= 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=knBFtEjP; 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: 2f0ccc98087011ef8065b7b53f7091ad-20240502 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=4jB8fc4gJ0f7qF/dlJk7l+biGZsYIZnuAq+fFyhiGKg=; b=knBFtEjPB3tGzPxWKsv1ykzYpf68Nt6st2F9y0UTUUN+iWJf14x+UXuXXr0ygHzdwks1vCzHMEMmVTf8jA8HwVMln0IY99FRQgieFqCZUdYEExTbhUU9jkc6sw8zDorqXboXAKFR22hYTugOD33B7JaxwA0p9iMFSDc7BFsKoxs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.38,REQID:0fd64e0c-8591-4651-a7c2-fe309fb227d2,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:82c5f88,CLOUDID:0b5a4592-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 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 2f0ccc98087011ef8065b7b53f7091ad-20240502 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1366279155; Thu, 02 May 2024 18:38:59 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 2 May 2024 18:38:57 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 2 May 2024 18:38:57 +0800 From: Shawn Sung To: Chun-Kuang Hu , AngeloGioacchino Del Regno CC: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Bibby Hsieh , CK Hu , "Nancy . Lin" , Fei Shao , Sean Paul , Jason Chen , , , , , Hsiao Chien Sung Subject: [PATCH v7 14/18] drm/mediatek: Support "None" blending in Mixer Date: Thu, 2 May 2024 18:38:44 +0800 Message-ID: <20240502103848.5845-15-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20240502103848.5845-1-shawn.sung@mediatek.com> References: <20240502103848.5845-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-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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/mediatek/mtk_ethdr.c index 4f043be21ee36..91ebeee6c8b1d 100644 --- a/drivers/gpu/drm/mediatek/mtk_ethdr.c +++ b/drivers/gpu/drm/mediatek/mtk_ethdr.c @@ -180,7 +180,8 @@ void mtk_ethdr_layer_config(struct device *dev, unsigned int idx, else mix_con |= NON_PREMULTI_SOURCE; - if (state->base.fb && !state->base.fb->format->has_alpha) { + if (state->base.pixel_blend_mode == DRM_MODE_BLEND_PIXEL_NONE || + (state->base.fb && !state->base.fb->format->has_alpha)) { /* * Mixer doesn't support CONST_BLD mode, * use a trick to make the output equivalent -- 2.18.0