diff mbox series

[6/7] drm/i915: prettify MST debug message

Message ID 20191011010907.103309-7-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series Small fixes before fixing MST | expand

Commit Message

Lucas De Marchi Oct. 11, 2019, 1:09 a.m. UTC
s/?/:/ so it's get correctly colored by dmesg.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä Oct. 11, 2019, 12:08 p.m. UTC | #1
On Thu, Oct 10, 2019 at 06:09:06PM -0700, Lucas De Marchi wrote:
> s/?/:/ so it's get correctly colored by dmesg.

What do you mean correctly?

The debug message was asking the question "(is) MST supported?"
After this it just declares that MST is not supported. I guess no real
difference so I could live with either one.

The only thing that slightly bothers me with the ':' is that the
port/sink/modparam also use it, but in a slightly different way
so the "MST supported:" ':' looks a bit naked.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 348a09890611..33a55da89ce9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4450,7 +4450,7 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)
>  		&dp_to_dig_port(intel_dp)->base;
>  	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
>  
> -	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
> +	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
>  		      encoder->base.base.id, encoder->base.name,
>  		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
>  		      yesno(i915_modparams.enable_dp_mst));
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Lucas De Marchi Oct. 11, 2019, 5:08 p.m. UTC | #2
On Fri, Oct 11, 2019 at 03:08:50PM +0300, Ville Syrjälä wrote:
>On Thu, Oct 10, 2019 at 06:09:06PM -0700, Lucas De Marchi wrote:
>> s/?/:/ so it's get correctly colored by dmesg.
>
>What do you mean correctly?
>
>The debug message was asking the question "(is) MST supported?"
>After this it just declares that MST is not supported. I guess no real
>difference so I could live with either one.
>
>The only thing that slightly bothers me with the ':' is that the
>port/sink/modparam also use it, but in a slightly different way
>so the "MST supported:" ':' looks a bit naked.

What I mean is that dmesg uses the first ":" after [] to colorize.

Before:
*[ENCODER:xx:yyy] MST support? port:* yes, sink: yes, modparam: yes

After:
*[ENCODER:xx:yyy] MST support:* port: yes, sink: yes, modparam: yes

Not really important, just makes more sense IMO.

Lucas De Marchi

>
>Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index 348a09890611..33a55da89ce9 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -4450,7 +4450,7 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)
>>  		&dp_to_dig_port(intel_dp)->base;
>>  	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
>>
>> -	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
>> +	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
>>  		      encoder->base.base.id, encoder->base.name,
>>  		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
>>  		      yesno(i915_modparams.enable_dp_mst));
>> --
>> 2.23.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>-- 
>Ville Syrjälä
>Intel
Ville Syrjälä Oct. 11, 2019, 5:14 p.m. UTC | #3
On Fri, Oct 11, 2019 at 10:08:32AM -0700, Lucas De Marchi wrote:
> On Fri, Oct 11, 2019 at 03:08:50PM +0300, Ville Syrjälä wrote:
> >On Thu, Oct 10, 2019 at 06:09:06PM -0700, Lucas De Marchi wrote:
> >> s/?/:/ so it's get correctly colored by dmesg.
> >
> >What do you mean correctly?
> >
> >The debug message was asking the question "(is) MST supported?"
> >After this it just declares that MST is not supported. I guess no real
> >difference so I could live with either one.
> >
> >The only thing that slightly bothers me with the ':' is that the
> >port/sink/modparam also use it, but in a slightly different way
> >so the "MST supported:" ':' looks a bit naked.
> 
> What I mean is that dmesg uses the first ":" after [] to colorize.
> 
> Before:
> *[ENCODER:xx:yyy] MST support? port:* yes, sink: yes, modparam: yes
> 
> After:
> *[ENCODER:xx:yyy] MST support:* port: yes, sink: yes, modparam: yes

Ah, I guess I so routinely pipe it to a file/less that haven't really
noticed :)

> 
> Not really important, just makes more sense IMO.

