Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3825837pxb; Tue, 7 Sep 2021 08:22:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwet+EgV9kmAWYTXFnE/e9kNB00aEDO1oivdK8md8grevtLVS4Kh2UeK9/L5TIf0NcCfMDg X-Received: by 2002:a05:6402:5148:: with SMTP id n8mr18688682edd.277.1631028152086; Tue, 07 Sep 2021 08:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631028152; cv=none; d=google.com; s=arc-20160816; b=yOid7N5B7L/yZKu84LqfhuMoI3mVqWZoeMLgwrV/cRBChWgKbOVggnwixdsAg+jle7 nqVeccwSxurT0D1Rx498naFWEaMnPJaAw6dmOlaQUe2D3pIhvmEjOXSR/OurRcTw6Zk0 8sfcRtfHguexiziS0PxgAgVhnUZPc15QmJaVoqtcZXOWTK+P8pOfCBpHTwXwlWtTL7Cr k5k19xpOQXPLhe1jQVpoe3ct9PKQBBbWwUHYvt5Y7bjqVO9QkbgHOzmuTKkucLMt8qh7 XFzOOPFabtCNb53HBLexTbB62Q5WMziKLylBo6kNjvsUCzJgcEY+wbedCbH2ucyJod46 Db+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Z3kLq+iRfOzStH8O3le61AdJ+iVekYXxLeWKDMeJ8KA=; b=yUdAiHeh3Itw34FeasDiJBLv++nSdj0NlBamiI/UEzD4xvm7T+uGSSruoh9mVJ/osP J1Jw8e23/jhjc5CokDb8Ri2YxrVQIUXaUi0VsUfNIP4AfDk1khoduHK9Aq54sdrnPkd7 T510hxVMYFT5HlEK3O1Wd8eH4m+Qxyn8Htb/pZKi/mmJlkif2o8Si2v/LbYpg3oxNIgx 8VNszx7z+zCLQ6gVHzWPoUtCcE2BDfyCEuo0ppWIcR+w439Jt+tU7xDGK+UwHUxbDJYL twKEbmSwsQJxlrl6ewd/pccsxXXT6/YIJz3ZhDxb1daopDa1FjjzsF0xycFSCv+jAlNS u9Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=su13Up+N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd22si10660233edb.144.2021.09.07.08.22.08; Tue, 07 Sep 2021 08:22:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=su13Up+N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345150AbhIGPTC (ORCPT + 99 others); Tue, 7 Sep 2021 11:19:02 -0400 Received: from mx07-00178001.pphosted.com ([185.132.182.106]:44132 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345127AbhIGPSw (ORCPT ); Tue, 7 Sep 2021 11:18:52 -0400 Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.0.43) with SMTP id 187Eun7c017194; Tue, 7 Sep 2021 17:17:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=Z3kLq+iRfOzStH8O3le61AdJ+iVekYXxLeWKDMeJ8KA=; b=su13Up+Nlw1v0E/ZGKxVRciKeB31ArDhisMq3fGZ4BIB/0YizHXqKKvubD/W1gc2cKGL vUs1yfkedxw7y+pJo5SPhYk1djVnO9QPDOW38ODkcBnY+HB4RwNz2vnDUCzKeKTHYF6A PNnk/0uHOT/LezrbDS1DOsxJm4Z1RvBlaH1bXhSeRqfuxmgcWKH5ivFWk0CW6pRblbe7 dcPbFB7o59uQaEv2Vapa1+Olz9v8Sj5Jid6ae7A+uH4b3jHU5LdYl+UTXdwU3ZfEw0l/ yWGHuRq8FyvVN/hfwKn7XJUjs4L3Bjdxcu7Km2xPQ5UScxhg8nf1kMJFBLyyXtdJO7D9 mQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3awyx2um6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Sep 2021 17:17:32 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2683310002A; Tue, 7 Sep 2021 17:17:31 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag1node3.st.com [10.75.127.3]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1629D22A6C9; Tue, 7 Sep 2021 17:17:31 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG1NODE3.st.com (10.75.127.3) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 7 Sep 2021 17:17:30 +0200 From: Raphael Gallais-Pou To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard CC: David Airlie , Daniel Vetter , "Maxime Coquelin" , Alexandre Torgue , , , , , Raphael Gallais-Pou , Raphael Gallais-Pou Subject: [PATCH v2] drm/stm: ltdc: add layer alpha support Date: Tue, 7 Sep 2021 17:15:34 +0200 Message-ID: <20210907151534.6013-1-raphael.gallais-pou@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG1NODE1.st.com (10.75.127.1) To SFHDAG1NODE3.st.com (10.75.127.3) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-07_05,2021-09-07_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Android Hardware Composer supports alpha values applied to layers. Enabling non-opaque layers for the STM CRTC could help offload GPU resources for screen composition. Signed-off-by: Raphael Gallais-Pou Acked-by: Yannick Fertre Reviewed-by: Yannick Fertre --- drivers/gpu/drm/stm/ltdc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 195de30eb90c..e0fef8bacfa8 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -845,7 +845,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane, LXCFBLR_CFBLL | LXCFBLR_CFBP, val); /* Specifies the constant alpha value */ - val = CONSTA_MAX; + val = newstate->alpha >> 8; reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val); /* Specifies the blending factors */ @@ -997,6 +997,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev, drm_plane_helper_add(plane, <dc_plane_helper_funcs); + drm_plane_create_alpha_property(plane); + DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id); return plane; -- 2.17.1