drm/i915/dp: make link rate printing prettier
diff mbox

Message ID 1431954105-24729-1-git-send-email-jani.nikula@intel.com
State New
Headers show

Commit Message

Jani Nikula May 18, 2015, 1:01 p.m. UTC
Turn

    [drm:intel_dp_print_rates] source rates: 162000,270000,540000,
    [drm:intel_dp_print_rates] sink rates: 162000,270000,
    [drm:intel_dp_print_rates] common rates: 162000,270000,

into

    [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000
    [drm:intel_dp_print_rates] sink rates: 162000, 270000
    [drm:intel_dp_print_rates] common rates: 162000, 270000

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lespiau, Damien May 18, 2015, 1:10 p.m. UTC | #1
On Mon, May 18, 2015 at 04:01:45PM +0300, Jani Nikula wrote:
> Turn
> 
>     [drm:intel_dp_print_rates] source rates: 162000,270000,540000,
>     [drm:intel_dp_print_rates] sink rates: 162000,270000,
>     [drm:intel_dp_print_rates] common rates: 162000,270000,
> 
> into
> 
>     [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000
>     [drm:intel_dp_print_rates] sink rates: 162000, 270000
>     [drm:intel_dp_print_rates] common rates: 162000, 270000
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
David Weinehall May 19, 2015, 9:52 a.m. UTC | #2
On Mon, May 18, 2015 at 04:01:45PM +0300, Jani Nikula wrote:
> Turn
> 
>     [drm:intel_dp_print_rates] source rates: 162000,270000,540000,
>     [drm:intel_dp_print_rates] sink rates: 162000,270000,
>     [drm:intel_dp_print_rates] common rates: 162000,270000,
> 
> into
> 
>     [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000
>     [drm:intel_dp_print_rates] sink rates: 162000, 270000
>     [drm:intel_dp_print_rates] common rates: 162000, 270000

Wouldn't aligning the sink rates with the other two rates look nicer
(either by right-aligning the entire text, or by just right-aligning
the colon?

Admittedly this is just bikeshedding, but...


Kind regards, David
Shuang He May 19, 2015, 3:30 p.m. UTC | #3
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6427
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  234/234              234/234
ILK                                  262/262              262/262
SNB                 -1              282/282              281/282
IVB                                  300/300              300/300
BYT                                  254/254              254/254
BDW                 -1              275/275              274/275
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 SNB  igt@pm_rpm@dpms-mode-unset-non-lpsp      DMESG_WARN(6)PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
*BDW  igt@gem_flink@basic      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#assert_plane[i915]()@WARNING:.* at .* assert_plane
assertion_failure@assertion failure
WARNING:at_drivers/gpu/drm/drm_irq.c:#drm_wait_one_vblank[drm]()@WARNING:.* at .* drm_wait_one_vblank+0x
Note: You need to pay more attention to line start with '*'
Jani Nikula May 20, 2015, 6:56 a.m. UTC | #4
On Tue, 19 May 2015, David Weinehall <david.weinehall@linux.intel.com> wrote:
> On Mon, May 18, 2015 at 04:01:45PM +0300, Jani Nikula wrote:
>> Turn
>> 
>>     [drm:intel_dp_print_rates] source rates: 162000,270000,540000,
>>     [drm:intel_dp_print_rates] sink rates: 162000,270000,
>>     [drm:intel_dp_print_rates] common rates: 162000,270000,
>> 
>> into
>> 
>>     [drm:intel_dp_print_rates] source rates: 162000, 270000, 540000
>>     [drm:intel_dp_print_rates] sink rates: 162000, 270000
>>     [drm:intel_dp_print_rates] common rates: 162000, 270000
>
> Wouldn't aligning the sink rates with the other two rates look nicer
> (either by right-aligning the entire text, or by just right-aligning
> the colon?
>
> Admittedly this is just bikeshedding, but...

And clearly a separate patch, which is most welcome! ;)

BR,
Jani.


>
>
> Kind regards, David

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f99cca80867c..6e9f14ef2d2d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1269,7 +1269,7 @@  static void snprintf_int_array(char *str, size_t len,
 	str[0] = '\0';
 
 	for (i = 0; i < nelem; i++) {
-		int r = snprintf(str, len, "%d,", array[i]);
+		int r = snprintf(str, len, "%s%d", i ? ", " : "", array[i]);
 		if (r >= len)
 			return;
 		str += r;