Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp544658lqs; Thu, 13 Jun 2024 19:48:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAejZt6xfY6PHb2Cn+stq9V+vJFjK9wB3carLZgBZFf6CJHAuiAzMDXajjNXw2ES/SjywROgeYd7wrWgVI8p1SyvMUwFv9EYOSIgprzw== X-Google-Smtp-Source: AGHT+IH5Fu7hrzPAcfuKwfEgwoiMcyz1ogS1/9XXShttHwNWYjWFYQXTc7ecxdZMRllW+h5Vx1sT X-Received: by 2002:a05:6358:5f1a:b0:19f:5317:499b with SMTP id e5c5f4694b2df-19fb4ff3e90mr169225155d.30.1718333318125; Thu, 13 Jun 2024 19:48:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718333318; cv=pass; d=google.com; s=arc-20160816; b=mXkO9/Q/MTa4Vxd07T/5drPope/qSBBtsyt6oIqR8X5J3uqOObrVkVFrn8tAJb1ltQ I9bBvtDTfbt8rvxbGYaWSNecsTGI+wXAVF0pzLgQuMPDCKp3A5TlLE0ZDbfUL9ZPHCFi 7JEfxck/QKgOg9on3iBl8EzNj0ZRSvsrOX7PI1fOPK2LxB+vNPFuKfN6eXCa4ulFgcyT /a1VoTK4FTMIzAsmFgjVUKYncR0oXJuyRdLxLRUfBbP1MFb4Ai2Ehkno5NfjGZigxxPH RZ0f/4miy1V5SDkX2kWiEopBLVgrZ8ziTtHbawLAGadBaILr8mYqi+OUmwNx6LmsmKu4 IGng== 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=P2qkrOr5qvVcuU8Akj5R1+oKaguq9iNgCCld5Y8r5lk=; fh=q/Ppq8/frEfcA3kotGB0IrpJr8gO0uNs3CtN4uoBAAY=; b=ylG8WqtEz2tImBf1mlvJPMkbIrIiseB4sNJB4t4HysxH6XMijnWMqspDAMamOVugwr B71pYNaB69aiSuaGGaI7FLLWSBXsYzLLWKMvVk1wMenc7yqgZ+Hea+7L3DyPOfChjh3+ Y36A3ov5FMAuSVXJ0VfC8Aco3hFonPsQiZM4dH4/Vbkaw5ZoQOTr02wJiolZ0+qB9c8W 72M/uRg51z9umPJqZLFqFzqdL57n5fYjq7d/heY5HCNH2yk1m3bpqhU4HsWw4RJfOZ0L Fu8Privo2rJ9g3EQqkvwuR2U7rDGAYQYVEgZlzm0PPZ/bdf+SOpa2TClG24mb09YGcML CG2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=G6YRFFYs; 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-214256-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214256-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee67b85f8si2398846a12.835.2024.06.13.19.48.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 19:48:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214256-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=G6YRFFYs; 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-214256-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214256-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 40CAEB21018 for ; Fri, 14 Jun 2024 02:47:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22482186E3C; 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="G6YRFFYs" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (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 20621184126 for ; Fri, 14 Jun 2024 02:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718333193; cv=none; b=d/kaXBhcFpX5G/zMhCKrNFAUio+DvuaAa4lop4zf94bXEahga04T5R/JIs77bUbhjzYdbXkTA4arqfbKImPMw1GuMVYodl2rD8p9MUq3U+b4r0+95ALPcWzaN5PZTgsmiHHCkXewt2JsSeNHMx7TWYjY+LinO+T60rf/0m+PsLA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718333193; c=relaxed/simple; bh=Dbgk/yS5uy6GQVFaPI5W8rBUT0ppa+EieurkgWDxeac=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tEhCRK+cVa/KjiZ+mPg4eVTVqTIH6KSO4RCd928qXSNfgyt15jVAnmdI8PWWgnYMM6q3/wEPGqBT4tj/v4/IEFut7QZHf5jqF1k18BYORohmjjdWNbkN2vgU3EQbs8KZyexAUdt18h0yU8UPFfuVMV1eUcGHBtLh2bi9w1OzGIc= 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=G6YRFFYs; arc=none smtp.client-ip=60.244.123.138 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: 4a84278829f811efa54bbfbb386b949c-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=P2qkrOr5qvVcuU8Akj5R1+oKaguq9iNgCCld5Y8r5lk=; b=G6YRFFYshJCf9sCTTFJt+9P3OcFG/6hjS4G8gmIGrp8FCreMN/qQPnCXBC3dpTKpnjmUpl4SoX2qBLCopIKVEDBiiFsrP1k5xTTzGp6+tI/14ExTJHodH6LwYTmiL/LfeRvCT7geWjGv64nbFaIZD5t/9yMEXlImQDlejNcrakc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.39,REQID:72fc24cc-9937-4d39-9ceb-496567f4fcee,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:c5df9188-8d4f-477b-89d2-1e3bdbef96d1,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: 4a84278829f811efa54bbfbb386b949c-20240614 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 720227250; Fri, 14 Jun 2024 10:46:25 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) 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:23 +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:23 +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 12/21] drm/mediatek: Support DRM plane alpha in OVL Date: Fri, 14 Jun 2024 10:46:11 +0800 Message-ID: <20240614024620.19011-13-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-MTK: N From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index 1923bbd96014..2316d4a6dca7 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -450,8 +450,10 @@ void mtk_ovl_layer_config(struct device *dev, unsigned int idx, } con = ovl_fmt_convert(ovl, fmt); - if (state->base.fb && state->base.fb->format->has_alpha) - con |= OVL_CON_AEN | OVL_CON_ALPHA; + if (state->base.fb) { + con |= OVL_CON_AEN; + con |= state->base.alpha & OVL_CON_ALPHA; + } /* CONST_BLD must be enabled for XRGB formats although the alpha channel * can be ignored, or OVL will still read the value from memory. -- 2.18.0