disp: msm: dp: adapt drm_dp_link_train* APIs for multiple SIs
Commit 1ef7ff2
("disp: msm: dp: pass drm_dp_aux to drm_dp_link_train* APIs")
passes additional parameter drm_dp_aux to drm_dp_link_train APIs in order
to use drm_dbg_* within those functions.
This change put a macro in the drm_dp_link_train* APIs caller to handle API
changes for both kernel version 5.10 and version 5.15.
Change-Id: I9fd22e0effbe87b6cfecf72b38a10d74a2c0c5ea
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
此提交包含在:
13
msm/dp/dp_ctrl.c
可執行檔 → 一般檔案
13
msm/dp/dp_ctrl.c
可執行檔 → 一般檔案
@@ -7,6 +7,7 @@
|
||||
#include <linux/completion.h>
|
||||
#include <linux/delay.h>
|
||||
#include <drm/drm_fixed.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "dp_ctrl.h"
|
||||
#include "dp_debug.h"
|
||||
@@ -372,7 +373,11 @@ static int dp_ctrl_link_training_1(struct dp_ctrl_private *ctrl)
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
drm_dp_link_train_clock_recovery_delay(ctrl->aux->drm_aux, ctrl->panel->dpcd);
|
||||
#else
|
||||
drm_dp_link_train_clock_recovery_delay(ctrl->panel->dpcd);
|
||||
#endif
|
||||
|
||||
ret = dp_ctrl_read_link_status(ctrl, link_status);
|
||||
if (ret)
|
||||
@@ -457,7 +462,11 @@ static int dp_ctrl_link_rate_down_shift(struct dp_ctrl_private *ctrl)
|
||||
static void dp_ctrl_clear_training_pattern(struct dp_ctrl_private *ctrl)
|
||||
{
|
||||
dp_ctrl_update_sink_pattern(ctrl, 0);
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
drm_dp_link_train_channel_eq_delay(ctrl->aux->drm_aux, ctrl->panel->dpcd);
|
||||
#else
|
||||
drm_dp_link_train_channel_eq_delay(ctrl->panel->dpcd);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int dp_ctrl_link_training_2(struct dp_ctrl_private *ctrl)
|
||||
@@ -503,7 +512,11 @@ static int dp_ctrl_link_training_2(struct dp_ctrl_private *ctrl)
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
drm_dp_link_train_channel_eq_delay(ctrl->aux->drm_aux, ctrl->panel->dpcd);
|
||||
#else
|
||||
drm_dp_link_train_channel_eq_delay(ctrl->panel->dpcd);
|
||||
#endif
|
||||
|
||||
ret = dp_ctrl_read_link_status(ctrl, link_status);
|
||||
if (ret)
|
||||
|
新增問題並參考
封鎖使用者