[PATCH 3/9] cms-helper/static: Add "identity" builtin cms profile

Mario Kleiner mario.kleiner.de at gmail.com
Sun May 3 22:47:03 PDT 2015


Allows to force loading an identity gamma table if
option icc_profile=identity is given in weston.ini for
an output.

Some special display output devices, e.g., for
neuro-science applications, and special display
testing hardware need a guaranteed perfect pixel
passthrough from framebuffer to output. This is
an easy way to set this up for cms-static.

Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
---
 src/cms-helper.c | 1 +
 src/cms-static.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cms-helper.c b/src/cms-helper.c
index b586847..565b7d7 100644
--- a/src/cms-helper.c
+++ b/src/cms-helper.c
@@ -48,6 +48,7 @@ weston_cms_gamma_clear(struct weston_output *o)
 		red[i] = (uint32_t) 0xffff * (uint32_t) i / (uint32_t) (o->gamma_size - 1);
 	o->set_gamma(o, o->gamma_size, red, red, red);
 	free(red);
+	weston_log("Gamma tables set to identity mapping for output %s\n", o->name);
 }
 #endif
 
diff --git a/src/cms-static.c b/src/cms-static.c
index ad54fd1..21856fe 100644
--- a/src/cms-static.c
+++ b/src/cms-static.c
@@ -52,7 +52,7 @@ cms_output_created(struct cms_static *cms, struct weston_output *o)
 	if (weston_config_section_get_string(s, "icc_profile", &profile, NULL) < 0)
 		return;
 	p = weston_cms_load_profile(profile);
-	if (p == NULL) {
+	if (p == NULL && strcmp(profile, "identity")) {
 		weston_log("cms-static: failed to load %s\n", profile);
 	} else {
 		weston_log("cms-static: loading %s for %s\n",
-- 
1.9.1



More information about the wayland-devel mailing list