summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-05 14:20:40 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-01-05 14:21:48 +0100
commit20258f2353a266f8fe19e7392eb282e58dd87f6a (patch)
tree03dcd9d1d068b4c686e3d97055fae64f0333dd3c /lib
parenteeffa25c0c464dddf49891c3bf8049c9e4ba5555 (diff)
lib/igt_kms: Remove output->valid
None of the tests depend on it any longer, so it's time to kill. :) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c19
-rw-r--r--lib/igt_kms.h1
2 files changed, 8 insertions, 12 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5312f8d8..56e04bb4 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1224,6 +1224,7 @@ static void igt_output_refresh(igt_output_t *output, bool final)
{
igt_display_t *display = output->display;
unsigned long crtc_idx_mask;
+ bool valid;
crtc_idx_mask = output->pending_crtc_idx_mask;
@@ -1233,11 +1234,9 @@ static void igt_output_refresh(igt_output_t *output, bool final)
kmstest_free_connector_config(&output->config);
- output->valid = _kmstest_connector_config(display->drm_fd,
- output->id,
- crtc_idx_mask,
- &output->config,
- output->valid < 0);
+ valid = _kmstest_connector_config(display->drm_fd, output->id,
+ crtc_idx_mask, &output->config,
+ !output->name);
if (!output->name && output->config.connector) {
drmModeConnector *c = output->config.connector;
@@ -1250,7 +1249,7 @@ static void igt_output_refresh(igt_output_t *output, bool final)
igt_atomic_fill_connector_props(display, output,
IGT_NUM_CONNECTOR_PROPS, igt_connector_prop_names);
- if (!output->valid)
+ if (!valid)
return;
if (output->use_override_mode)
@@ -1499,7 +1498,6 @@ void igt_display_init(igt_display_t *display, int drm_fd)
* We don't assign each output a pipe unless
* a pipe is set with igt_output_set_pipe().
*/
- output->valid = -1;
output->pending_crtc_idx_mask = 0;
output->id = resources->connectors[i];
output->display = display;
@@ -1536,8 +1534,7 @@ static void igt_pipe_fini(igt_pipe_t *pipe)
static void igt_output_fini(igt_output_t *output)
{
- if (output->valid > 0)
- kmstest_free_connector_config(&output->config);
+ kmstest_free_connector_config(&output->config);
free(output->name);
}
@@ -2242,7 +2239,7 @@ static int do_display_commit(igt_display_t *display,
igt_pipe_t *pipe_obj = &display->pipes[pipe];
igt_output_t *output = igt_pipe_get_output(pipe_obj);
- if (output && output->valid > 0)
+ if (output)
valid_outs++;
ret = igt_pipe_commit(pipe_obj, s, fail_on_error);
@@ -2442,7 +2439,7 @@ void igt_output_set_pipe(igt_output_t *output, enum pipe pipe)
igt_display_t *display = output->display;
igt_pipe_t *old_pipe;
- igt_assert(output->valid != -1);
+ igt_assert(output->name);
if (output->pending_crtc_idx_mask) {
old_pipe = igt_output_get_driving_pipe(output);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 5234f6c1..fb207655 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -297,7 +297,6 @@ typedef struct {
uint32_t id; /* KMS id */
struct kmstest_connector_config config;
char *name;
- int valid; /* -1 == never probed */
unsigned long pending_crtc_idx_mask;
bool use_override_mode;
drmModeModeInfo override_mode;