[PATCH 2/3] modetest: add atomic modeset support

Emil Velikov emil.l.velikov at gmail.com
Tue Sep 1 17:20:49 PDT 2015


On 2 September 2015 at 01:11, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Hi Hyungwon Hwang
>
> On 26 August 2015 at 07:21, Hyungwon Hwang <human.hwang at samsung.com> wrote:
>> This patch adds support for atomic modeset. Using -a option, user can
>> make modeset to use DRM_IOCTL_MODE_ATOMIC instead of legacy IOCTLs.
>> Also, by using -w option, user can set the property as before.
>>
>> Signed-off-by: Hyungwon Hwang <human.hwang at samsung.com>
>> ---
>>  tests/modetest/modetest.c | 221 +++++++++++++++++++++++++++++++++++++++-------
>>  1 file changed, 187 insertions(+), 34 deletions(-)
>>
>> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
>> index b7f6d32..753a559 100644
>> --- a/tests/modetest/modetest.c
>> +++ b/tests/modetest/modetest.c
>> @@ -1444,25 +1444,32 @@ static int parse_property(struct property_arg *p, const char *arg)
>>
>>  static void usage(char *name)
>>  {
>> -       fprintf(stderr, "usage: %s [-cDdefMPpsCvw]\n", name);
>> +       fprintf(stderr, "usage: %s [-acDdefMPpsCvw]\n", name);
>> +       fprintf(stderr, "\tA: supported in atomic modeset\n");
>> +       fprintf(stderr, "\tL: supported in legacy modeset\n");
>>
>> -       fprintf(stderr, "\n Query options:\n\n");
>> +       fprintf(stderr, "\n Query options: [AL]\n\n");
>>         fprintf(stderr, "\t-c\tlist connectors\n");
>>         fprintf(stderr, "\t-e\tlist encoders\n");
>>         fprintf(stderr, "\t-f\tlist framebuffers\n");
>>         fprintf(stderr, "\t-p\tlist CRTCs and planes (pipes)\n");
>>
>> -       fprintf(stderr, "\n Test options:\n\n");
>> +       fprintf(stderr, "\n Common Test options: [AL]\n\n");
>> +       fprintf(stderr, "\t-w <obj_id>:<prop_name>:<value>\tset property\n");
>> +
>> +       fprintf(stderr, "\n Atomic Test options: [A]\n\n");
>> +       fprintf(stderr, "\t-a\tuse atomic modeset\n");
>> +
>> +       fprintf(stderr, "\n Legacy test options: [L]\n\n");
>>         fprintf(stderr, "\t-P <crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]\tset a plane\n");
>>         fprintf(stderr, "\t-s <connector_id>[,<connector_id>][@<crtc_id>]:<mode>[-<vrefresh>][@<format>]\tset a mode\n");
>>         fprintf(stderr, "\t-C\ttest hw cursor\n");
>>         fprintf(stderr, "\t-v\ttest vsynced page flipping\n");
>> -       fprintf(stderr, "\t-w <obj_id>:<prop_name>:<value>\tset property\n");
>>
>>         fprintf(stderr, "\n Generic options:\n\n");
>> -       fprintf(stderr, "\t-d\tdrop master after mode set\n");
>> -       fprintf(stderr, "\t-M module\tuse the given driver\n");
>> -       fprintf(stderr, "\t-D device\tuse the given device\n");
>> +       fprintf(stderr, "\t-d\tdrop master after mode set [L]\n");
>> +       fprintf(stderr, "\t-M module\tuse the given driver [AL]\n");
>> +       fprintf(stderr, "\t-D device\tuse the given device [AL]\n");
>>
> Readability is greatly impaired with this approach. Can I suggest
> splitting these into two sections - legacy and atomic.
>
A bit tired and I've misread the above. Please ignore this comment.

-Emil


More information about the dri-devel mailing list