From 3cd15f787b391db5224a27715fe9dc6fc8559bee 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
@@ -232,7 +232,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;
@@ -468,11 +467,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,
@@ -1228,15 +1222,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;
