brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0642-drm-connector-Introduce-a-TV-margins-structure.patch
1 From 6261047a83258900e57a0a699ec7954360c6e7f3 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@bootlin.com>
3 Date: Wed, 19 Jun 2019 12:17:51 +0200
4 Subject: [PATCH] drm/connector: Introduce a TV margins structure
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Commit 22045e8e52bd802f743f0471242782fc3b479707 upstream.
10
11 The TV margins has been defined as a structure inside the
12 drm_connector_state structure so far. However, we will need it in other
13 structures as well, so let's move that structure definition so that it can
14 be reused.
15
16 Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
17 Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
18 Link: https://patchwork.freedesktop.org/patch/msgid/38b773b03f15ec7a135cdf8f7db669e5ada20cf2.1560783090.git-series.maxime.ripard@bootlin.com
19 ---
20 include/drm/drm_connector.h | 41 +++++++++++++++++++++++++++----------
21 1 file changed, 30 insertions(+), 11 deletions(-)
22
23 --- a/include/drm/drm_connector.h
24 +++ b/include/drm/drm_connector.h
25 @@ -344,13 +344,37 @@ int drm_display_info_set_bus_formats(str
26 unsigned int num_formats);
27
28 /**
29 + * struct drm_connector_tv_margins - TV connector related margins
30 + *
31 + * Describes the margins in pixels to put around the image on TV
32 + * connectors to deal with overscan.
33 + */
34 +struct drm_connector_tv_margins {
35 + /**
36 + * @bottom: Bottom margin in pixels.
37 + */
38 + unsigned int bottom;
39 +
40 + /**
41 + * @left: Left margin in pixels.
42 + */
43 + unsigned int left;
44 +
45 + /**
46 + * @right: Right margin in pixels.
47 + */
48 + unsigned int right;
49 +
50 + /**
51 + * @top: Top margin in pixels.
52 + */
53 + unsigned int top;
54 +};
55 +
56 +/**
57 * struct drm_tv_connector_state - TV connector related states
58 * @subconnector: selected subconnector
59 - * @margins: margins (all margins are expressed in pixels)
60 - * @margins.left: left margin
61 - * @margins.right: right margin
62 - * @margins.top: top margin
63 - * @margins.bottom: bottom margin
64 + * @margins: TV margins
65 * @mode: TV mode
66 * @brightness: brightness in percent
67 * @contrast: contrast in percent
68 @@ -361,12 +385,7 @@ int drm_display_info_set_bus_formats(str
69 */
70 struct drm_tv_connector_state {
71 enum drm_mode_subconnector subconnector;
72 - struct {
73 - unsigned int left;
74 - unsigned int right;
75 - unsigned int top;
76 - unsigned int bottom;
77 - } margins;
78 + struct drm_connector_tv_margins margins;
79 unsigned int mode;
80 unsigned int brightness;
81 unsigned int contrast;