Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1721702lqs; Sun, 16 Jun 2024 01:30:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUT3pVGkg6ZG3cFzeaQK5KmOcf5rpO788iX5qzAv3uzu6kFXVgW9r6NADuPaS+HsxqBNHEMwL95qE8JwYziJ/kvymKNCUBD5+s3dJqxGA== X-Google-Smtp-Source: AGHT+IFBKvsambLr1Fcal7G1XwuJtN8+njwraMSNGbD9aFufrJZ5duieArpYZEl3uOXiuWuwJj74 X-Received: by 2002:a05:620a:3951:b0:795:4948:328f with SMTP id af79cd13be357-798d26a8830mr762056185a.70.1718526610878; Sun, 16 Jun 2024 01:30:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718526610; cv=pass; d=google.com; s=arc-20160816; b=PQ4PKpaMhdCs9PoPBpmpZ8gih2Y1VhOD/Yk4Yixv3eS1Pu+OlJpq6+JymibFjDYxO6 k4M3QXKhg+wW8MGbTHsv1JxoP1kWGg5ZvgmFutpwkAt8TJb/WR+AHGE5sSCkkrQXLyUQ +aokxUpgzbrUX/cpouHokLEpA0U8keaLneXlq7pYB8Sgzzk7xjbRLI+2uCCgcoYp/0+V jG4P1+wauqTgi/jcylD92VBoDZ4EM3zj6oAGtawifBq0+apoZQTmMWhvtTrJw0dNePAI 9JtldhT56UhvIjK50WUyWV/m3dVyWZRniBKQTdaRa5hvSzmYkkdeNZfIQJA9Rqc2KPm0 oZKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=jSkl9KtyvKIacSEDBB36i3KuKgNRUzKEQ9qfus5ebmo=; fh=6tE54z06ulRkgzfrooKGswCitNkbv5FNTOdWO2JiScs=; b=R6vahLUIRfIbv3PxqB41NLg4JTZF2xz8ke69o9eLxdvKtL6zqNaKt/TBecPOYDo602 WPc/rYyd63N/YDmMUAv4JSVlPsw+07OhVLOoPzVsD+rQm7zQovrx8zD7JFPs1wbi1n8f kHe1xyMUuO549CmjsnwBFo3fItE+NaIbifayXfbHjkEmKCS11sULyNhNDi50HEXtSz3n 4sDXroccVw1ReofR8vaaLvEOKyv9LPICFQELsAxxWLdYN+ZA8wNJXBffglXI6riUA4Dy obPqItHpq2+PqA+WjnM24QVJZi/yZCj+klLaTfEVG6q+ff5e9ze9Xk+CcdrwpBIpfj7P jSJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pL6gyk10; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-216200-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-798ac08eb9asi725084685a.734.2024.06.16.01.30.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 01:30:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216200-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=@kernel.org header.s=k20201202 header.b=pL6gyk10; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-216200-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216200-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 295DD1C20AF5 for ; Sun, 16 Jun 2024 08:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29D0F188CBE; Sun, 16 Jun 2024 08:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pL6gyk10" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C4E471850B0 for ; Sun, 16 Jun 2024 08:29:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718526555; cv=none; b=H/1xKR1N6CVD/wCBICxAvgt72zkNWwubwoIBa0W2+uEVonF/dKS8X7lBSuGrUUtzbleXOy0t1JWGBxxOji2ZliDYGc5n4gSIMx6KELMgPdlPELEjAg1sd9k56uXr1xYHrU5AgSyzDgnV1MDw+gO+N3yHxiLNP1PdAXyvILc4/h4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718526555; c=relaxed/simple; bh=y4L8DPEW0N5VNTT2zRd+oYE4bUJeVmfldTAKxmr2cq4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AeXOz2fegr+REt23Rh2GvYCdeDpLJnjPk+OCv67yph4Up/eE+gTRUj3lXq7FQPfNdV93wo0A2siRsbYUkqVI5w/0CZfvt60AEybkGvqO28jbvoWdzBdHjTaHq37kcfyazRXU/bcaZCmjB1Bi17/PVeOKfX+rqMF8PvNp44pBOa0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pL6gyk10; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 82A2AC4DDE4; Sun, 16 Jun 2024 08:29:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718526555; bh=y4L8DPEW0N5VNTT2zRd+oYE4bUJeVmfldTAKxmr2cq4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=pL6gyk101a9mfx7ZugzjEuVs2OlyU5b8QXjcE2GDGdFdGpFP+sKuICB8/0DwYMq2T 4rNmwJA0aDTYVkkdx68PKB8RNZ1doI0v9JZ+ZWfog4f+Yf2hxdI3EGpvA0v3Ce9a9L mlWY5O0tMsnmi/l9V4ISbiD32HjORMLTf99FIO7yK3aqS5bINIBvDW6cQJxFzg9i8a KH1eClwU3XOSKX2Mh04P/rge8mPhD51AS6Ew5sd8iwWsQTw9a4E8KG0k73X3ddYy3E 6Tfcnyw/f8Dq7fwJIfWIxiI1WMDZFMAQ4YUFGrWYBVpK7IyitztwD3x0tiyYpEz7o8 wLTf5LCqmT0mg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AB4EC2BA16; Sun, 16 Jun 2024 08:29:15 +0000 (UTC) From: Hsiao Chien Sung via B4 Relay Date: Sun, 16 Jun 2024 16:29:23 +0800 Subject: [PATCH 13/13] drm/mediatek: Support DRM plane alpha in Mixer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240616-mediatek-drm-next-v1-13-7e8f9cf785d8@mediatek.com> References: <20240616-mediatek-drm-next-v1-0-7e8f9cf785d8@mediatek.com> In-Reply-To: <20240616-mediatek-drm-next-v1-0-7e8f9cf785d8@mediatek.com> To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , AngeloGioacchino Del Regno , CK Hu , Bibby Hsieh , Daniel Kurtz , YT Shen , Mao Huang , "Nancy.Lin" Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hsiao Chien Sung X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718526553; l=901; i=shawn.sung@mediatek.com; s=20240616; h=from:subject:message-id; bh=7ThFleBFmPuW5Sf6NpW0LO1TvAYrv9i7y0k4TPqs4a4=; b=0Ex4IiVIAOYPqOVPscuiMW6iSaEiPi9nM1nnfH3Aq7O/HTOiD+BrqezlMqZQrnM23tubAhdL4 757mf7Ek2kaCrKL2Mnp1PjpKWZE0hysrXjY1x0jxEnHEaPPym8U3juS X-Developer-Key: i=shawn.sung@mediatek.com; a=ed25519; pk=lq1w8BuWDINX+4JHjGHhhbAU5ICP+cL9VCj7wn+cEDA= X-Endpoint-Received: by B4 Relay for shawn.sung@mediatek.com/20240616 with auth_id=172 X-Original-From: Hsiao Chien Sung Reply-To: shawn.sung@mediatek.com From: Hsiao Chien Sung Set the plane alpha according to DRM plane property. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_ethdr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_ethdr.c b/drivers/gpu/drm/mediatek/mtk_ethdr.c index a302b12aae3f..16be98cee505 100644 --- a/drivers/gpu/drm/mediatek/mtk_ethdr.c +++ b/drivers/gpu/drm/mediatek/mtk_ethdr.c @@ -170,8 +170,10 @@ void mtk_ethdr_layer_config(struct device *dev, unsigned int idx, return; } - if (state->base.fb && state->base.fb->format->has_alpha) - alpha_con = MIXER_ALPHA_AEN | MIXER_ALPHA; + if (state->base.fb) { + alpha_con |= MIXER_ALPHA_AEN; + alpha_con |= state->base.alpha & MIXER_ALPHA; + } if (state->base.fb && !state->base.fb->format->has_alpha) { /* -- Git-146)