diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch b/target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch new file mode 100644 index 0000000000..2a8748c599 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0912-drm-atomic-If-margins-are-updated-update-all-planes.patch @@ -0,0 +1,60 @@ +From 75b6b04cdb54b2e91c0fd344ffc967ce64ddccd7 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Fri, 1 Apr 2022 17:10:37 +0100 +Subject: [PATCH] drm/atomic: If margins are updated, update all + planes. + +Margins may be implemented by scaling the planes, but as there +is no way of intercepting the set_property for a standard property, +and all planes are checked in drm_atomic_check_only before the +connectors, there's now way to add the planes into the state +from the driver. + +If the margin properties change, add all corresponding planes to +the state. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + drivers/gpu/drm/drm_atomic_uapi.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/gpu/drm/drm_atomic_uapi.c ++++ b/drivers/gpu/drm/drm_atomic_uapi.c +@@ -715,6 +715,7 @@ static int drm_atomic_connector_set_prop + { + struct drm_device *dev = connector->dev; + struct drm_mode_config *config = &dev->mode_config; ++ bool margins_updated = false; + bool replaced = false; + int ret; + +@@ -734,12 +735,16 @@ static int drm_atomic_connector_set_prop + state->tv.subconnector = val; + } else if (property == config->tv_left_margin_property) { + state->tv.margins.left = val; ++ margins_updated = true; + } else if (property == config->tv_right_margin_property) { + state->tv.margins.right = val; ++ margins_updated = true; + } else if (property == config->tv_top_margin_property) { + state->tv.margins.top = val; ++ margins_updated = true; + } else if (property == config->tv_bottom_margin_property) { + state->tv.margins.bottom = val; ++ margins_updated = true; + } else if (property == config->tv_mode_property) { + state->tv.mode = val; + } else if (property == config->tv_brightness_property) { +@@ -818,6 +823,12 @@ static int drm_atomic_connector_set_prop + return -EINVAL; + } + ++ if (margins_updated && state->crtc) { ++ ret = drm_atomic_add_affected_planes(state->state, state->crtc); ++ ++ return ret; ++ } ++ + return 0; + } + |