OSDN Git Service

modetest: Add a new "-r" option to set a default mode
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 22 Jul 2019 16:08:23 +0000 (13:08 -0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 19 May 2020 20:09:35 +0000 (21:09 +0100)
commitbf602a2d6794878a5ef3676254d33ba018c6f2a7
tree6bebea06c1520618bd3fe73a2b2cec5ed574a1c2
parenta04c8abb86362e39a5a74caddf923356dec8d61f
modetest: Add a new "-r" option to set a default mode

This option finds all connected connector and then sets its preferred
mode on it. If no preferred mode is available, first mode is used.

This option must be set w/o any mode or plane.

This allows for a quick test on all connected outputs.

Loosely based on the work by Ezequiel Garcia <ezequiel@collabora.com>

Changes since Ezequiel's work:
 - implement atomic codepath
 - set all connectors
 - pick correct crtc
 - don't set -r by default
 - nearly identical output in atomic and non-atomic codepaths

v2:
 - Use the crtc->crtc_id, instead of the plane's current crtc_id

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
tests/modetest/modetest.c