drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer()
Change logging from drm_{err,info}() to dev_{err,info}() in functions mtk_dp_aux_transfer() and mtk_dp_aux_do_transfer(): this will be essential to avoid getting NULL pointer kernel panics if any kind of error happens during AUX transfers happening before the bridge is attached. This may potentially start happening in a later commit implementing aux-bus support, as AUX transfers will be triggered from the panel driver (for EDID) before the mtk-dp bridge gets attached, and it's done in preparation for the same. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: CK Hu <ck.hu@mediatek.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20230725073234.55892-4-angelogioacchino.delregno@collabora.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
e04b56cd03
commit
fd70e2019b
|
@ -847,7 +847,7 @@ static int mtk_dp_aux_do_transfer(struct mtk_dp *mtk_dp, bool is_read, u8 cmd,
|
||||||
u32 phy_status = mtk_dp_read(mtk_dp, MTK_DP_AUX_P0_3628) &
|
u32 phy_status = mtk_dp_read(mtk_dp, MTK_DP_AUX_P0_3628) &
|
||||||
AUX_RX_PHY_STATE_AUX_TX_P0_MASK;
|
AUX_RX_PHY_STATE_AUX_TX_P0_MASK;
|
||||||
if (phy_status != AUX_RX_PHY_STATE_AUX_TX_P0_RX_IDLE) {
|
if (phy_status != AUX_RX_PHY_STATE_AUX_TX_P0_RX_IDLE) {
|
||||||
drm_err(mtk_dp->drm_dev,
|
dev_err(mtk_dp->dev,
|
||||||
"AUX Rx Aux hang, need SW reset\n");
|
"AUX Rx Aux hang, need SW reset\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
@ -2054,7 +2054,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux,
|
||||||
is_read = true;
|
is_read = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
drm_err(mtk_aux->drm_dev, "invalid aux cmd = %d\n",
|
dev_err(mtk_dp->dev, "invalid aux cmd = %d\n",
|
||||||
msg->request);
|
msg->request);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -2070,7 +2070,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux,
|
||||||
to_access, &msg->reply);
|
to_access, &msg->reply);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
drm_info(mtk_dp->drm_dev,
|
dev_info(mtk_dp->dev,
|
||||||
"Failed to do AUX transfer: %d\n", ret);
|
"Failed to do AUX transfer: %d\n", ret);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue