]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/bridge: tc358767: Change tc_ prefix to tc_edp_ for (e)DP specific functions
authorMarek Vasut <marex@denx.de>
Tue, 29 Mar 2022 08:50:07 +0000 (10:50 +0200)
committerRobert Foss <robert.foss@linaro.org>
Thu, 31 Mar 2022 13:59:01 +0000 (15:59 +0200)
These functions are specific to (e)DP output initialization and
operation, add specific tc_edp_ prefix to those functions to
discern them from DPI output functions that will be added later
in this series. No functional change.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Lucas Stach <l.stach@pengutronix.de> # In both DPI to eDP and DSI to DPI mode.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <maxime@cerno.tech>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220329085015.39159-4-marex@denx.de
drivers/gpu/drm/bridge/tc358767.c

index 7f9574b17caa46d461297e8f446c84cbd319927d..79691cd3b18cca4c48a185095ca587aa4120a142 100644 (file)
@@ -1164,7 +1164,7 @@ static int tc_main_link_disable(struct tc_data *tc)
        return regmap_write(tc->regmap, DP0CTL, 0);
 }
 
-static int tc_stream_enable(struct tc_data *tc)
+static int tc_edp_stream_enable(struct tc_data *tc)
 {
        int ret;
        u32 value;
@@ -1219,7 +1219,7 @@ static int tc_stream_enable(struct tc_data *tc)
        return 0;
 }
 
-static int tc_stream_disable(struct tc_data *tc)
+static int tc_edp_stream_disable(struct tc_data *tc)
 {
        int ret;
 
@@ -1234,7 +1234,7 @@ static int tc_stream_disable(struct tc_data *tc)
        return 0;
 }
 
-static void tc_bridge_enable(struct drm_bridge *bridge)
+static void tc_edp_bridge_enable(struct drm_bridge *bridge)
 {
        struct tc_data *tc = bridge_to_tc(bridge);
        int ret;
@@ -1251,7 +1251,7 @@ static void tc_bridge_enable(struct drm_bridge *bridge)
                return;
        }
 
-       ret = tc_stream_enable(tc);
+       ret = tc_edp_stream_enable(tc);
        if (ret < 0) {
                dev_err(tc->dev, "main link stream start error: %d\n", ret);
                tc_main_link_disable(tc);
@@ -1259,12 +1259,12 @@ static void tc_bridge_enable(struct drm_bridge *bridge)
        }
 }
 
-static void tc_bridge_disable(struct drm_bridge *bridge)
+static void tc_edp_bridge_disable(struct drm_bridge *bridge)
 {
        struct tc_data *tc = bridge_to_tc(bridge);
        int ret;
 
-       ret = tc_stream_disable(tc);
+       ret = tc_edp_stream_disable(tc);
        if (ret < 0)
                dev_err(tc->dev, "main link stream stop error: %d\n", ret);
 
@@ -1285,9 +1285,10 @@ static bool tc_bridge_mode_fixup(struct drm_bridge *bridge,
        return true;
 }
 
-static enum drm_mode_status tc_mode_valid(struct drm_bridge *bridge,
-                                         const struct drm_display_info *info,
-                                         const struct drm_display_mode *mode)
+static enum drm_mode_status
+tc_edp_mode_valid(struct drm_bridge *bridge,
+                 const struct drm_display_info *info,
+                 const struct drm_display_mode *mode)
 {
        struct tc_data *tc = bridge_to_tc(bridge);
        u32 req, avail;
@@ -1395,8 +1396,8 @@ static const struct drm_connector_funcs tc_connector_funcs = {
        .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
 };
 
-static int tc_bridge_attach(struct drm_bridge *bridge,
-                           enum drm_bridge_attach_flags flags)
+static int tc_edp_bridge_attach(struct drm_bridge *bridge,
+                               enum drm_bridge_attach_flags flags)
 {
        u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
        struct tc_data *tc = bridge_to_tc(bridge);
@@ -1448,18 +1449,18 @@ aux_unregister:
        return ret;
 }
 
-static void tc_bridge_detach(struct drm_bridge *bridge)
+static void tc_edp_bridge_detach(struct drm_bridge *bridge)
 {
        drm_dp_aux_unregister(&bridge_to_tc(bridge)->aux);
 }
 
-static const struct drm_bridge_funcs tc_bridge_funcs = {
-       .attach = tc_bridge_attach,
-       .detach = tc_bridge_detach,
-       .mode_valid = tc_mode_valid,
+static const struct drm_bridge_funcs tc_edp_bridge_funcs = {
+       .attach = tc_edp_bridge_attach,
+       .detach = tc_edp_bridge_detach,
+       .mode_valid = tc_edp_mode_valid,
        .mode_set = tc_bridge_mode_set,
-       .enable = tc_bridge_enable,
-       .disable = tc_bridge_disable,
+       .enable = tc_edp_bridge_enable,
+       .disable = tc_edp_bridge_disable,
        .mode_fixup = tc_bridge_mode_fixup,
        .detect = tc_bridge_detect,
        .get_edid = tc_get_edid,
@@ -1696,7 +1697,7 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
        tc->aux.transfer = tc_aux_transfer;
        drm_dp_aux_init(&tc->aux);
 
-       tc->bridge.funcs = &tc_bridge_funcs;
+       tc->bridge.funcs = &tc_edp_bridge_funcs;
        if (tc->hpd_pin >= 0)
                tc->bridge.ops |= DRM_BRIDGE_OP_DETECT;
        tc->bridge.ops |= DRM_BRIDGE_OP_EDID;