X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0673-drm-modes-Parse-overscan-properties.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0673-drm-modes-Parse-overscan-properties.patch;h=0000000000000000000000000000000000000000;hb=c2308a7e4adbb2acc8ff149f91d1ca46801c135e;hp=f8de9b5fc3533a84ad8eae0b6b92311d7b5748d7;hpb=67dcc43f3a22dc3a7ac07a7065971b426feeb043;p=openwrt%2Fstaging%2Fchunkeey.git diff --git a/target/linux/brcm2708/patches-4.19/950-0673-drm-modes-Parse-overscan-properties.patch b/target/linux/brcm2708/patches-4.19/950-0673-drm-modes-Parse-overscan-properties.patch deleted file mode 100644 index f8de9b5fc3..0000000000 --- a/target/linux/brcm2708/patches-4.19/950-0673-drm-modes-Parse-overscan-properties.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 99b367ee521e48beae92bea59515dd0f08f2e55b Mon Sep 17 00:00:00 2001 -From: Maxime Ripard -Date: Wed, 19 Jun 2019 12:17:51 +0200 -Subject: [PATCH] drm/modes: Parse overscan properties -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Commit 3d46a3007cd8f73bae502bf5c171977b91d7aacc upstream. - -Properly configuring the overscan properties might be needed for the -initial setup of the framebuffer for display that still have overscan. -Let's allow for more properties on the kernel command line to setup each -margin. - -Reviewed-by: Noralf Trønnes -Signed-off-by: Maxime Ripard -Link: https://patchwork.freedesktop.org/patch/msgid/e481f1628e3768ca49226ec2115cfa4dfcbd5e4c.1560783090.git-series.maxime.ripard@bootlin.com ---- - Documentation/fb/modedb.txt | 2 ++ - drivers/gpu/drm/drm_modes.c | 44 +++++++++++++++++++++++++++++++++++++ - include/drm/drm_connector.h | 5 +++++ - 3 files changed, 51 insertions(+) - ---- a/Documentation/fb/modedb.txt -+++ b/Documentation/fb/modedb.txt -@@ -57,6 +57,8 @@ Options can also be passed after the mod - - Valid options are: - -+ - margin_top, margin_bottom, margin_left, margin_right (integer): -+ Number of pixels in the margins, typically to deal with overscan on TVs - - reflect_x (boolean): Perform an axial symmetry on the X axis - - reflect_y (boolean): Perform an axial symmetry on the Y axis - - rotate (integer): Rotate the initial framebuffer by x ---- a/drivers/gpu/drm/drm_modes.c -+++ b/drivers/gpu/drm/drm_modes.c -@@ -1615,6 +1615,50 @@ static int drm_mode_parse_cmdline_option - } else if (!strncmp(option, "reflect_y", delim - option)) { - rotation |= DRM_MODE_REFLECT_Y; - sep = delim; -+ } else if (!strncmp(option, "margin_right", delim - option)) { -+ const char *value = delim + 1; -+ unsigned int margin; -+ -+ margin = simple_strtol(value, &sep, 10); -+ -+ /* Make sure we have parsed something */ -+ if (sep == value) -+ return -EINVAL; -+ -+ mode->tv_margins.right = margin; -+ } else if (!strncmp(option, "margin_left", delim - option)) { -+ const char *value = delim + 1; -+ unsigned int margin; -+ -+ margin = simple_strtol(value, &sep, 10); -+ -+ /* Make sure we have parsed something */ -+ if (sep == value) -+ return -EINVAL; -+ -+ mode->tv_margins.left = margin; -+ } else if (!strncmp(option, "margin_top", delim - option)) { -+ const char *value = delim + 1; -+ unsigned int margin; -+ -+ margin = simple_strtol(value, &sep, 10); -+ -+ /* Make sure we have parsed something */ -+ if (sep == value) -+ return -EINVAL; -+ -+ mode->tv_margins.top = margin; -+ } else if (!strncmp(option, "margin_bottom", delim - option)) { -+ const char *value = delim + 1; -+ unsigned int margin; -+ -+ margin = simple_strtol(value, &sep, 10); -+ -+ /* Make sure we have parsed something */ -+ if (sep == value) -+ return -EINVAL; -+ -+ mode->tv_margins.bottom = margin; - } else { - return -EINVAL; - } ---- a/include/drm/drm_connector.h -+++ b/include/drm/drm_connector.h -@@ -886,6 +886,11 @@ struct drm_cmdline_mode { - * DRM_MODE_ROTATE_0 and DRM_MODE_ROTATE_180. - */ - unsigned int rotation_reflection; -+ -+ /** -+ * @tv_margins: TV margins to apply to the mode. -+ */ -+ struct drm_connector_tv_margins tv_margins; - }; - - /**