summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-07-13 16:14:55 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2015-07-14 11:35:05 -0300
commit19e4632407cfe9fdfe5e067dfaaeaef4d5bf669f (patch)
tree500365ec8c2cc92413110e17f74d873e801316b8 /tests
parenta7cfd224ba9b2c6735875e27f480b6bbd40ae4d9 (diff)
kms_frontbuffer_tracking: only force std_1024_mode on HSW
Since on BDW the big modes work fine, I want to test them without having to recompile the test every time. Let's make std_1024_mode part of opt.small_modes. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_frontbuffer_tracking.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 24edae9b..2c1d7296 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -275,6 +275,25 @@ struct {
.stop = true,
};
+drmModeModeInfo std_1024_mode = {
+ .clock = 65000,
+ .hdisplay = 1024,
+ .hsync_start = 1048,
+ .hsync_end = 1184,
+ .htotal = 1344,
+ .vtotal = 806,
+ .hskew = 0,
+ .vdisplay = 768,
+ .vsync_start = 771,
+ .vsync_end = 777,
+ .vtotal = 806,
+ .vscan = 0,
+ .vrefresh = 60,
+ .flags = 0xA,
+ .type = 0x40,
+ .name = "Custom 1024x768",
+};
+
static drmModeModeInfoPtr get_connector_smallest_mode(drmModeConnectorPtr c)
{
int i;
@@ -291,6 +310,9 @@ static drmModeModeInfoPtr get_connector_smallest_mode(drmModeConnectorPtr c)
smallest = mode;
}
+ if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
+ smallest = &std_1024_mode;
+
return smallest;
}
@@ -357,25 +379,6 @@ static void init_mode_params(struct modeset_params *params, uint32_t crtc_id,
params->sprite.h = 64;
}
-drmModeModeInfo std_1024_mode = {
- .clock = 65000,
- .hdisplay = 1024,
- .hsync_start = 1048,
- .hsync_end = 1184,
- .htotal = 1344,
- .vtotal = 806,
- .hskew = 0,
- .vdisplay = 768,
- .vsync_start = 771,
- .vsync_end = 777,
- .vtotal = 806,
- .vscan = 0,
- .vrefresh = 60,
- .flags = 0xA,
- .type = 0x40,
- .name = "Custom 1024x768",
-};
-
static bool connector_get_mode(drmModeConnectorPtr c, drmModeModeInfoPtr *mode)
{
*mode = NULL;
@@ -391,10 +394,10 @@ static bool connector_get_mode(drmModeConnectorPtr c, drmModeModeInfoPtr *mode)
else
*mode = &c->modes[0];
- /* Because on some machines we don't have enough stolen memory to fit in
- * those 3k panels. And on HSW the CRC WA is so awful that it makes you
- * think everything is bugged. */
- if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
+ /* On HSW the CRC WA is so awful that it makes you think everything is
+ * bugged. */
+ if (IS_HASWELL(intel_get_drm_devid(drm.fd)) &&
+ c->connector_type == DRM_MODE_CONNECTOR_eDP)
*mode = &std_1024_mode;
return true;