[PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name

Jani Nikula jani.nikula at linux.intel.com
Mon Nov 15 20:17:58 UTC 2021


On Mon, 15 Nov 2021, Claudio Suarez <cssk at net-c.es> wrote:
> On Mon, Nov 15, 2021 at 12:24:26PM +0200, Jani Nikula wrote:
>> On Sun, 14 Nov 2021, Claudio Suarez <cssk at net-c.es> wrote:
>> > On Sat, Nov 13, 2021 at 09:39:46PM +0100, Sam Ravnborg wrote:
>> >> Hi Claudio,
>> >> 
>> >> On Sat, Nov 13, 2021 at 08:27:30PM +0100, Claudio Suarez wrote:
>> >> > The prefered way to log connectors is [CONNECTOR:id:name]. Change it in
>> >> > drm core programs.
>> >> > 
>> >> > Suggested-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> >> > Signed-off-by: Claudio Suarez <cssk at net-c.es>
>> >> 
>> >> While touching all these logging calls, could you convernt them to the
>> >> newer drm_dbg_kms variants?
>> >> DRM_DEBUG_* are all deprecated.
>> >> 
>> >
>> > Yes, I can, but it is recommended to do it in a different patch:
>> >
>> > https://www.kernel.org/doc/html/latest/process/submitting-patches.html#separate-your-changes
>> >
>> > C&P:
>> > "Separate your changes
>> > Separate each logical change into a separate patch.
>> > For example, if your changes include both bug fixes and performance enhancements..."
>> >
>> >
>> > I will study and send a new separate patch with your suggestion.
>> 
>> I feel these logging changes are the types of changes where I'd err on
>> the side of fewer patches than strictly following the above guidelines.
>
> To size the problem:
> - there are about 3434 references to DRM_DEBUG_* in all the drm code, all drivers.
> - there are 413 references to DRM_DEBUG_* in the drm core code, only 66 of
>    them are related to connectors.
> - there are 62 references to DRM_ERR* and 7 references to DRM_INFO in
>    the drm core programs.
>
> I meant I can make two patches:
>  1 - this one with the change to CONNECTOR:id:name (29 changes)
>  2 - a new and bigger patch to change 413 + 62 + 7 references to DRM_{DEBUG,ERR,INFO}
>      in the drm core programs.

The second one is an on-going change that will have to happen gradually,
file by file. Changing connector references while at it seems like a
reasonable drive-by-change to me. (Others may disagree.)

> The second patch will be ready in a few days.
>
> Is it a good plan ? or can it be improved ?

It can't be a single patch. It needs to be split to smaller changes.

BR,
Jani.

>
> Best regards,
> Claudio Suarez.
>
>
>

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the dri-devel mailing list