mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 10:15:32 -05:00
drm/bridge: analogix_dp: ignore return values of drm_panel_* calls
Follow the example of other drivers and ignore return values of the drm_panel_prepare() / unprepare() / enable() / disable() calls. There is no possible error recovery, so the driver just logs a message. Tested-by: Damon Ding <damon.ding@rock-chips.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250401-panel-return-void-v1-6-93e1be33dc8d@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
@@ -838,10 +838,7 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
|
||||
int ret;
|
||||
|
||||
/* Keep the panel disabled while we configure video */
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_disable(dp->plat_data->panel))
|
||||
DRM_ERROR("failed to disable the panel\n");
|
||||
}
|
||||
drm_panel_disable(dp->plat_data->panel);
|
||||
|
||||
ret = analogix_dp_train_link(dp);
|
||||
if (ret) {
|
||||
@@ -863,13 +860,7 @@ static int analogix_dp_commit(struct analogix_dp_device *dp)
|
||||
}
|
||||
|
||||
/* Safe to enable the panel now */
|
||||
if (dp->plat_data->panel) {
|
||||
ret = drm_panel_enable(dp->plat_data->panel);
|
||||
if (ret) {
|
||||
DRM_ERROR("failed to enable the panel\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
drm_panel_enable(dp->plat_data->panel);
|
||||
|
||||
/* Check whether panel supports fast training */
|
||||
ret = analogix_dp_fast_link_train_detection(dp);
|
||||
@@ -1136,7 +1127,6 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge,
|
||||
struct analogix_dp_device *dp = bridge->driver_private;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
int ret;
|
||||
|
||||
crtc = analogix_dp_get_new_crtc(dp, old_state);
|
||||
if (!crtc)
|
||||
@@ -1147,11 +1137,7 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge,
|
||||
if (old_crtc_state && old_crtc_state->self_refresh_active)
|
||||
return;
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
ret = drm_panel_prepare(dp->plat_data->panel);
|
||||
if (ret)
|
||||
DRM_ERROR("failed to prepare the panel ret = %d\n", ret);
|
||||
}
|
||||
drm_panel_prepare(dp->plat_data->panel);
|
||||
}
|
||||
|
||||
static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
|
||||
@@ -1231,17 +1217,11 @@ static void analogix_dp_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
|
||||
{
|
||||
struct analogix_dp_device *dp = bridge->driver_private;
|
||||
int ret;
|
||||
|
||||
if (dp->dpms_mode != DRM_MODE_DPMS_ON)
|
||||
return;
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_disable(dp->plat_data->panel)) {
|
||||
DRM_ERROR("failed to disable the panel\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
drm_panel_disable(dp->plat_data->panel);
|
||||
|
||||
disable_irq(dp->irq);
|
||||
|
||||
@@ -1249,11 +1229,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
|
||||
|
||||
pm_runtime_put_sync(dp->dev);
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
ret = drm_panel_unprepare(dp->plat_data->panel);
|
||||
if (ret)
|
||||
DRM_ERROR("failed to unprepare the panel ret = %d\n", ret);
|
||||
}
|
||||
drm_panel_unprepare(dp->plat_data->panel);
|
||||
|
||||
dp->fast_train_enable = false;
|
||||
dp->psr_supported = false;
|
||||
@@ -1694,10 +1670,7 @@ void analogix_dp_unbind(struct analogix_dp_device *dp)
|
||||
analogix_dp_bridge_disable(dp->bridge);
|
||||
dp->connector.funcs->destroy(&dp->connector);
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_unprepare(dp->plat_data->panel))
|
||||
DRM_ERROR("failed to turnoff the panel\n");
|
||||
}
|
||||
drm_panel_unprepare(dp->plat_data->panel);
|
||||
|
||||
drm_dp_aux_unregister(&dp->aux);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user