aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0248-drm-vc4-firmware-kms-Remove-incorrect-overscan-suppo.patch
blob: 2a365798f5e7babd1a66b3f3f44b649585e71587 (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
55
From 8848465a8f8934a06891823815c3176e394f5f1c Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Fri, 3 May 2019 13:58:03 +0100
Subject: [PATCH] drm: vc4-firmware-kms: Remove incorrect overscan
 support.

The overscan support was required for the old mailbox API
in order to match up the cursor and frame buffer planes.
With the newer API directly talking to dispmanx there is no
difference, therefore FKMS does not need to make any
adjustments.

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

--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -235,7 +235,6 @@ struct vc4_crtc {
 	void __iomem *regs;
 
 	struct drm_pending_vblank_event *event;
-	u32 overscan[4];
 	bool vblank_enabled;
 	u32 display_number;
 	u32 display_type;
@@ -471,11 +470,6 @@ static void vc4_plane_atomic_update(stru
 		break;
 	}
 
-	if (vc4_crtc) {
-		mb->plane.dst_x += vc4_crtc->overscan[0];
-		mb->plane.dst_y += vc4_crtc->overscan[1];
-	}
-
 	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",
 			 plane->base.id, plane->name,
 			 mb->plane.width,
@@ -1230,15 +1224,6 @@ static int vc4_fkms_create_screen(struct
 		goto err_destroy_encoder;
 	}
 
-	ret = rpi_firmware_property(vc4->firmware,
-				    RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN,
-				    &vc4_crtc->overscan,
-				    sizeof(vc4_crtc->overscan));
-	if (ret) {
-		DRM_ERROR("Failed to get overscan state: 0x%08x\n", vc4_crtc->overscan[0]);
-		memset(&vc4_crtc->overscan, 0, sizeof(vc4_crtc->overscan));
-	}
-
 	*ret_crtc = vc4_crtc;
 
 	return 0;