Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1721698lqs; Sun, 16 Jun 2024 01:30:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnTBd+UCSUYloMdvWFvyHM/qAmIywUtZIAgvxWH90zwcLL8qQzsxxSRuy/uVPFet7aHX8ysVwktecjfo0Z2l5yNXBybv/Rez+iWxQhNw== X-Google-Smtp-Source: AGHT+IFs1yaKqmY1gALo8z1hn+xmfKROo4rqBs78yQq9k0nga/SqCTn3rtVVQcHWfDMwDgH+9OAQ X-Received: by 2002:a05:622a:1aa5:b0:441:5994:fd48 with SMTP id d75a77b69052e-44216b46b09mr79215551cf.63.1718526610672; 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=xC/1ZRrBljeby/Vq8Acpy1uA15fm0Sp+HfJiAG3IGP0vUyM0+Fm4Q1Uxwg49Bj7E3w brKs8GJjd3DZzF+zaGDEVI99msRk77PPvLzXoTSoFkkFcNnJgvGycGKp0J76W7bxbbEI K9PCdBSkQ8Ewa9mgbaRuZasU+riyLM6W5NOssiD3RLaE6jlfMnFPitEiU5ITlePZpeY7 qOKwMxN84GGmG4h28i73Uj4F0TM5PQXhWfhqjS6KeQ/S/bRgHr8hGat51y/oa0xJyuX9 V9yhFFAUlCOodHPI0kjwg1of/mVNA7BM87C1pQtGE6R5xabX7R+gSJAivcRihd4anksE m+Fw== 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=OMQ+tY3zrYH6g+3R5g8ftQMhpYJEf2PnlLT3/tEQgyc=; fh=6tE54z06ulRkgzfrooKGswCitNkbv5FNTOdWO2JiScs=; b=IkzcdXFbsWnNpuXuKUtGONwCzxRrjPo6ILt3muAdWrLKdKAz3ZmcKRhiPkHqplgzNG 4S6U0qjZOysXSjozaCmjZTpo7TBJOx/yVIlZQjfcpRwXhS15v076qQCZyeIGqbcWUaY4 7cHHV3Zw59R3zGhJqPLToElg3MJaJW7EJoem9xTIiqqikTDBt9OfDOQMhfYWvl4aYRPs obv6/1ZXG5HGzW7fbOK2q8LQzylzo4CiX6gL/ujwZJpsIX8H9U05F3LWQEm4OCUIHpzw R0LPDgOl3xidebmjy1RiwGTFLMkxLbQw9KeJuOzxikxz2s7otvUXuK90f3sd7DDq32ea SwYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OP3VLo3l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-216199-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216199-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 d75a77b69052e-441f2fe0b3fsi75761741cf.558.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-216199-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=OP3VLo3l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-216199-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216199-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 8D36E1C20B4A for ; Sun, 16 Jun 2024 08:30:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29A6D188CBD; 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="OP3VLo3l" 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 BB16518628A 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=RkkqC7rA3tQdx8Iubz3GoV/p76El4xcwt1t51d4+FzlJNUBe9bmNmGWqFz1uqgS6/qGJf4Xc5AYuNT77gKjDiAf76c5KVUjYWdJgHbGGnIjP2hfe80oGOfY/T48qOBIldYUu0g26c7C3RmozcgkMKU7Ka3un/tFvKKWLucOCNKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718526555; c=relaxed/simple; bh=HGD/YyvSyv29O14mwDPoDHHeYEPWb4sPouMX0i+8w4c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=akJxeHpLqWZKEmO9s69b3wWUmwNcBJRF/c6WK/1jq6achJ6usxJ0AumkQdXjZ2qqRgC2BIJcfrFuwsy9T42p7Jqd99gf3ox976BnAc5O6OmN06ZaMoe/bHgB39pBKdKuPb6drQ2Oe8v+HLgrsQZq/Z/9ZobMpRvbiLBkVtvawS0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OP3VLo3l; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 7784CC4DDE2; 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=HGD/YyvSyv29O14mwDPoDHHeYEPWb4sPouMX0i+8w4c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=OP3VLo3l89iU4AYRBL585fnhDMdllV8vziZ5yJEvrI4Bp/jwe+Jp05dfpdCCx7gAQ eBEdHvVcDoH3DK48OFmPGlY+2lQDcN0xsK7YXoGi2ifKiSYPxmnDK/B/qqBgdqpDx9 XYFLN0U7AIYuYL+AEZwwlr28lvskkggzDYTcMtb7iMeFnPLn9kqDjBYKUub5zNK2e+ IQUbDXJXI/0tUPTJbQK+rf033dVmIrGWjfGJECglNgcdYnyG0JHsJq529F57HZcbon cia40tNdQN5fqF6Z+k4Rm01wZQo33KBpjas3UFHvEI/Zqc1XIs7n+CMHdKNEddTLA2 vdEHFj/K3tmRQ== 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 6EBE9C27C77; Sun, 16 Jun 2024 08:29:15 +0000 (UTC) From: Hsiao Chien Sung via B4 Relay Date: Sun, 16 Jun 2024 16:29:22 +0800 Subject: [PATCH 12/13] drm/mediatek: Support DRM plane alpha in OVL 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-12-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=991; i=shawn.sung@mediatek.com; s=20240616; h=from:subject:message-id; bh=5BJt05q2olOJLyH/qGdDD53kmjnnoM3hvSVC/ZouM1A=; b=jCZ7lXGpv+AGtyowVT4z9RF57ghEL/4IapUmjqVDC/g1vyfBCShi0WXvzHVqwsGRGhY5JtcuO otzo4pze4POBtP+gxqYbkHSwA7//1+jksNg8PKDBFkHGUP+A3bEX0p9 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_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 33b58da15ba4..f358dbfed5e3 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. -- Git-146)