drm/msm/dp: remove unused stubs
PATCH v2 1/3 drm/msm/dp: remove unused stubs
Refactoring DP code transformed several functions into empty stubs. Remove them.
--- drivers/gpu/drm/msm/dp/dp_display.c | 35 ----------------------------- 1 file changed, 35 deletions(-)
drivers/gpu/drm/msm/dp/dp_display.c +0 -35
@@ -857,11 +857,6 @@ static int dp_display_set_mode(struct msm_dp *dp_display,return 0 ; } -static int dp_display_prepare (struct msm_dp *dp_display) -{ -return 0 ; -} -static int dp_display_enable (struct dp_display_private *dp,u32 data) {int rc =0 ;
@@ -938,11 +933,6 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)return 0 ; } -static int dp_display_unprepare (struct msm_dp *dp_display) -{ -return 0 ; -} -int dp_display_set_plugged_cb (struct msm_dp *dp_display,hdmi_codec_plugged_cb fn,struct device *codec_dev) {
@@ -1458,21 +1448,9 @@ static int dp_pm_suspend(struct device *dev)return 0 ; } -static int dp_pm_prepare (struct device *dev) -{ -return 0 ; -} - -static void dp_pm_complete (struct device *dev) -{ - -} -static const struct dev_pm_ops dp_pm_ops = { .suspend = dp_pm_suspend, .resume = dp_pm_resume, - .prepare = dp_pm_prepare, - .complete = dp_pm_complete, };static struct platform_driver dp_display_driver = {
@@ -1686,13 +1664,6 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge)return ; } - rc =dp_display_prepare (dp); -if (rc) { -DRM_ERROR ("DP display prepare failed, rc=%d\n" , rc); -mutex_unlock (&dp_display->event_mutex); -return ; - } - state = dp_display->hpd_state;if (state ==ST_DISPLAY_OFF ) {
@@ -1706,7 +1677,6 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge)if (rc) {DRM_ERROR ("DP display post enable failed, rc=%d\n" , rc);dp_display_disable (dp_display,0 ); -dp_display_unprepare (dp); }/* completed connection */
@@ -1731,7 +1701,6 @@ void dp_bridge_post_disable(struct drm_bridge *drm_bridge) {struct msm_dp_bridge *dp_bridge =to_dp_bridge (drm_bridge);struct msm_dp *dp = dp_bridge->dp_display; -int rc =0 ;u32 state;struct dp_display_private *dp_display;
@@ -1750,10 +1719,6 @@ void dp_bridge_post_disable(struct drm_bridge *drm_bridge)dp_display_disable (dp_display,0 ); - rc =dp_display_unprepare (dp); -if (rc) -DRM_ERROR ("DP display unprepare failed, rc=%d\n" , rc); - state = dp_display->hpd_state;if (state ==ST_DISCONNECT_PENDING ) {/* completed disconnection */
Signature · 1 line
2.35.1
PATCH v2 2/3 drm/msm/dp: rename second dp_display_enable()'s argument
To follow up recent changes, rename (and change type of) second dp_display_enable()'s argument from generic u32 data to bool force_link_train, which is later passed to dp_ctrl_on_stream().
---
Changes since v1:
- Added patch
--- drivers/gpu/drm/msm/dp/dp_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/dp/dp_display.c +3 -3
@@ -608,7 +608,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data)return 0 ; }; -static int dp_display_enable (struct dp_display_private *dp,u32 data); +static int dp_display_enable (struct dp_display_private *dp,bool force_link_train);static int dp_display_disable (struct dp_display_private *dp,u32 data); static void dp_display_handle_plugged_change(struct msm_dp *dp_display,
@@ -857,7 +857,7 @@ static int dp_display_set_mode(struct msm_dp *dp_display,return 0 ; } -static int dp_display_enable (struct dp_display_private *dp,u32 data) +static int dp_display_enable (struct dp_display_private *dp,bool force_link_train) {int rc =0 ;struct msm_dp *dp_display = &dp->dp_display;
@@ -868,7 +868,7 @@ static int dp_display_enable(struct dp_display_private *dp, u32 data)return 0 ; } - rc =dp_ctrl_on_stream (dp->ctrl, data); + rc =dp_ctrl_on_stream (dp->ctrl, force_link_train);if (!rc) dp_display->power_on = true;
Signature · 1 line
2.35.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Kuogee Hsieh
Reviewed-byRe: Fwd: [PATCH v2 2/3] drm/msm/dp: rename second dp_display_enable()'s argument
Quoted 10 lines · Abhinav Kumar
-------- Forwarded Message --------
Subject: [PATCH v2 2/3] drm/msm/dp: rename second dp_display_enable()'s argument
Date: Sat, 18 Jun 2022 02:24:33 +0300
From: Dmitry Baryshkov <[email protected]>
To: Rob Clark <[email protected]>, Sean Paul <[email protected]>, Abhinav Kumar <[email protected]>
CC: Stephen Boyd <[email protected]>, David Airlie <[email protected]>, Daniel Vetter <[email protected]>, Bjorn Andersson <[email protected]>, [email protected], [email protected], [email protected]
Quoted 5 lines
To follow up recent changes, rename (and change type of) second dp_display_enable()'s argument from generic u32 data to bool
force_link_train, which is later passed todp_ctrl_on_stream().Signed-off-by Dmitry Baryshkov <[email protected]>
Quoted 40 lines
---
Changes since v1:
- Added patch
---
drivers/gpu/drm/msm/dp/dp_display.c | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/msm/dp/dp_display.c +1
-0@@ -608,7 +608,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) return 0; }; -static int dp_display_enable(struct dp_display_private *dp, u32 data); +static int dp_display_enable (struct dp_display_private *dp,bool force_link_train); static int dp_display_disable(struct dp_display_private *dp, u32 data);static void dp_display_handle_plugged_change(struct
msm_dp*dp_display,drivers/gpu/drm/msm/dp/dp_display.c +1
-0@@ -857,7 +857,7 @@ static int dp_display_set_mode(struct msm_dp *dp_display, return 0; } -static int dp_display_enable(struct dp_display_private *dp, u32 data) +static int dp_display_enable(struct dp_display_private *dp, bool force_link_train) {int rc = 0;
structmsm_dp*dp_display=&dp->dp_display;drivers/gpu/drm/msm/dp/dp_display.c +1
-0@@ -868,7 +868,7 @@ static int dp_display_enable(struct dp_display_private *dp, u32 data) return 0; } - rc = dp_ctrl_on_stream(dp->ctrl, data); + rc = dp_ctrl_on_stream(dp->ctrl, force_link_train); if (!rc) dp_display->power_on = true;-- 2.35.1
PATCH v2 3/3 drm/msm/dp: remove dp_display_en/disable prototypes and data argument
In reply to Dmitry BaryshkovRemove unused dp_display_en/disable prototypes. While we are at it, remove extra 'data' argument that is unused.
---
Changes since v1:
- Rebased and dropped the dp_display_enable() chunk
--- drivers/gpu/drm/msm/dp/dp_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/msm/dp/dp_display.c +3 -6
@@ -608,9 +608,6 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data)return 0 ; }; -static int dp_display_enable (struct dp_display_private *dp,bool force_link_train); -static int dp_display_disable (struct dp_display_private *dp,u32 data); -static void dp_display_handle_plugged_change (struct msm_dp *dp_display,bool plugged) {
@@ -894,7 +891,7 @@ static int dp_display_post_enable(struct msm_dp *dp_display)return 0 ; } -static int dp_display_disable (struct dp_display_private *dp,u32 data) +static int dp_display_disable (struct dp_display_private *dp) {struct msm_dp *dp_display = &dp->dp_display;
@@ -1676,7 +1673,7 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge) rc =dp_display_post_enable (dp);if (rc) {DRM_ERROR ("DP display post enable failed, rc=%d\n" , rc); -dp_display_disable (dp_display,0 ); +dp_display_disable (dp_display); }/* completed connection */
@@ -1717,7 +1714,7 @@ void dp_bridge_post_disable(struct drm_bridge *drm_bridge)return ; } -dp_display_disable (dp_display,0 ); +dp_display_disable (dp_display); state = dp_display->hpd_state;if (state ==ST_DISCONNECT_PENDING ) {
Signature · 1 line
2.35.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Kuogee Hsieh
Reviewed-byRe: Fwd: [PATCH v2 3/3] drm/msm/dp: remove dp_display_en/disable prototypes and data argument
Quoted 10 lines · Abhinav Kumar
-------- Forwarded Message --------
Subject: [PATCH v2 3/3] drm/msm/dp: remove dp_display_en/disable prototypes and data argument
Date: Sat, 18 Jun 2022 02:24:34 +0300
From: Dmitry Baryshkov <[email protected]>
To: Rob Clark <[email protected]>, Sean Paul <[email protected]>, Abhinav Kumar <[email protected]>
CC: Stephen Boyd <[email protected]>, David Airlie <[email protected]>, Daniel Vetter <[email protected]>, Bjorn Andersson <[email protected]>, [email protected], [email protected], [email protected]
Quoted 4 lines
Remove unused dp_display_en/disable prototypes. While we are at it, remove extra 'data' argument that is unused.
Signed-off-by Dmitry Baryshkov <[email protected]>
Quoted 45 lines
---
Changes since v1:
- Rebased and dropped thedp_display_enable()chunk
---
drivers/gpu/drm/msm/dp/dp_display.c | 9 +++------1 file changed, 3 insertions(+), 6 deletions(-)drivers/gpu/drm/msm/dp/dp_display.c +0
-2@@ -608,9 +608,6 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) return 0; }; -static int dp_display_enable(struct dp_display_private *dp, bool force_link_train); -static int dp_display_disable (struct dp_display_private *dp,u32 data); - static void dp_display_handle_plugged_change(struct msm_dp *dp_display, bool plugged){
drivers/gpu/drm/msm/dp/dp_display.c +1
-0@@ -894,7 +891,7 @@ static int dp_display_post_enable(struct msm_dp *dp_display) return 0; } -static int dp_display_disable(struct dp_display_private *dp, u32 data) +static int dp_display_disable(struct dp_display_private *dp) { struct msm_dp *dp_display = &dp->dp_display;@@ -1676,7 +1673,7 @@ void
dp_bridge_enable(struct drm_bridge *drm_bridge)rc =dp_display_post_enable(dp);
if (rc) {
DRM_ERROR("DP display post enable failed, rc=%d\n", rc); -dp_display_disable(dp_display, 0);
+dp_display_disable(dp_display);
}
/* completed connection */drivers/gpu/drm/msm/dp/dp_display.c +1
-0@@ -1717,7 +1714,7 @@ void dp_bridge_post_disable(struct drm_bridge *drm_bridge) return; } - dp_display_disable(dp_display, 0); + dp_display_disable(dp_display); state = dp_display->hpd_state; if (state == ST_DISCONNECT_PENDING) {
A message that is not in the archive (sent off-list or not yet received): [email protected]
Kuogee Hsieh
Reviewed-byQuoted 10 lines · Abhinav Kumar
-------- Forwarded Message --------
Subject: [Freedreno] [PATCH v2 1/3] drm/msm/dp: remove unused stubs
Date: Sat, 18 Jun 2022 02:24:32 +0300
From: Dmitry Baryshkov <[email protected]>
To: Rob Clark <[email protected]>, Sean Paul <[email protected]>, Abhinav Kumar <[email protected]>
CC: David Airlie <[email protected]>, [email protected], [email protected], Bjorn Andersson <[email protected]>, Daniel Vetter <[email protected]>, Stephen Boyd <[email protected]>, [email protected]
Quoted 5 lines
Refactoring DP code transformed several functions into empty stubs. Remove them.
Reviewed-by Stephen Boyd <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>
Quoted 90 lines
---
drivers/gpu/drm/msm/dp/dp_display.c | 35 -----------------------------1 file changed, 35 deletions(-)drivers/gpu/drm/msm/dp/dp_display.c +0
-4@@ -857,11 +857,6 @@ static int dp_display_set_mode(struct msm_dp *dp_display, return 0; } -static int dp_display_prepare(struct msm_dp *dp_display) -{ - return 0; -} - static int dp_display_enable(struct dp_display_private *dp, u32 data) {int rc = 0;
drivers/gpu/drm/msm/dp/dp_display.c +0
-4@@ -938,11 +933,6 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data) return 0; } -static int dp_display_unprepare(struct msm_dp *dp_display) -{ - return 0; -} - int dp_display_set_plugged_cb(struct msm_dp *dp_display, hdmi_codec_plugged_cb fn, struct device *codec_dev){
drivers/gpu/drm/msm/dp/dp_display.c +0
-19@@ -1458,21 +1448,9 @@ static int dp_pm_suspend(struct device *dev) return 0; } -static int dp_pm_prepare(struct device *dev) -{ - return 0; -} - -static void dp_pm_complete (struct device *dev) -{ - -} - static const struct dev_pm_ops dp_pm_ops = { .suspend = dp_pm_suspend, .resume = dp_pm_resume, - .prepare = dp_pm_prepare, - .complete = dp_pm_complete, }; static struct platform_driver dp_display_driver = {@@ -1686,13 +1664,6 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge) return; } - rc = dp_display_prepare(dp); - if (rc) { - DRM_ERROR("DP display prepare failed, rc=%d\n", rc); - mutex_unlock(&dp_display->event_mutex); - return; - } - state = dp_display->hpd_state; if (state == ST_DISPLAY_OFF) {@@ -1706,7 +1677,6 @@ void dp_bridge_enable(struct drm_bridge *drm_bridge) if (rc) { DRM_ERROR("DP display post enable failed, rc=%d\n", rc); dp_display_disable(dp_display, 0); - dp_display_unprepare(dp); } /* completed connection */@@ -1731,7 +1701,6 @@ void dp_bridge_post_disable(struct drm_bridge *drm_bridge) { struct msm_dp_bridge *dp_bridge = to_dp_bridge(drm_bridge); struct msm_dp *dp = dp_bridge->dp_display; - int rc = 0; u32 state; struct dp_display_private *dp_display;@@ -1750,10 +1719,6 @@ void
dp_bridge_post_disable(struct drm_bridge *drm_bridge)dp_display_disable(dp_display, 0);
- rc =dp_display_unprepare(dp);
- if (rc)
-DRM_ERROR("DP display unprepare failed, rc=%d\n", rc);
-
state =dp_display->hpd_state;
if (state ==ST_DISCONNECT_PENDING) {
/* completed disconnection */