You've convinced me.

> 
> Lucas De Marchi
> 
> >
> >Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >>
> >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> >> index 348a09890611..33a55da89ce9 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> >> @@ -4450,7 +4450,7 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)
> >>  		&dp_to_dig_port(intel_dp)->base;
> >>  	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
> >>
> >> -	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
> >> +	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
> >>  		      encoder->base.base.id, encoder->base.name,
> >>  		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
> >>  		      yesno(i915_modparams.enable_dp_mst));
> >> --
> >> 2.23.0
> >>
> >> _______________________________________________
> >> Intel-gfx mailing list
> >> Intel-gfx@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> >-- 
> >Ville Syrjälä
> >Intel
Lucas De Marchi Oct. 11, 2019, 5:22 p.m. UTC | #4
On Fri, Oct 11, 2019 at 08:14:32PM +0300, Ville Syrjälä wrote:
>On Fri, Oct 11, 2019 at 10:08:32AM -0700, Lucas De Marchi wrote:
>> On Fri, Oct 11, 2019 at 03:08:50PM +0300, Ville Syrjälä wrote:
>> >On Thu, Oct 10, 2019 at 06:09:06PM -0700, Lucas De Marchi wrote:
>> >> s/?/:/ so it's get correctly colored by dmesg.
>> >
>> >What do you mean correctly?
>> >
>> >The debug message was asking the question "(is) MST supported?"
>> >After this it just declares that MST is not supported. I guess no real
>> >difference so I could live with either one.
>> >
>> >The only thing that slightly bothers me with the ':' is that the
>> >port/sink/modparam also use it, but in a slightly different way
>> >so the "MST supported:" ':' looks a bit naked.
>>
>> What I mean is that dmesg uses the first ":" after [] to colorize.
>>
>> Before:
>> *[ENCODER:xx:yyy] MST support? port:* yes, sink: yes, modparam: yes
>>
>> After:
>> *[ENCODER:xx:yyy] MST support:* port: yes, sink: yes, modparam: yes
>
>Ah, I guess I so routinely pipe it to a file/less that haven't really
>noticed :)

I also do this, but I don't give up the  colors. I use:

dmesg --color=always > test.log

On my computer dmesg is actually a alias to "dmesg --color=always"

And then:

less -R test.log

:)

Lucas De Marchi

>
>>
>> Not really important, just makes more sense IMO.
>
>You've convinced me.
>
>>
>> Lucas De Marchi
>>
>> >
>> >Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> >
>> >>
>> >> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> >> ---
>> >>  drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> >> index 348a09890611..33a55da89ce9 100644
>> >> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> >> @@ -4450,7 +4450,7 @@ intel_dp_configure_mst(struct intel_dp *intel_dp)
>> >>  		&dp_to_dig_port(intel_dp)->base;
>> >>  	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
>> >>
>> >> -	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
>> >> +	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
>> >>  		      encoder->base.base.id, encoder->base.name,
>> >>  		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
>> >>  		      yesno(i915_modparams.enable_dp_mst));
>> >> --
>> >> 2.23.0
>> >>
>> >> _______________________________________________
>> >> Intel-gfx mailing list
>> >> Intel-gfx@lists.freedesktop.org
>> >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>> >
>> >--
>> >Ville Syrjälä
>> >Intel
>
>-- 
>Ville Syrjälä
>Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 348a09890611..33a55da89ce9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4450,7 +4450,7 @@  intel_dp_configure_mst(struct intel_dp *intel_dp)
 		&dp_to_dig_port(intel_dp)->base;
 	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
 
-	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support? port: %s, sink: %s, modparam: %s\n",
+	DRM_DEBUG_KMS("[ENCODER:%d:%s] MST support: port: %s, sink: %s, modparam: %s\n",
 		      encoder->base.base.id, encoder->base.name,
 		      yesno(intel_dp->can_mst), yesno(sink_can_mst),
 		      yesno(i915_modparams.enable_dp_mst));