693292d04f0724c0983652a925e2e5586078152b
[openwrt/staging/chunkeey.git] /
1 From c2666d7b749ade8ed250ab115a71d420c1403b24 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Fri, 5 Apr 2019 17:23:15 +0100
4 Subject: [PATCH] drm: vc4: Select display to blank during
5 initialisation
6
7 Otherwise the rainbow splash screen remained in the display list
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
10 ---
11 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 18 ++++++++++++++----
12 1 file changed, 14 insertions(+), 4 deletions(-)
13
14 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
15 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
16 @@ -89,6 +89,13 @@ struct fb_alloc_tags {
17 u32 layer;
18 };
19
20 +struct mailbox_blank_display {
21 + struct rpi_firmware_property_tag_header tag1;
22 + u32 display;
23 + struct rpi_firmware_property_tag_header tag2;
24 + u32 blank;
25 +};
26 +
27 static const struct vc_image_format {
28 u32 drm; /* DRM_FORMAT_* */
29 u32 vc_image; /* VC_IMAGE_* */
30 @@ -855,7 +862,12 @@ static int vc4_fkms_create_screen(struct
31 struct drm_crtc *crtc;
32 struct drm_plane *primary_plane, *overlay_plane, *cursor_plane;
33 struct drm_plane *destroy_plane, *temp;
34 - u32 blank = 1;
35 + struct mailbox_blank_display blank = {
36 + .tag1 = {RPI_FIRMWARE_FRAMEBUFFER_SET_DISPLAY_NUM, 4, 0, },
37 + .display = display_idx,
38 + .tag2 = { RPI_FIRMWARE_FRAMEBUFFER_BLANK, 4, 0, },
39 + .blank = 1,
40 + };
41 int ret;
42
43 vc4_crtc = devm_kzalloc(dev, sizeof(*vc4_crtc), GFP_KERNEL);
44 @@ -866,9 +878,7 @@ static int vc4_fkms_create_screen(struct
45 vc4_crtc->display_number = display_ref;
46
47 /* Blank the firmware provided framebuffer */
48 - rpi_firmware_property(vc4->firmware,
49 - RPI_FIRMWARE_FRAMEBUFFER_BLANK,
50 - &blank, sizeof(blank));
51 + rpi_firmware_property_list(vc4->firmware, &blank, sizeof(blank));
52
53 primary_plane = vc4_fkms_plane_init(drm, DRM_PLANE_TYPE_PRIMARY,
54 display_ref,