mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Jordan Crouse <jordan@cosmicpenguin.net>,
	Chandan Uddaraju <chandanu@codeaurora.org>,
	Rajesh Yadav <ryadav@codeaurora.org>,
	Sravanthi Kollukuduru <skolluku@codeaurora.org>,
	Archit Taneja <architt@codeaurora.org>
Cc: <linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	Jeykumar Sankaran <jsanka@codeaurora.org>
Subject: Re: [PATCH 2/2] drm/msm/dpu: don't play tricks with debug macros
Date: Tue, 9 Jul 2024 12:38:00 -0700	[thread overview]
Message-ID: <46487222-6818-b0bf-e5cc-2310d62b5fe6@quicinc.com> (raw)
In-Reply-To: <20240709-dpu-fix-wb-v1-2-448348bfd4cb@linaro.org>



On 7/9/2024 6:48 AM, Dmitry Baryshkov wrote:
> DPU debugging macros need to be converted to a proper drm_debug_*
> macros, however this is a going an intrusive patch, not suitable for a
> fix. Wire DPU_DEBUG and DPU_DEBUG_DRIVER to always use DRM_DEBUG_DRIVER
> to make sure that DPU debugging messages always end up in the drm debug
> messages and are controlled via the usual drm.debug mask.
> 

These macros have been deprecated, is this waht you meant by the 
conversion to proper drm_debug_*?

/* NOTE: this is deprecated in favor of drm_dbg(NULL, ...). */
#define DRM_DEBUG_DRIVER(fmt, ...)                                      \
         __drm_dbg(DRM_UT_DRIVER, fmt, ##__VA_ARGS__)

I think all that this macro was doing was to have appropriate DRM_UT_* 
macros enabled before calling the corresponding DRM_DEBUG_* macros. But 
I think what was incorrect here is for DPU_DEBUG, we could have used 
DRM_UT_CORE instead of DRM_UT_KMS.

And DRM_DEBUG_DRIVER should have been used instead of DRM_ERROR.

Was this causing the issue of the prints not getting enabled?

> Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 14 ++------------
>   1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> index e2adc937ea63..935ff6fd172c 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
> @@ -31,24 +31,14 @@
>    * @fmt: Pointer to format string
>    */
>   #define DPU_DEBUG(fmt, ...)                                                \
> -	do {                                                               \
> -		if (drm_debug_enabled(DRM_UT_KMS))                         \
> -			DRM_DEBUG(fmt, ##__VA_ARGS__); \
> -		else                                                       \
> -			pr_debug(fmt, ##__VA_ARGS__);                      \
> -	} while (0)
> +	DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
>   
>   /**
>    * DPU_DEBUG_DRIVER - macro for hardware driver logging
>    * @fmt: Pointer to format string
>    */
>   #define DPU_DEBUG_DRIVER(fmt, ...)                                         \
> -	do {                                                               \
> -		if (drm_debug_enabled(DRM_UT_DRIVER))                      \
> -			DRM_ERROR(fmt, ##__VA_ARGS__); \
> -		else                                                       \
> -			pr_debug(fmt, ##__VA_ARGS__);                      \
> -	} while (0)
> +	DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
>   
>   #define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__)
>   #define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)
> 

  reply	other threads:[~2024-07-09 19:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 13:48 [PATCH 0/2] drm/msm/dpu: two fixes targeting 6.11 Dmitry Baryshkov
2024-07-09 13:48 ` [PATCH 1/2] drm/msm/dpu1: don't choke on disabling the writeback connector Dmitry Baryshkov
2024-07-09 18:42   ` Abhinav Kumar
2024-07-09 13:48 ` [PATCH 2/2] drm/msm/dpu: don't play tricks with debug macros Dmitry Baryshkov
2024-07-09 19:38   ` Abhinav Kumar [this message]
2024-07-10  7:40     ` Dmitry Baryshkov
2024-07-11 18:03       ` Abhinav Kumar
2024-07-13 15:38         ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46487222-6818-b0bf-e5cc-2310d62b5fe6@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=architt@codeaurora.org \
    --cc=chandanu@codeaurora.org \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jordan@cosmicpenguin.net \
    --cc=jsanka@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robdclark@gmail.com \
    --cc=ryadav@codeaurora.org \
    --cc=sean@poorly.run \
    --cc=skolluku@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®