[Intel-gfx] [PATCH i-g-t 5/6] lib/igt_kms: don't store color management properties ids twice

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu May 12 12:58:11 UTC 2016


Now that we load all properties regardless of atomic, the color
management properties ids are redundant.

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

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 003a9dd..85755b9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1340,21 +1340,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);
 		}
 
 
@@ -1924,11 +1909,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 a4633cd..25fa3de 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -270,11 +270,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;
-- 
2.8.1



More information about the Intel-gfx mailing list