lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cvizlwetyzmwxwtesd54kgghb4ttnj3kgdnca2ujq6orzntymw@tei6xtsoh3og>
Date: Sat, 13 Jul 2024 18:38:23 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Abhinav Kumar <quic_abhinavk@...cinc.com>
Cc: Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>, 
	Marijn Suijten <marijn.suijten@...ainline.org>, David Airlie <airlied@...il.com>, 
	Daniel Vetter <daniel@...ll.ch>, Jordan Crouse <jordan@...micpenguin.net>, 
	Chandan Uddaraju <chandanu@...eaurora.org>, Rajesh Yadav <ryadav@...eaurora.org>, 
	Sravanthi Kollukuduru <skolluku@...eaurora.org>, Archit Taneja <architt@...eaurora.org>, 
	linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, Jeykumar Sankaran <jsanka@...eaurora.org>
Subject: Re: [PATCH 2/2] drm/msm/dpu: don't play tricks with debug macros

On Thu, Jul 11, 2024 at 11:03:15AM GMT, Abhinav Kumar wrote:
> 
> 
> On 7/10/2024 12:40 AM, Dmitry Baryshkov wrote:
> > On Tue, 9 Jul 2024 at 22:39, Abhinav Kumar <quic_abhinavk@...cinc.com> wrote:
> > > 
> > > 
> > > 
> > > 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_*?
> > 
> > Yes. Drop the driver-specific wrappers where they don't make sense.
> > Use sensible format strings in the cases where it actually does (like
> > VIDENC or _PLANE)
> > 
> 
> Ack but we need to not just drop the wrappers but drop the usage of these
> macros as well because it is documented that they are deprecated.
> 
> So I assume you want to get this in and do that as a follow up change?

Yes, somewhere in the long list of cleanups. I have a similar item
against DP driver, which uses correct macros, 

> > > /* 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.
> > 
> > It pretty much tries to overplay the existing drm debugging mechanism
> > by either sending the messages to the DRM channel or just using
> > pr_debug. With DYNAMIC_DEBUG being disabled pr_debug is just an empty
> > macro, so all the messages can end up in /dev/null. We should not be
> > trying to be too smart, using standard DRM_DEBUG_DRIVER should be
> > enough. This way all driver-related messages are controlled by
> > drm.debug including or excluding the 0x02 bit.
> > 
> > 
> > > 
> > > And DRM_DEBUG_DRIVER should have been used instead of DRM_ERROR.
> > > 
> > > Was this causing the issue of the prints not getting enabled?
> > 
> > I pretty much think so.
> > 
> 
> Alright, I am okay with the approach, just one minor suggestion, to keep the
> behavior intact, previously the code wanted DPU_DEBUG to be controlled by
> DRM_UT_KMS and DPU_DEBUG_DRIVER controlled by DRM_UT_DRIVER.
> 
> Keeping that intact, we need to use DRM_DEBUG_KMS for DPU_DEBUG?

I might make that more explicit: I don't think that it is a good idea
for a generic DPU_DEBUG macro to be tied to DRM_UT_KMS. We are reporting
a debug message from driver, so by default it should go to the
DRM_UT_DRIVER channel. While refactoring things we might end up with
messages going to ATOMIC or KMS, but DRIVER should be the default.

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