[PATCH] drm/msm/dp: add connector type to enhance debug messages
Kuogee Hsieh
quic_khsieh at quicinc.com
Tue Jan 25 18:26:07 UTC 2022
On 1/24/2022 5:50 PM, Stephen Boyd wrote:
> Quoting Kuogee Hsieh (2022-01-24 14:44:52)
>> DP driver is a generic driver which supports both eDP and DP.
>> For debugging purpose it is required to have capabilities to
>> differentiate message are generated from eDP or DP. This patch
>> add connector type into debug messages for this purpose.
>>
>> Signed-off-by: Kuogee Hsieh <quic_khsieh at quicinc.com>
>> ---
>> drivers/gpu/drm/msm/dp/dp_ctrl.c | 20 +++++------
>> drivers/gpu/drm/msm/dp/dp_display.c | 71 ++++++++++++++++++++++++++-----------
>> 2 files changed, 60 insertions(+), 31 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> index 245e1b9..dcd0126 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
>> @@ -1396,6 +1396,8 @@ void dp_ctrl_phy_init(struct dp_ctrl *dp_ctrl)
>>
>> dp_catalog_ctrl_phy_reset(ctrl->catalog);
>> phy_init(phy);
>> + DRM_DEBUG_DP("phy=%p init=%d power_on=%d\n",
>> + phy, phy->init_count, phy->power_count);
>> }
>>
>> void dp_ctrl_phy_exit(struct dp_ctrl *dp_ctrl)
>> @@ -1410,6 +1412,8 @@ void dp_ctrl_phy_exit(struct dp_ctrl *dp_ctrl)
>>
>> dp_catalog_ctrl_phy_reset(ctrl->catalog);
>> phy_exit(phy);
>> + DRM_DEBUG_DP("phy=%p init=%d power_on=%d\n",
>> + phy, phy->init_count, phy->power_count);
>> }
>>
>> static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl)
>> @@ -1484,6 +1488,8 @@ static int dp_ctrl_deinitialize_mainlink(struct dp_ctrl_private *ctrl)
>> phy_exit(phy);
>> phy_init(phy);
>>
>> + DRM_DEBUG_DP("phy=%p init=%d power_on=%d\n",
>> + phy, phy->init_count, phy->power_count);
>> return 0;
>> }
>>
> These are entirely new messages. Adding messages isn't mentioned in the
> commit text. Please either split this out or indicate in the commit text
> what's going on here.
>
>> @@ -1895,14 +1901,12 @@ int dp_ctrl_off_link_stream(struct dp_ctrl *dp_ctrl)
>>
>> phy_power_off(phy);
>>
>> - DRM_DEBUG_DP("After, phy=%x init_count=%d power_on=%d\n",
>> - (u32)(uintptr_t)phy, phy->init_count, phy->power_count);
>> -
>> /* aux channel down, reinit phy */
>> phy_exit(phy);
>> phy_init(phy);
>>
>> - DRM_DEBUG_DP("DP off link/stream done\n");
>> + DRM_DEBUG_DP("phy=%p init=%d power_on=%d\n",
> The DRM_DEBUG_DP macro says it's deprecated now and we should use
> drm_dbg_dp() instead. Can you use that macro instead? Then it looks like
> drm->dev can actually be any old struct device, so I guess we're allowed
> to pass in the particular instance of dp device this is for. Allowing us
> to figure out which DP device is actually printing messages.
where it say "deprecated"?
>> + phy, phy->init_count, phy->power_count);
>> return ret;
>> }
>>
More information about the dri-devel
mailing list