diff mbox series

[28/37] drm/vc4: Enable bg_fill if there are no planes enabled

Message ID 20241023-drm-vc4-2712-support-v1-28-1cc2d5594907@raspberrypi.com (mailing list archive)
State Not Applicable, archived
Headers show
Series drm/vc4: Add support for BCM2712 / Pi5 display hardware | expand

Commit Message

Dave Stevenson Oct. 23, 2024, 4:50 p.m. UTC
The default was to have enable_bg_fill disabled and the first
plane set it if it wasn't opaque and covering the whole screen.
However that meant that if no planes were enabled, then the
background fill wasn't enabled, and would give a striped
output from the uninitialised output buffer.

Initialise it to enabled to avoid this.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 drivers/gpu/drm/vc4/vc4_hvs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxime Ripard Oct. 24, 2024, 3:10 p.m. UTC | #1
On Wed, 23 Oct 2024 17:50:25 +0100, Dave Stevenson wrote:
> The default was to have enable_bg_fill disabled and the first
> plane set it if it wasn't opaque and covering the whole screen.
> However that meant that if no planes were enabled, then the
> background fill wasn't enabled, and would give a striped
> output from the uninitialised output buffer.
> 
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index f15aba4b81d7..5d40bbcb3b54 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -936,7 +936,7 @@  void vc4_hvs_atomic_flush(struct drm_crtc *crtc,
 	struct drm_plane *plane;
 	struct vc4_plane_state *vc4_plane_state;
 	bool debug_dump_regs = false;
-	bool enable_bg_fill = false;
+	bool enable_bg_fill = true;
 	u32 __iomem *dlist_start = vc4->hvs->dlist + vc4_state->mm.start;
 	u32 __iomem *dlist_next = dlist_start;
 	unsigned int zpos = 0;