summaryrefslogtreecommitdiff
path: root/lib/igt_kms.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-12-04 15:49:30 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2015-12-08 15:23:10 +0200
commit870548b6533318b10c414663ea4ad2af01bab8b9 (patch)
treebe121b4384bca098bee9e7b06a01b9d03c315d81 /lib/igt_kms.c
parentb0f4df31baf3ddda72a276f3b2b03ae8363d0843 (diff)
tests/kms_force_connector_basic: Add prune-stale-modes subtest
Add a new subtest that makes sure old stale modes get pruned from the connector's mode list when the EDID changes. v2: s/drmModeGetConnector/drmModeGetConnectorCurrent/ since kmstest_force_edid() already takes care of doing the heavier call for us (Daniel) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r--lib/igt_kms.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index da49f567..5d5a95c2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -111,6 +111,46 @@ const unsigned char* igt_kms_get_base_edid(void)
return base_edid;
}
+#define VFREQ 60
+#define CLOCK 101000
+#define HACTIVE 1400
+#define HBLANK 160
+#define VACTIVE 1050
+#define VBLANK 30
+#define HOFFSET 48
+#define HPULSE 32
+#define VOFFSET 3
+#define VPULSE 4
+
+#define HSIZE 52
+#define VSIZE 30
+
+#define EDID_NAME alt_edid
+#include "igt_edid_template.h"
+
+/**
+ * igt_kms_get_alt_edid:
+ *
+ * Get an alternate edid block, which includes the following modes:
+ *
+ * - 1400x1050 60Hz
+ * - 1920x1080 60Hz
+ * - 1280x720 60Hz
+ * - 1024x768 60Hz
+ * - 800x600 60Hz
+ * - 640x480 60Hz
+ *
+ * This can be extended with further features using functions such as
+ * #kmstest_edid_add_3d.
+ *
+ * Returns: an alternate edid block
+ */
+const unsigned char* igt_kms_get_alt_edid(void)
+{
+ update_edid_csum(alt_edid);
+
+ return alt_edid;
+}
/**
* SECTION:igt_kms