From c62cf67a6fe4ffcef0bcbdccd6607428b78e676b Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 22 Aug 2013 11:53:09 -0300 Subject: [PATCH] tests/pc8: don't work around the eDP I2C bug On the current Kernels, i2c operations on disabled eDP panels don't work because we don't enable the panel before doing the i2c transactions. Whenever we try these transactions we print an error message on dmesg and fail. The current test suite was trying to work around this problem: we count how many eDP outputs we have and add them to the final result. Daniel asked me to not work around the bug, so now the i2c test will fail until we actually fix the Kernel bug (or stop using eDP panels). Signed-off-by: Paulo Zanoni --- tests/pc8.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tests/pc8.c b/tests/pc8.c index 9e57e749..e2fed8a1 100644 --- a/tests/pc8.c +++ b/tests/pc8.c @@ -517,17 +517,6 @@ static int count_drm_valid_edids(struct mode_set_data *data) return ret; } -static int count_drm_edp_outputs(struct mode_set_data *data) -{ - int i, ret = 0; - - for (i = 0; i < data->res->count_connectors; i++) - if (data->connectors[i]->connector_type == - DRM_MODE_CONNECTOR_eDP) - ret++; - return ret; -} - static bool i2c_edid_is_valid(int fd) { int rc; @@ -581,16 +570,12 @@ static int count_i2c_valid_edids(void) return ret; } -/* We run this test when all outputs are turned off. When eDP panels are turned - * off, I2C doesn't work on them and we get a nice dmesg backtrace. So count how - * many eDP panels we have and subtract them. */ static bool test_i2c(struct mode_set_data *data) { int i2c_edids = count_i2c_valid_edids(); int drm_edids = count_drm_valid_edids(data); - int edps = count_drm_edp_outputs(data); - return i2c_edids + edps == drm_edids; + return i2c_edids == drm_edids; } static bool setup_environment(void)