summaryrefslogtreecommitdiff
path: root/tests/kms_color.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-03 09:38:07 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-20 11:43:33 +0200
commitcca28775d231af94a1e823966238ca88f1e2f7fb (patch)
tree204d1ec57c9de37b1cbd8f7d1dfd365175a10818 /tests/kms_color.c
parentc043428f145addc646c802c9a7fe19630a120e1d (diff)
lib/igt_kms: Export property blob functions for output/pipe/plane, v2.
With the replace_prop_blob functions we can safely replace the blob for any property, without having to care about error handling ourselves. This will for example allow overriding color management blobs, or for kms_atomic set invalid mode blobs. The color management blob functions are removed, they can now be replaced by direct calls to replace the properties. Changes since v1: - Fix chamelium tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/kms_color.c')
-rw-r--r--tests/kms_color.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/kms_color.c b/tests/kms_color.c
index bcd48d89..e30e6bf4 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -189,7 +189,7 @@ static void set_degamma(data_t *data,
data->degamma_lut_size,
data->color_depth, 0);
- igt_pipe_set_degamma_lut(pipe, lut, size);
+ igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_DEGAMMA_LUT, lut, size);
free(lut);
}
@@ -204,7 +204,7 @@ static void set_gamma(data_t *data,
data->gamma_lut_size,
data->color_depth, 0);
- igt_pipe_set_gamma_lut(pipe, lut, size);
+ igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, lut, size);
free(lut);
}
@@ -224,12 +224,12 @@ static void set_ctm(igt_pipe_t *pipe, const double *coefficients)
(int64_t) (coefficients[i] * ((int64_t) 1L << 32));
}
- igt_pipe_set_ctm_matrix(pipe, &ctm, sizeof(ctm));
+ igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_CTM, &ctm, sizeof(ctm));
}
-#define disable_degamma(pipe) igt_pipe_set_degamma_lut(pipe, NULL, 0)
-#define disable_gamma(pipe) igt_pipe_set_gamma_lut(pipe, NULL, 0)
-#define disable_ctm(pipe) igt_pipe_set_ctm_matrix(pipe, NULL, 0)
+#define disable_degamma(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0)
+#define disable_gamma(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_GAMMA_LUT, NULL, 0)
+#define disable_ctm(pipe) igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_CTM, NULL, 0)
static void output_set_property_enum(igt_output_t *output,
const char *property,