summaryrefslogtreecommitdiff
path: root/tests/kms_plane_lowres.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2019-03-29 13:13:22 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2019-04-01 12:42:47 -0700
commit4383f7f7e0932ff652823db0ab8b80acf43a20e5 (patch)
treefe201d7e6bc597769d020af0cc0fd59baa6f4088 /tests/kms_plane_lowres.c
parentd15e00b9b4ebda5bbacdb4eea0af1e80e3da16da (diff)
lib: Share the 1024x768 mode among tests
Three test were duplicating this 1024x768 mode so lets move it to lib and share it. Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tests/kms_plane_lowres.c')
-rw-r--r--tests/kms_plane_lowres.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index f7739b11..51bb7cd8 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -46,23 +46,6 @@ static drmModeModeInfo
get_lowres_mode(int drmfd, igt_output_t *output, drmModeModeInfo *mode_default)
{
drmModeModeInfo mode;
- drmModeModeInfo std_1024_mode = {
- .clock = 65000,
- .hdisplay = 1024,
- .hsync_start = 1048,
- .hsync_end = 1184,
- .htotal = 1344,
- .hskew = 0,
- .vdisplay = 768,
- .vsync_start = 771,
- .vsync_end = 777,
- .vtotal = 806,
- .vscan = 0,
- .vrefresh = 60,
- .flags = 0xA,
- .type = 0x40,
- .name = "Custom 1024x768",
- };
bool found = false;
int limit = mode_default->vdisplay - SIZE;
int j;
@@ -76,7 +59,7 @@ get_lowres_mode(int drmfd, igt_output_t *output, drmModeModeInfo *mode_default)
}
if (!found)
- return std_1024_mode;
+ return *igt_std_1024_mode_get();
return mode;
}