On Thu, 27 Jun 2019 at 22:37, John Stultz <[email protected]> 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 <[email protected]> > Cc: Rob Clark <[email protected]> > Cc: Bjorn Andersson <[email protected]> > Cc: Sumit Semwal <[email protected]> > Reviewed-by: Ilia Mirkin <[email protected]> > Signed-off-by: John Stultz <[email protected]> > --- > 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
