[i-g-t] lib/igt_kms: Format cleanup in DRM mode printing

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Tue Jun 25 03:39:59 UTC 2024


On 24-06-2024 11:30 pm, B, Jeevan wrote:
> 
> 
>> -----Original Message-----
>> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of
>> Bhanuprakash Modem
>> Sent: Monday, June 24, 2024 8:40 PM
>> To: igt-dev at lists.freedesktop.org
>> Cc: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
>> Subject: [i-g-t] lib/igt_kms: Format cleanup in DRM mode printing
>>
>> While printing the DRM mode, align the style with the Kernel logs, so that it would
>> be easy to compare & debug.
>>
>> Example:
>>   Old:- 2880x1800 60 2880 2928 2960 3040 1800 1803 1809 1906 0xa 0x48
>> 347710
>>   New:- "2880x1800": 60 347710 2880 2928 2960 3040 1800 1803 1809 1906
>> 0x48 0xa
>>
> 2880x1800 : Is better than using " I think.

Sure, I just adopted whatever the style used in Kernel logs.

- Bhanu

> 
> BR
> Jeevan B
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>> ---
>>   lib/igt_kms.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 2e6f44e3c..1c096ec5b 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -1144,13 +1144,13 @@ void kmstest_dump_mode(drmModeModeInfo
>> *mode)
>>   	const char *stereo = mode_stereo_name(mode);
>>   	const char *aspect = mode_picture_aspect_name(mode);
>>
>> -	igt_info("  %s %d %d %d %d %d %d %d %d %d 0x%x 0x%x
>> %d%s%s%s%s%s%s\n",
>> -		 mode->name, mode->vrefresh,
>> +	igt_info("  \"%s\": %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x
>> %s%s%s%s%s%s\n",
>> +		 mode->name, mode->vrefresh, mode->clock,
>>   		 mode->hdisplay, mode->hsync_start,
>>   		 mode->hsync_end, mode->htotal,
>>   		 mode->vdisplay, mode->vsync_start,
>>   		 mode->vsync_end, mode->vtotal,
>> -		 mode->flags, mode->type, mode->clock,
>> +		 mode->type, mode->flags,
>>   		 stereo ? " (3D:" : "",
>>   		 stereo ? stereo : "", stereo ? ")" : "",
>>   		 aspect ? " (PAR:" : "",
>> --
>> 2.43.2
> 


More information about the igt-dev mailing list