[igt-dev] [PATCH i-g-t v1 1/3] lib/igt_kms: Add helper to parse mode string
Rohith Iyer
quic_rohiiyer at quicinc.com
Fri Jul 29 17:59:24 UTC 2022
Hi,
I have addressed these changes in the new patch set.
Thanks,
Rohith
On 7/25/2022 10:43 PM, Petri Latvala wrote:
> On Wed, Jul 13, 2022 at 03:22:33PM -0700, Rohith Iyer wrote:
>> Add helper method to parse a mode string from command line
>
>
> In this form the string doesn't have to be from command line at all
> call sites.
>
>
>> , and verify
>> correct number of arguments. This standardizes parsing mode strings.
>>
>> Signed-off-by: Rohith Iyer <quic_rohiiyer at quicinc.com>
>> ---
>> lib/igt_kms.c | 26 ++++++++++++++++++++++++++
>> lib/igt_kms.h | 1 +
>> 2 files changed, 27 insertions(+)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>> index d8867f09..6df6658a 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -5739,3 +5739,29 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
>>
>> return true;
>> }
>> +
>> +/**
>> + * igt_parse_mode_string:
>> + * @mode_string: a pointer to the optarg
>
> With the above said, the parameter is just the modeline string.
>
>> + * @mode: a pointer to a drm mode structure
>> + *
>> + * Parse mode string from command line and populate mode
>> + *
>> + * Format: <clock(MHz)>,<hdisp>,<hsync-start>,<hsync-end>,<htotal>,<vdisp>,<vsync-start>,
>> + * <vsync-end>,<vtotal>
>> + *
>> + * Returns: true if the correct number of arguments are entered, else false.
>> + */
>> +bool igt_parse_mode_string(char *mode_string, drmModeModeInfo *mode)
>
> const char *mode_string
>
>
More information about the igt-dev
mailing list