aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0234-drm-vc4-Select-display-to-blank-during-initialisatio.patch
blob: 693292d04f0724c0983652a925e2e5586078152b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From c2666d7b749ade8ed250ab115a71d420c1403b24 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Fri, 5 Apr 2019 17:23:15 +0100
Subject: [PATCH] drm: vc4: Select display to blank during
 initialisation

Otherwise the rainbow splash screen remained in the display list

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -89,6 +89,13 @@ struct fb_alloc_tags {
 	u32 layer;
 };
 
+struct mailbox_blank_display {
+	struct rpi_firmware_property_tag_header tag1;
+	u32 display;
+	struct rpi_firmware_property_tag_header tag2;
+	u32 blank;
+};
+
 static const struct vc_image_format {
 	u32 drm;	/* DRM_FORMAT_* */
 	u32 vc_image;	/* VC_IMAGE_* */
@@ -855,7 +862,12 @@ static int vc4_fkms_create_screen(struct
 	struct drm_crtc *crtc;
 	struct drm_plane *primary_plane, *overlay_plane, *cursor_plane;
 	struct drm_plane *destroy_plane, *temp;
-	u32 blank = 1;
+	struct mailbox_blank_display blank = {
+		.tag1 = {RPI_FIRMWARE_FRAMEBUFFER_SET_DISPLAY_NUM, 4, 0, },
+		.display = display_idx,
+		.tag2 = { RPI_FIRMWARE_FRAMEBUFFER_BLANK, 4, 0, },
+		.blank = 1,
+	};
 	int ret;
 
 	vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL);
@@ -866,9 +878,7 @@ static int vc4_fkms_create_screen(struct
 	vc4_crtc->display_number = display_ref;
 
 	/* Blank the firmware provided framebuffer */
-	rpi_firmware_property(vc4->firmware,
-			      RPI_FIRMWARE_FRAMEBUFFER_BLANK,
-			      &blank, sizeof(blank));
+	rpi_firmware_property_list(vc4->firmware, &blank, sizeof(blank));
 
 	primary_plane = vc4_fkms_plane_init(drm, DRM_PLANE_TYPE_PRIMARY,
 					    display_ref,