Re: [PATCH v3 3/3] drm/msm/dp: replace DRM_DEBUG_DP marco with drm_dbg_dp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/02/2022 03:22, Kuogee Hsieh wrote:

On 2/16/2022 3:46 PM, Stephen Boyd wrote:
Quoting Kuogee Hsieh (2022-02-02 10:56:39)

Please add some commit text

Signed-off-by: Kuogee Hsieh <quic_khsieh@xxxxxxxxxxx>
---
  drivers/gpu/drm/msm/dp/dp_audio.c   |  49 +++++++++++------
  drivers/gpu/drm/msm/dp/dp_catalog.c |  34 +++++++-----
  drivers/gpu/drm/msm/dp/dp_ctrl.c    | 106 +++++++++++++++++++-----------------
  drivers/gpu/drm/msm/dp/dp_display.c |  68 +++++++++++++----------
  drivers/gpu/drm/msm/dp/dp_drm.c     |   4 +-
  drivers/gpu/drm/msm/dp/dp_link.c    |  99 +++++++++++++++++++--------------
  drivers/gpu/drm/msm/dp/dp_panel.c   |  43 +++++++++------
  drivers/gpu/drm/msm/dp/dp_parser.c  |   2 +-
  drivers/gpu/drm/msm/dp/dp_power.c   |  20 ++++---
  9 files changed, 246 insertions(+), 179 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_audio.c b/drivers/gpu/drm/msm/dp/dp_audio.c
index d7e4a39..4fbbe0a 100644
--- a/drivers/gpu/drm/msm/dp/dp_audio.c
+++ b/drivers/gpu/drm/msm/dp/dp_audio.c
@@ -136,7 +136,8 @@ static void dp_audio_stream_sdp(struct dp_audio_private *audio)
         parity_byte = dp_audio_calculate_parity(new_value);
         value |= ((new_value << HEADER_BYTE_1_BIT)
                         | (parity_byte << PARITY_BYTE_1_BIT));
-       DRM_DEBUG_DP("Header Byte 1: value = 0x%x, parity_byte = 0x%x\n",
+       drm_dbg_dp((struct drm_device *)NULL,
Why can't we pass the platform device pointer? Surely the cast is not
necessary and in fact harmful.

Platform device only available at top level (dp_display.c), other level has no access to platform device or drm_device.

You can pass the platform device (or even better, drm device) to other driver blocks too. It's not something to be kept in secret in dp_display.c only.


I will just apss NULL, such as  drm_dbg_dp(NULL, ...), if not device available.



--
With best wishes
Dmitry



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux