On Thu, 27 Jun 2019 at 22:37, John Stultz <john.stultz@xxxxxxxxxx> wrote: > > Often there are many similar modes, which cannot be selected > via modetest due to its simple string matching. > > This change adds a mode index in the display output, which can > then be used to specify a specific modeline to be set. > > Cc: Ilia Mirkin <imirkin@xxxxxxxxxxxx> > Cc: Rob Clark <robdclark@xxxxxxxxxxxx> > Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> > Cc: Sumit Semwal <sumit.semwal@xxxxxxxxxx> > Reviewed-by: Ilia Mirkin <imirkin@xxxxxxxxxxxx> > Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx> > --- > v2: Reworked mode_str check per Ilia's suggestion > v3: Added index < 0 check per Ilia's suggestion > --- > tests/modetest/modetest.c | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > > diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c > index 9c85c07b..5e1b623a 100644 > --- a/tests/modetest/modetest.c > +++ b/tests/modetest/modetest.c > @@ -204,9 +204,10 @@ static void dump_encoders(struct device *dev) > printf("\n"); > } > > -static void dump_mode(drmModeModeInfo *mode) > +static void dump_mode(drmModeModeInfo *mode, int index) > { > - printf(" %s %d %d %d %d %d %d %d %d %d %d", > + printf(" #%i %s %d %d %d %d %d %d %d %d %d %d", > + index, > mode->name, > mode->vrefresh, > mode->hdisplay, Thanks John. Resolved a minor conflict in the above hunk and pushed to master. Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel