OpenCloudOS-Kernel/drivers/gpu/drm/bridge
Ville Syrjälä 0425662fdf drm: Nuke mode->vrefresh
Get rid of mode->vrefresh and just calculate it on demand. Saves
a bit of space and avoids the cached value getting out of sync
with reality.

Mostly done with cocci, with the following manual fixups:
- Remove the now empty loop in drm_helper_probe_single_connector_modes()
- Fix __MODE() macro in ch7006_mode.c
- Fix DRM_MODE_ARG() macro in drm_modes.h
- Remove leftover comment from samsung_s6d16d0_mode
- Drop the TODO

@@
@@
struct drm_display_mode {
	...
-	int vrefresh;
	...
};

@@
identifier N;
expression E;
@@
struct drm_display_mode N = {
-	.vrefresh = E
};

@@
identifier N;
expression E;
@@
struct drm_display_mode N[...] = {
...,
{
-	.vrefresh = E
}
,...
};

@@
expression E;
@@
{
	DRM_MODE(...),
-	.vrefresh = E,
}

@@
identifier M, R;
@@
int drm_mode_vrefresh(const struct drm_display_mode *M)
{
  ...
- if (M->vrefresh > 0)
- 	R = M->vrefresh;
- else
  if (...) {
  ...
  }
  ...
}

@@
struct drm_display_mode *p;
expression E;
@@
(
- p->vrefresh = E;
|
- p->vrefresh
+ drm_mode_vrefresh(p)
)

@@
struct drm_display_mode s;
expression E;
@@
(
- s.vrefresh = E;
|
- s.vrefresh
+ drm_mode_vrefresh(&s)
)

@@
expression E;
@@
- drm_mode_vrefresh(E) ? drm_mode_vrefresh(E) : drm_mode_vrefresh(E)
+ drm_mode_vrefresh(E)

@find_substruct@
identifier X;
identifier S;
@@
struct X {
...
	struct drm_display_mode S;
...
};

@@
identifier find_substruct.S;
expression E;
identifier I;
@@
{
.S = {
-	.vrefresh = E
}
}

@@
identifier find_substruct.S;
identifier find_substruct.X;
expression E;
identifier I;
@@
struct X I[...] = {
...,
.S = {
-	.vrefresh = E
}
,...
};

v2: Drop TODO
v3: Rebase
v4: Rebase

Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Jerry Han <hanxu5@huaqin.corp-partner.google.com>
Cc: Icenowy Zheng <icenowy@aosc.io>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Stefan Mavrodiev <stefan@olimex.com>
Cc: Robert Chiras <robert.chiras@nxp.com>
Cc: "Guido Günther" <agx@sigxcpu.org>
Cc: Purism Kernel Team <kernel@puri.sm>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: linux-amlogic@lists.infradead.org
Cc: nouveau@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-4-ville.syrjala@linux.intel.com
2020-05-27 14:31:42 +03:00
..
adv7511 drm: Fix misspellings of "Analog Devices" 2020-04-21 08:15:03 +02:00
analogix drm/bridge: analogix_dp: Split bind() into probe() and real bind() 2020-04-09 10:29:35 +02:00
synopsys Merge drm/drm-next into drm-misc-next 2020-04-17 08:12:22 +02:00
Kconfig drm/bridge: chrontel-ch7033: Add a new driver 2020-05-05 09:48:56 +02:00
Makefile drm/bridge: chrontel-ch7033: Add a new driver 2020-05-05 09:48:56 +02:00
cdns-dsi.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
chrontel-ch7033.c drm/bridge: chrontel-ch7033: Add a new driver 2020-05-05 09:48:56 +02:00
display-connector.c drm/bridge: Add bridge driver for display connectors 2020-02-26 13:31:37 +02:00
lvds-codec.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
megachips-stdpxxxx-ge-b850v3-fw.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
nwl-dsi.c drm/bridge: Add NWL MIPI DSI host controller support 2020-04-09 15:52:47 +02:00
nwl-dsi.h drm/bridge: Add NWL MIPI DSI host controller support 2020-04-09 15:52:47 +02:00
nxp-ptn3460.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
panel.c drm/bridge: panel: Return always an error pointer in drm_panel_bridge_add() 2020-04-25 16:48:55 +02:00
parade-ps8622.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
parade-ps8640.c drm/bridge: ps8640: Let panel to set the connector type 2020-04-25 16:43:11 +02:00
sii902x.c drm: Nuke mode->vrefresh 2020-05-27 14:31:42 +03:00
sii9234.c drm/bridge: sii9234: silence warning about regulators during deferred probe 2020-03-27 08:39:55 +01:00
sil-sii8620.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
sil-sii8620.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
simple-bridge.c drm/bridge: simple-bridge: Add support for the TI OPA362 2020-02-26 13:31:33 +02:00
tc358764.c drm: Remove drm_fb_helper add, add all and remove connector calls 2020-03-06 14:19:58 +01:00
tc358767.c Linux 5.6-rc5 2020-03-11 07:27:21 +10:00
tc358768.c drm/bridge: fix stack usage warning on old gcc 2020-04-29 22:35:50 +02:00
thc63lvd1024.c drm/bridge: Extend bridge API to disable connector creation 2020-02-26 13:31:23 +02:00
ti-sn65dsi86.c drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity 2020-05-18 21:37:02 +02:00
ti-tfp410.c Linux 5.6-rc5 2020-03-11 07:27:21 +10:00
ti-tpd12s015.c drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter 2020-02-26 13:31:38 +02:00