From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Benson Leung <bleung@chromium.org>,
Cai Huoqing <cai.huoqing@linux.dev>,
chrome-platform@lists.linux.dev,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Guenter Roeck <groeck@chromium.org>,
Jitao Shi <jitao.shi@mediatek.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-renesas-soc@vger.kernel.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Maxime Ripard <mripard@kernel.org>,
Philip Chen <philipchen@chromium.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Sam Ravnborg <sam@ravnborg.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Andrzej Hajda <a.hajda@samsung.com>
Subject: [PATCH v1 02/12] drm/bridge: Drop unused drm_bridge_chain functions
Date: Sun, 17 Jul 2022 19:44:44 +0200 [thread overview]
Message-ID: <20220717174454.46616-3-sam@ravnborg.org> (raw)
In-Reply-To: <20220717174454.46616-1-sam@ravnborg.org>
The drm_bridge_chain_{pre_enable,enable,disable,post_disable} has no
users left and we have atomic variants that should be used.
Drop them so they do not gain new users.
Adjust a few comments to avoid references to the dropped functions.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
---
drivers/gpu/drm/drm_bridge.c | 110 -----------------------------------
include/drm/drm_bridge.h | 28 ---------
2 files changed, 138 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index 1545c50fd1c8..bb7fc09267af 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -509,61 +509,6 @@ drm_bridge_chain_mode_valid(struct drm_bridge *bridge,
}
EXPORT_SYMBOL(drm_bridge_chain_mode_valid);
-/**
- * drm_bridge_chain_disable - disables all bridges in the encoder chain
- * @bridge: bridge control structure
- *
- * Calls &drm_bridge_funcs.disable op for all the bridges in the encoder
- * chain, starting from the last bridge to the first. These are called before
- * calling the encoder's prepare op.
- *
- * Note: the bridge passed should be the one closest to the encoder
- */
-void drm_bridge_chain_disable(struct drm_bridge *bridge)
-{
- struct drm_encoder *encoder;
- struct drm_bridge *iter;
-
- if (!bridge)
- return;
-
- encoder = bridge->encoder;
- list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) {
- if (iter->funcs->disable)
- iter->funcs->disable(iter);
-
- if (iter == bridge)
- break;
- }
-}
-EXPORT_SYMBOL(drm_bridge_chain_disable);
-
-/**
- * drm_bridge_chain_post_disable - cleans up after disabling all bridges in the
- * encoder chain
- * @bridge: bridge control structure
- *
- * Calls &drm_bridge_funcs.post_disable op for all the bridges in the
- * encoder chain, starting from the first bridge to the last. These are called
- * after completing the encoder's prepare op.
- *
- * Note: the bridge passed should be the one closest to the encoder
- */
-void drm_bridge_chain_post_disable(struct drm_bridge *bridge)
-{
- struct drm_encoder *encoder;
-
- if (!bridge)
- return;
-
- encoder = bridge->encoder;
- list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) {
- if (bridge->funcs->post_disable)
- bridge->funcs->post_disable(bridge);
- }
-}
-EXPORT_SYMBOL(drm_bridge_chain_post_disable);
-
/**
* drm_bridge_chain_mode_set - set proposed mode for all bridges in the
* encoder chain
@@ -593,61 +538,6 @@ void drm_bridge_chain_mode_set(struct drm_bridge *bridge,
}
EXPORT_SYMBOL(drm_bridge_chain_mode_set);
-/**
- * drm_bridge_chain_pre_enable - prepares for enabling all bridges in the
- * encoder chain
- * @bridge: bridge control structure
- *
- * Calls &drm_bridge_funcs.pre_enable op for all the bridges in the encoder
- * chain, starting from the last bridge to the first. These are called
- * before calling the encoder's commit op.
- *
- * Note: the bridge passed should be the one closest to the encoder
- */
-void drm_bridge_chain_pre_enable(struct drm_bridge *bridge)
-{
- struct drm_encoder *encoder;
- struct drm_bridge *iter;
-
- if (!bridge)
- return;
-
- encoder = bridge->encoder;
- list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) {
- if (iter->funcs->pre_enable)
- iter->funcs->pre_enable(iter);
-
- if (iter == bridge)
- break;
- }
-}
-EXPORT_SYMBOL(drm_bridge_chain_pre_enable);
-
-/**
- * drm_bridge_chain_enable - enables all bridges in the encoder chain
- * @bridge: bridge control structure
- *
- * Calls &drm_bridge_funcs.enable op for all the bridges in the encoder
- * chain, starting from the first bridge to the last. These are called
- * after completing the encoder's commit op.
- *
- * Note that the bridge passed should be the one closest to the encoder
- */
-void drm_bridge_chain_enable(struct drm_bridge *bridge)
-{
- struct drm_encoder *encoder;
-
- if (!bridge)
- return;
-
- encoder = bridge->encoder;
- list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) {
- if (bridge->funcs->enable)
- bridge->funcs->enable(bridge);
- }
-}
-EXPORT_SYMBOL(drm_bridge_chain_enable);
-
/**
* drm_atomic_bridge_chain_disable - disables all bridges in the encoder chain
* @bridge: bridge control structure
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index dba5d81e3b4a..1eca9c4c3346 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -297,12 +297,6 @@ struct drm_bridge_funcs {
* not enable the display link feeding the next bridge in the chain (if
* there is one) when this callback is called.
*
- * Note that this function will only be invoked in the context of an
- * atomic commit. It will not be invoked from
- * &drm_bridge_chain_pre_enable. It would be prudent to also provide an
- * implementation of @pre_enable if you are expecting driver calls into
- * &drm_bridge_chain_pre_enable.
- *
* The @atomic_pre_enable callback is optional.
*/
void (*atomic_pre_enable)(struct drm_bridge *bridge,
@@ -323,11 +317,6 @@ struct drm_bridge_funcs {
* callback must enable the display link feeding the next bridge in the
* chain if there is one.
*
- * Note that this function will only be invoked in the context of an
- * atomic commit. It will not be invoked from &drm_bridge_chain_enable.
- * It would be prudent to also provide an implementation of @enable if
- * you are expecting driver calls into &drm_bridge_chain_enable.
- *
* The @atomic_enable callback is optional.
*/
void (*atomic_enable)(struct drm_bridge *bridge,
@@ -345,12 +334,6 @@ struct drm_bridge_funcs {
* The bridge can assume that the display pipe (i.e. clocks and timing
* signals) feeding it is still running when this callback is called.
*
- * Note that this function will only be invoked in the context of an
- * atomic commit. It will not be invoked from
- * &drm_bridge_chain_disable. It would be prudent to also provide an
- * implementation of @disable if you are expecting driver calls into
- * &drm_bridge_chain_disable.
- *
* The @atomic_disable callback is optional.
*/
void (*atomic_disable)(struct drm_bridge *bridge,
@@ -370,13 +353,6 @@ struct drm_bridge_funcs {
* signals) feeding it is no longer running when this callback is
* called.
*
- * Note that this function will only be invoked in the context of an
- * atomic commit. It will not be invoked from
- * &drm_bridge_chain_post_disable.
- * It would be prudent to also provide an implementation of
- * @post_disable if you are expecting driver calls into
- * &drm_bridge_chain_post_disable.
- *
* The @atomic_post_disable callback is optional.
*/
void (*atomic_post_disable)(struct drm_bridge *bridge,
@@ -876,13 +852,9 @@ enum drm_mode_status
drm_bridge_chain_mode_valid(struct drm_bridge *bridge,
const struct drm_display_info *info,
const struct drm_display_mode *mode);
-void drm_bridge_chain_disable(struct drm_bridge *bridge);
-void drm_bridge_chain_post_disable(struct drm_bridge *bridge);
void drm_bridge_chain_mode_set(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
const struct drm_display_mode *adjusted_mode);
-void drm_bridge_chain_pre_enable(struct drm_bridge *bridge);
-void drm_bridge_chain_enable(struct drm_bridge *bridge);
int drm_atomic_bridge_chain_check(struct drm_bridge *bridge,
struct drm_crtc_state *crtc_state,
--
2.34.1
next prev parent reply other threads:[~2022-07-17 17:45 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 17:44 [PATCH v1 0/12] drm bridge updates Sam Ravnborg
2022-07-17 17:44 ` [PATCH v1 01/12] drm/bridge: ps8640: Use atomic variants of drm_bridge_funcs Sam Ravnborg
2022-09-19 15:17 ` Laurent Pinchart
2022-07-17 17:44 ` Sam Ravnborg [this message]
2022-07-17 17:44 ` [PATCH v1 03/12] drm/mediatek: Drop chain_mode_fixup call in mode_valid() Sam Ravnborg
2022-09-18 4:45 ` Chun-Kuang Hu
2022-09-19 15:18 ` Laurent Pinchart
2022-07-17 17:44 ` [PATCH v1 04/12] drm/bridge: Drop drm_bridge_chain_mode_fixup Sam Ravnborg
2022-09-19 15:19 ` Laurent Pinchart
2022-07-17 17:44 ` [PATCH v1 05/12] drm/bridge: sii8620: Use drm_bridge_funcs.atomic_check Sam Ravnborg
2022-07-19 13:59 ` Dave Stevenson
2022-09-19 15:27 ` Laurent Pinchart
2022-07-17 17:44 ` [PATCH v1 06/12] drm/bridge: cros-ec-anx7688: " Sam Ravnborg
2022-07-19 14:03 ` Dave Stevenson
2022-09-19 15:28 ` Laurent Pinchart
2022-07-17 17:44 ` [PATCH v1 07/12] drm/bridge: tc358767: " Sam Ravnborg
2022-07-19 14:08 ` Dave Stevenson
2022-09-19 15:29 ` Laurent Pinchart
2022-09-19 15:38 ` Laurent Pinchart
2022-07-17 17:57 ` [PATCH v1 08/12] drm/mediatek: Drop mtk_hdmi_bridge_mode_fixup Sam Ravnborg
2022-07-17 17:57 ` [PATCH v1 09/12] drm/rcar-du: lvds: Use drm_bridge_funcs.atomic_check Sam Ravnborg
2022-07-19 14:11 ` Dave Stevenson
2022-09-19 15:31 ` Laurent Pinchart
2022-07-17 17:57 ` [PATCH v1 10/12] drm/omapdrm: " Sam Ravnborg
2022-09-19 15:33 ` Laurent Pinchart
2022-07-17 17:58 ` [PATCH v1 11/12] drm/bridge: Drop drm_bridge_funcs.mode_fixup Sam Ravnborg
2022-07-19 14:22 ` Dave Stevenson
2022-09-19 15:34 ` Laurent Pinchart
2022-07-17 17:58 ` [PATCH v1 12/12] drm/todo: Add bridge related todo items Sam Ravnborg
2022-07-18 10:27 ` Dave Stevenson
2022-07-18 18:00 ` Sam Ravnborg
2022-07-19 10:47 ` Dave Stevenson
2022-07-19 14:09 ` [PATCH v1 08/12] drm/mediatek: Drop mtk_hdmi_bridge_mode_fixup Dave Stevenson
2022-09-18 4:46 ` Chun-Kuang Hu
2022-09-19 15:30 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220717174454.46616-3-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=arnd@arndb.de \
--cc=bleung@chromium.org \
--cc=cai.huoqing@linux.dev \
--cc=chrome-platform@lists.linux.dev \
--cc=chunkuang.hu@kernel.org \
--cc=dafna.hirschfeld@collabora.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=jernej.skrabec@gmail.com \
--cc=jitao.shi@mediatek.com \
--cc=jonas@kwiboo.se \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=narmstrong@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=philipchen@chromium.org \
--cc=robert.foss@linaro.org \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox