From patchwork Sun Mar 7 04:06:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12120411 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=-16.8 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 DB48FC43381 for ; Sun, 7 Mar 2021 04:09:08 +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 6C3D964DA3 for ; Sun, 7 Mar 2021 04:09:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C3D964DA3 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=ZRSZjX3eWpwCMX5ywky8MftTpK5e6e4hRuIGTUdw0wY=; b=gV9GuIMEvmfcQ0s3G1Q/IiwJQ fxyC38azmCdDf8mKKesicfP9R2FvPKw8j41m3fMts09hu1uagYbK2F1gJV+3kvjCHkaNoTDtRgkgA /iY50c+7Ms65fCAmiBTOluAYoPovbFrZC0w63WdHqp7HdDvVsIB7hQftOmtCjqxmnXRKGvdhf1EEZ /6QaR0YhJCbJWNmAz6ugvQN5p+uikIIbIyCDeYufZJKU7NChwVWD8Gb50JBSiNPNF8ox14epfrL/U Sj9f4aY9+OkKBvfL8DKg4hHYGwjVwn+MBrkC+yzYM0vbr086h6Il+945xyCHrNzCgbbG5zCvaDBT3 skNf+FBXw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIkhD-007uRS-ER; Sun, 07 Mar 2021 04:07:11 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIkgv-007uCX-Cj for linux-arm-kernel@lists.infradead.org; Sun, 07 Mar 2021 04:06: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 C541CE70; Sun, 7 Mar 2021 05:06:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615090009; bh=5oUioxpIWh45byxinnlW6XWcggRHtOQm2iBohwTGfVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R3Sj0N/zFyZTuYqaCuhk8AmQq5KDqv2B6yNxIakUG9xtJRrTxoSn+5EkESP1nY6LX F5Q1PfWJFn0yKr8B84C1filr3ywy2uSDEuSbfFpfRmaMrXA/I3crpdUthA71/LHFPG 5C8FblDUVebRkhkkhRVizUZsqARLxtMLWbKAwX5A= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Michal Simek , Rohit Visavalia Subject: [PATCH 2/3] drm: xlnx: zynqmp_dpsub: Fix graphics layer blending Date: Sun, 7 Mar 2021 06:06:10 +0200 Message-Id: <20210307040611.29246-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> References: <20210307040611.29246-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-20210307_040653_611605_05CBB69D X-CRM114-Status: UNSURE ( 9.98 ) 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 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 6296f6d5acbc..4c23ffc75343 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1170,6 +1170,10 @@ zynqmp_disp_plane_atomic_disable(struct drm_plane *plane, return; zynqmp_disp_layer_disable(layer); + + if (layer->id == ZYNQMP_DISP_LAYER_GFX) + zynqmp_disp_blend_set_global_alpha(&layer->disp->blend, false, + 0); } static void @@ -1197,6 +1201,10 @@ zynqmp_disp_plane_atomic_update(struct drm_plane *plane, zynqmp_disp_layer_update(layer, plane->state); + if (layer->id == ZYNQMP_DISP_LAYER_GFX) + zynqmp_disp_blend_set_global_alpha(&layer->disp->blend, true, + 255); + /* Enable or re-enable the plane is the format has changed. */ if (format_changed) zynqmp_disp_layer_enable(layer); @@ -1463,7 +1471,6 @@ zynqmp_disp_crtc_atomic_enable(struct drm_crtc *crtc, zynqmp_disp_blend_set_output_format(&disp->blend, ZYNQMP_DPSUB_FORMAT_RGB); zynqmp_disp_blend_set_bg_color(&disp->blend, 0, 0, 0); - zynqmp_disp_blend_set_global_alpha(&disp->blend, false, 0); zynqmp_disp_enable(disp);