From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Michal Simek <michal.simek@xilinx.com>, Rohit Visavalia <RVISAVAL@xilinx.com> Subject: [PATCH 2/3] drm: xlnx: zynqmp_dpsub: Fix graphics layer blending Date: Sun, 7 Mar 2021 06:06:10 +0200 [thread overview] Message-ID: <20210307040611.29246-3-laurent.pinchart@ideasonboard.com> (raw) In-Reply-To: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> 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 <laurent.pinchart@ideasonboard.com> --- 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); -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: Rohit Visavalia <RVISAVAL@xilinx.com>, Michal Simek <michal.simek@xilinx.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] drm: xlnx: zynqmp_dpsub: Fix graphics layer blending Date: Sun, 7 Mar 2021 06:06:10 +0200 [thread overview] Message-ID: <20210307040611.29246-3-laurent.pinchart@ideasonboard.com> (raw) In-Reply-To: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> 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 <laurent.pinchart@ideasonboard.com> --- 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); -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-03-07 4:09 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-07 4:06 [PATCH 0/3] drm: xlnx: zynqmp_dpsub: Fix plane handling Laurent Pinchart 2021-03-07 4:06 ` Laurent Pinchart 2021-03-07 4:06 ` [PATCH 1/3] drm: xlnx: zynqmp_dpsub: Fix plane ordering Laurent Pinchart 2021-03-07 4:06 ` Laurent Pinchart 2021-03-07 4:06 ` Laurent Pinchart [this message] 2021-03-07 4:06 ` [PATCH 2/3] drm: xlnx: zynqmp_dpsub: Fix graphics layer blending Laurent Pinchart 2021-03-07 4:06 ` [PATCH 3/3] drm: xlnx: zynqmp_dpsub: Add global alpha support Laurent Pinchart 2021-03-07 4:06 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210307040611.29246-3-laurent.pinchart@ideasonboard.com \ --to=laurent.pinchart@ideasonboard.com \ --cc=RVISAVAL@xilinx.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=michal.simek@xilinx.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.