db3f195c45b8d79979680d85a968d2d79caa4cef
[openwrt/staging/jogo.git] /
1 From 3cd15f787b391db5224a27715fe9dc6fc8559bee Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Fri, 3 May 2019 13:58:03 +0100
4 Subject: [PATCH] drm: vc4-firmware-kms: Remove incorrect overscan
5 support.
6
7 The overscan support was required for the old mailbox API
8 in order to match up the cursor and frame buffer planes.
9 With the newer API directly talking to dispmanx there is no
10 difference, therefore FKMS does not need to make any
11 adjustments.
12
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
14 ---
15 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 15 ---------------
16 1 file changed, 15 deletions(-)
17
18 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
19 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
20 @@ -232,7 +232,6 @@ struct vc4_crtc {
21 void __iomem *regs;
22
23 struct drm_pending_vblank_event *event;
24 - u32 overscan[4];
25 bool vblank_enabled;
26 u32 display_number;
27 u32 display_type;
28 @@ -468,11 +467,6 @@ static void vc4_plane_atomic_update(stru
29 break;
30 }
31
32 - if (vc4_crtc) {
33 - mb->plane.dst_x += vc4_crtc->overscan[0];
34 - mb->plane.dst_y += vc4_crtc->overscan[1];
35 - }
36 -
37 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] plane update %dx%d@%d +dst(%d,%d, %d,%d) +src(%d,%d, %d,%d) 0x%08x/%08x/%08x/%d, alpha %u zpos %u\n",
38 plane->base.id, plane->name,
39 mb->plane.width,
40 @@ -1228,15 +1222,6 @@ static int vc4_fkms_create_screen(struct
41 goto err_destroy_encoder;
42 }
43
44 - ret = rpi_firmware_property(vc4->firmware,
45 - RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN,
46 - &vc4_crtc->overscan,
47 - sizeof(vc4_crtc->overscan));
48 - if (ret) {
49 - DRM_ERROR("Failed to get overscan state: 0x%08x\n", vc4_crtc->overscan[0]);
50 - memset(&vc4_crtc->overscan, 0, sizeof(vc4_crtc->overscan));
51 - }
52 -
53 *ret_crtc = vc4_crtc;
54
55 return 0;