From patchwork Thu May 20 12:19:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12270003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE271C433B4 for ; Thu, 20 May 2021 12:21:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA64461186 for ; Thu, 20 May 2021 12:21:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA64461186 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C0Z4rbUrKaBGmIMKtIR53xjWxhoxWhdSV3DPXw14WtM=; b=Y7ljQ+UmLfPPkRdUAa862ciaC3 7xLyA1/+RHW63QBDCqZTenskoYSUxvz09SvTHleEGgxh5HlBSAiLotZUJpW7EOyBjka3jH8fTk9vI aKZX++GhW4thzznAs8+Gq/IXKpBI84CJA9LyDZdJQvWq3ozxAEfJ1fBQFjr2Uu9pCbLzONrjzfTTI S4K4TP+vYv7f8bjeOO1DE6+QQJIfz/fMO5hfRiPW1y0gAuq14dtLPVk5Zw88hBB5GRozB88Kco39U T1s/oYAT1gj1d31bgjlGVa8vxF/mr9gmMLEevuzYzOxsbrNq2q+Thi4LzgmmXW2iSmq+7NqGHyUrh MaU8LgaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhes-000lCp-5g; Thu, 20 May 2021 12:20:10 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhec-000l80-MD for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 12:19:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ec3oWWBRdIF+qxAQPCMKHmgzrXX5dYMd44NaS+EDtLM=; b=fnoq+xk5vWmrPXmks5yvrNymC7 FKVXqWWVCYkeXuJpdnK1NTy0MwMh/195XZcy/86EPgkELx2WXOPEuFoibZiieBpIomeOOnBhzrkGz k5haxQ9/2Obbp5rrYmaNCDxvOGgOWZAmyi7kUVgfMK5MQvMli9yIc93WG4+T+l8cFxFqi3Sl5HfvZ FdsZKz3aRiEUXRGIPbZx07oG2CFT5C/ZfnzCFYqm+kDIFYgKC2ORES+bxHoAlwIf9k4Bv1rPt6KNX sw3INjAgBX9H/KnbM0VyaGq8cGJs1dWfc8hyv/9BK3IUemHvH/Za7dfzEzQJtinW0rctui8VrfLKE IgACRJpQ==; Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljheZ-00GJIp-Cg for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 12:19:53 +0000 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7FBDDD84; Thu, 20 May 2021 14:19:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1621513187; bh=o+xrOwQpelxFevPl6P7FRkiGlGkfUBPKh+YVdP7GtCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AJTp1zXXdQMO03h4IjqLCwn30zHyObZwtIum1+YAqoldI8kDDkLYM4/7mCKuPfVg8 ilZXlrLcfXKkjM1hu/LAkSAUylsBe7TNKzT2ucHBQuj4OI2C6bPVFs6CY9KZGmVZCd f5LaVcdYAiFd8Am2Wkk9RJt+jNmCus7yaMX56CYY= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: Rohit Visavalia , Michal Simek , linux-arm-kernel@lists.infradead.org, Quanyang Wang Subject: [PATCH v2 1/3] drm: xlnx: zynqmp_dpsub: Fix graphics layer blending Date: Thu, 20 May 2021 15:19:40 +0300 Message-Id: <20210520121942.26686-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.1 In-Reply-To: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> References: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_051951_607411_9C57923B X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To display the graphics layer, the global alpha needs to be enabled. Enable it when the graphics plane is enabled (with full opacity), and disable it otherwise. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index a061a75a9de7..27b3829fb7e0 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -415,6 +415,11 @@ static void zynqmp_disp_avbuf_write(struct zynqmp_disp *disp, int reg, u32 val) writel(val, disp->avbuf.base + reg); } +static bool zynqmp_disp_layer_is_gfx(const struct zynqmp_disp_layer *layer) +{ + return layer->id == ZYNQMP_DISP_LAYER_GFX; +} + static bool zynqmp_disp_layer_is_video(const struct zynqmp_disp_layer *layer) { return layer->id == ZYNQMP_DISP_LAYER_VID; @@ -1157,6 +1162,9 @@ zynqmp_disp_plane_atomic_disable(struct drm_plane *plane, return; zynqmp_disp_layer_disable(layer); + + if (zynqmp_disp_layer_is_gfx(layer)) + zynqmp_disp_blend_set_global_alpha(layer->disp, false, 0); } static void @@ -1186,6 +1194,9 @@ zynqmp_disp_plane_atomic_update(struct drm_plane *plane, zynqmp_disp_layer_update(layer, new_state); + if (zynqmp_disp_layer_is_gfx(layer)) + zynqmp_disp_blend_set_global_alpha(layer->disp, true, 255); + /* Enable or re-enable the plane is the format has changed. */ if (format_changed) zynqmp_disp_layer_enable(layer); @@ -1447,7 +1458,6 @@ zynqmp_disp_crtc_atomic_enable(struct drm_crtc *crtc, zynqmp_disp_blend_set_output_format(disp, ZYNQMP_DPSUB_FORMAT_RGB); zynqmp_disp_blend_set_bg_color(disp, 0, 0, 0); - zynqmp_disp_blend_set_global_alpha(disp, false, 0); zynqmp_disp_enable(disp); From patchwork Thu May 20 12:19:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12270081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C729C433B4 for ; Thu, 20 May 2021 12:21:54 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 254FB611AD for ; Thu, 20 May 2021 12:21:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 254FB611AD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tMe4I8bqGp1Zi34ts/nWVU7/QElDBUVju3Htn5vVJn0=; b=kjDI7bWvDIdvAqvZwGZrtjzyYy zvpi909tg0zYqyihdYM1GulC2fo0DBZxl7u7v1fXMYmVnX08hUEZJ1K+1SO5eWu2aDnAdANPjfdJ+ +WZ89RKPf/JVmmtBQQJzBRElO+Llf+JGSUsscvmGY1JWF97EZPaHIxRRPOlg/45AHAC093ZoiXlE2 DL/PJAFn4WxUpaAnZzo66O6Ptp5UjJLfZdGoktSFJ5+NhpLh/kB8j0hTSkQ6U0s/nWM16/7z6la0K Nkyo6dCkSdw+0GLQAm5BU7LyXLBOkLvsZy85b5dRZeW5eBbIyBImkY187gFb8FJGafsrlFaYmASBe ONiueTrg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhf6-000lIz-K8; Thu, 20 May 2021 12:20:24 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhee-000l8k-Gv for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 12:19:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Fu7eSkwT4bg1Z1/SVc6l8m6qe3QVOVqmmoONJxCbcvU=; b=Wv7x+U22MoMvv36f9XcLfqrN8Q RmDoM97VWylqWMjb3QlSTg9oimgux3G2LDVWfWjPffBHUVxdT8fFmd6jIVBGkEu8HS4kTrKTOLZin hla1G6p9AMGH5LcPVrGWLYUu2HXnHFq9eg066YbSZcjBkwvPCtsC9bOZO392D/Fo3vgF86MQ6zzil RFVYbX7VP4Ip0eQC5n9KH1frVIyljHRS6vqwrBGuP204SBpgddBfBI2nWCKsxe6C1g2/dxuCqNbKW txzpVdmgWblR1H8iO6Y7z2UGqeeowSMQWn8JoOwKmNhc6xp7YzIgzfCgVkiD0tqgmxlBXrNAn/AMM eN1QEyxg==; Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljheb-00GJJp-UZ for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 12:19:55 +0000 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 128C7DEE; Thu, 20 May 2021 14:19:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1621513188; bh=lVMwJGi7fB9wvbiNSjSIrNoPbk7RggZz7LPwm3zgsRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZKKl+p+BWP9/kR3QEl/6DeFuvhV3XUV90YQnFtEpOp03PZhLkBmPLY0dj8GO+wU+T FSrgB1qtwBlG+EXGalRZI8qQWdc11zNFXojdTvaQpEqRFh0AA4670wE5xwFAf5NaHj 0ycp4A4oD73ZC8Avz9fG+Sj7EJ3y77xmIJXH9rEo= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: Rohit Visavalia , Michal Simek , linux-arm-kernel@lists.infradead.org, Quanyang Wang Subject: [PATCH v2 2/3] drm: xlnx: zynqmp_dpsub: Add global alpha support Date: Thu, 20 May 2021 15:19:41 +0300 Message-Id: <20210520121942.26686-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.1 In-Reply-To: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> References: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_051954_146606_592B473D X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The graphics plane has a global alpha setting. Expose it through the plane's alpha property. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 27b3829fb7e0..d87af7cb3340 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1164,7 +1164,8 @@ zynqmp_disp_plane_atomic_disable(struct drm_plane *plane, zynqmp_disp_layer_disable(layer); if (zynqmp_disp_layer_is_gfx(layer)) - zynqmp_disp_blend_set_global_alpha(layer->disp, false, 0); + zynqmp_disp_blend_set_global_alpha(layer->disp, false, + plane->state->alpha >> 8); } static void @@ -1195,7 +1196,8 @@ zynqmp_disp_plane_atomic_update(struct drm_plane *plane, zynqmp_disp_layer_update(layer, new_state); if (zynqmp_disp_layer_is_gfx(layer)) - zynqmp_disp_blend_set_global_alpha(layer->disp, true, 255); + zynqmp_disp_blend_set_global_alpha(layer->disp, true, + plane->state->alpha >> 8); /* Enable or re-enable the plane is the format has changed. */ if (format_changed) @@ -1249,6 +1251,9 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) drm_plane_helper_add(&layer->plane, &zynqmp_disp_plane_helper_funcs); + + if (zynqmp_disp_layer_is_gfx(layer)) + drm_plane_create_alpha_property(&layer->plane); } return 0; From patchwork Thu May 20 12:19:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12270083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68868C433ED for ; Thu, 20 May 2021 12:22:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36D28611AD for ; Thu, 20 May 2021 12:22:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36D28611AD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3I8VvxbSzkps8vYoieDpBmIunMrBPqLqwPYMP5pFS+Q=; b=jf2QL3qm6ZupoQ3oidhK7PNVOb YtfFVknMLcQpACAKOufXf1VgFDrrUJr1s7ADJvKWFiL7fCAsjgf8O12levMIEQISRC7LHVZfFGejJ 5cXAxvk2XtFfrUVRfX5B7H8gcwmkfx9zwcBtoxydb7BsaNDmHBSqMQHkM+BuMbaSjunGWg2JEfuJt qfueczUsdeFihSM/3oO0lA9bQDWFOc6n3K4NaiMEofVEbsGxyVtGZG+WYAS8m4pIXjiIVD7o8MV8X MSCDuTmky/Id9i8f+3IPYmKpgjEIC9rZqCmsC1vbrpISh0H4ZErzi75BAq87zDoHkOG+1txgHpdlv 5VxSpQYA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhfJ-000lOP-3r; Thu, 20 May 2021 12:20:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ljhef-000l8w-NA for linux-arm-kernel@desiato.infradead.org; Thu, 20 May 2021 12:19:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=wWKeuayZuticQQafFZ3udwALcJ+2Nuln5/bobzcmNBc=; b=XZiYaqCeexUdQ2iFz1dqiTMPUX qrIOCloCHvwWggV9XSO48PhW39MlX18DfN+SIOYhEXNb40SRN29a0ZXfD+zddZf8/1rkwlPH888Sp zRtl93WswEvTTfHFV4IANq7biND44xJfKUoElrvFWLxZerXlaJJ/K/D2CauIvf5vd+rj2lWVjGkKE 50r4sWAYBxFtNnV+VLyI90qSoSvPdYtIUmN40SwOLVOt8hPLhBa5GaLiaoP+cZ6L56dqqT3YpRxXO 8QnYbk7uHRd1AKjjtFCsyRC3f6PuvaziO9NzZYWLpTp8QI1vRtl6k7CAl5McqlV8mCCmhCn7yB5yp NXFfFN8w==; Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljhec-00GJJv-QF for linux-arm-kernel@lists.infradead.org; Thu, 20 May 2021 12:19:56 +0000 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 98AA3E0C; Thu, 20 May 2021 14:19:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1621513189; bh=c6c8pFCUKOqmE1pr+wiJO/rINBKnTgBD4+MlaECeauU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HEOL3fCU3AepT+2uLJm5WMYpQKrwt6Xc0mG0pj8v+fhq+jqTMXVBkZ1hNc58p1d8U RtCtQtzDWzH0HJTEnL1RMRMJl0369yn2tA+CKjhor75UvBKlKnTzmioAmegWAR0oZ+ Jl4M6QNBNfEIWbNzrquRdPQzbyCcx2/lfphteilM= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: Rohit Visavalia , Michal Simek , linux-arm-kernel@lists.infradead.org, Quanyang Wang Subject: [PATCH v2 3/3] drm: xlnx: zynqmp_dpsub: Expose plane ordering to userspace Date: Thu, 20 May 2021 15:19:42 +0300 Message-Id: <20210520121942.26686-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.1 In-Reply-To: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> References: <20210520121942.26686-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210520_051955_045091_CBFEDFF8 X-CRM114-Status: UNSURE ( 8.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org While the DPSUB has a fixed plane order, it still makes sense to expose it to userspace to avoid hardcoding assumptions. Do so by adding an immutable zpos property to planes. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index d87af7cb3340..e377974f8198 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1252,6 +1252,7 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) drm_plane_helper_add(&layer->plane, &zynqmp_disp_plane_helper_funcs); + drm_plane_create_zpos_immutable_property(&layer->plane, i); if (zynqmp_disp_layer_is_gfx(layer)) drm_plane_create_alpha_property(&layer->plane); }