summaryrefslogtreecommitdiff
path: root/tests/pm_rpm.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2015-02-27 15:05:39 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2015-02-27 16:45:04 -0300
commitf26d8a04c3938845d4db07cf6587b29e287dc2dc (patch)
treeb5ff8bc2b768ddc6bd17c3b6248f81c0f8268854 /tests/pm_rpm.c
parentf45698df8b6b4d9375acc8e668fc54f81250fd2f (diff)
tests/pm_rpm: I2C VGA detection is unreliable
We fail to detect some VGA monitors using our I2C method, leading to bug reports from QA. If you look at the dmesg of these cases, you'll see the Kernel complaining about EDID reading mostly FFs and then disabling bit-mangling. Since we don't want to reimplement everything the Kernel does, let's just accept the fact that some VGA outputs won't be properly detected. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84273 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/pm_rpm.c')
-rw-r--r--tests/pm_rpm.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index c2847d01..db8f4277 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -636,12 +636,35 @@ static int count_i2c_valid_edids(void)
return ret;
}
+static int count_vga_outputs(struct mode_set_data *data)
+{
+ int i, count = 0;
+
+ for (i = 0; i < data->res->count_connectors; i++)
+ if (data->connectors[i]->connector_type ==
+ DRM_MODE_CONNECTOR_VGA)
+ count++;
+
+ return count;
+}
+
static void test_i2c(struct mode_set_data *data)
{
int i2c_edids = count_i2c_valid_edids();
int drm_edids = count_drm_valid_edids(data);
-
- igt_assert_eq(i2c_edids, drm_edids);
+ int vga_outputs = count_vga_outputs(data);
+ int diff;
+
+ igt_debug("i2c edids:%d drm edids:%d vga outputs:%d\n",
+ i2c_edids, drm_edids, vga_outputs);
+
+ /* We fail to detect some VGA monitors using our i2c method. If you look
+ * at the dmesg of these cases, you'll see the Kernel complaining about
+ * the EDID reading mostly FFs and then disabling bit-banging. Since we
+ * don't want to reimplement everything the Kernel does, let's just
+ * accept the fact that some VGA outputs won't be properly detected. */
+ diff = drm_edids - i2c_edids;
+ igt_assert(diff <= vga_outputs && diff >= 0);
}
static void setup_pc8(void)