mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
8299d1f057
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
From e0aaa1acd1f33cc60e2b5c43cf6aac63bf3bbbc9 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Mon, 12 Jul 2021 13:06:07 +0100
|
|
Subject: [PATCH] ydrm/vc4: fkms: Fix margin calculations for the
|
|
right/bottom edges
|
|
|
|
The calculations clipped the right/bottom edge of the clipped
|
|
range based on the left/top margins.
|
|
|
|
https://github.com/raspberrypi/linux/issues/4447
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
|
|
@@ -458,15 +458,15 @@ static int vc4_fkms_margins_adj(struct d
|
|
plane->dst_x = DIV_ROUND_CLOSEST(plane->dst_x * adjhdisplay,
|
|
(int)crtc_state->mode.hdisplay);
|
|
plane->dst_x += left;
|
|
- if (plane->dst_x > (int)(crtc_state->mode.hdisplay - left))
|
|
- plane->dst_x = crtc_state->mode.hdisplay - left;
|
|
+ if (plane->dst_x > (int)(crtc_state->mode.hdisplay - right))
|
|
+ plane->dst_x = crtc_state->mode.hdisplay - right;
|
|
|
|
adjvdisplay = crtc_state->mode.vdisplay - (top + bottom);
|
|
plane->dst_y = DIV_ROUND_CLOSEST(plane->dst_y * adjvdisplay,
|
|
(int)crtc_state->mode.vdisplay);
|
|
plane->dst_y += top;
|
|
- if (plane->dst_y > (int)(crtc_state->mode.vdisplay - top))
|
|
- plane->dst_y = crtc_state->mode.vdisplay - top;
|
|
+ if (plane->dst_y > (int)(crtc_state->mode.vdisplay - bottom))
|
|
+ plane->dst_y = crtc_state->mode.vdisplay - bottom;
|
|
|
|
plane->dst_w = DIV_ROUND_CLOSEST(plane->dst_w * adjhdisplay,
|
|
crtc_state->mode.hdisplay);
|