diff mbox

[i-g-t,5/7] lib/igt_kms: don't store color management properties ids twice

Message ID 1458733090-25768-6-git-send-email-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lionel Landwerlin March 23, 2016, 11:38 a.m. UTC
Now that we load all properties regardless of atomic, the color
management properties ids are redundant.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 lib/igt_kms.c | 22 ++++------------------
 lib/igt_kms.h |  3 ---
 2 files changed, 4 insertions(+), 21 deletions(-)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index c3d389a..e3488f1 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1273,21 +1273,6 @@  void igt_display_init(igt_display_t *display, int drm_fd)
 					  &prop_value,
 					  NULL);
 			pipe->background = (uint32_t)prop_value;
-			get_crtc_property(display->drm_fd, pipe->crtc_id,
-					  "DEGAMMA_LUT",
-					  &pipe->degamma_property,
-					  NULL,
-					  NULL);
-			get_crtc_property(display->drm_fd, pipe->crtc_id,
-					  "CTM",
-					  &pipe->ctm_property,
-					  NULL,
-					  NULL);
-			get_crtc_property(display->drm_fd, pipe->crtc_id,
-					  "GAMMA_LUT",
-					  &pipe->gamma_property,
-					  NULL,
-					  NULL);
 		}
 
 
@@ -1857,11 +1842,12 @@  static int igt_output_commit(igt_output_t *output,
 	}
 
 	if (pipe->color_mgmt_changed) {
-		igt_crtc_set_property(output, pipe->degamma_property,
+		igt_crtc_set_property(output,
+				      pipe->properties[IGT_CRTC_DEGAMMA_LUT],
 				      pipe->degamma_blob);
-		igt_crtc_set_property(output, pipe->ctm_property,
+		igt_crtc_set_property(output, pipe->properties[IGT_CRTC_CTM],
 				      pipe->ctm_blob);
-		igt_crtc_set_property(output, pipe->gamma_property,
+		igt_crtc_set_property(output, pipe->properties[IGT_CRTC_GAMMA_LUT],
 				      pipe->gamma_blob);
 
 		pipe->color_mgmt_changed = false;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 8e8b240..4d3abf6 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -256,11 +256,8 @@  struct igt_pipe {
 	uint32_t background_changed : 1;
 
 	uint64_t degamma_blob;
-	uint32_t degamma_property;
 	uint64_t ctm_blob;
-	uint32_t ctm_property;
 	uint64_t gamma_blob;
-	uint32_t gamma_property;
 	uint32_t color_mgmt_changed : 1;
 
 	uint32_t crtc_id;