]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: Add DC build_id to determine build type
authorJun Lei <Jun.Lei@amd.com>
Thu, 13 Sep 2018 13:32:26 +0000 (09:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:01:25 +0000 (17:01 -0500)
[why]
Sometimes there are indications that the incorrect driver is being
loaded in automated tests. This change adds the ability for builds to
be tagged with a string, and picked up by the test infrastructure.

[how]
dc.c will allocate const for build id, which is init-ed with default
value, indicating production build. For test builds, build server will
find/replace this value. The test machine will then verify this value.

Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h

index 76fe5a9af3bf7c6cef641901e0f0e35af36afefe..99ecaeb4bdd879863908bdc7c9e888ea5271c7f2 100644 (file)
@@ -60,6 +60,7 @@
 #define DC_LOGGER \
        dc->ctx->logger
 
+const static char DC_BUILD_ID[] = "production-build";
 
 /*******************************************************************************
  * Private functions
@@ -758,6 +759,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)
 
        dc->config = init_params->flags;
 
+       dc->build_id = DC_BUILD_ID;
+
        DC_LOG_DC("Display Core initialized\n");
 
 
index 11ea2a22695273d804448f8816d62ecc4eba0af3..5f65beacd8473d648b9f5e620bfc77a4c7e9d4a2 100644 (file)
@@ -315,6 +315,8 @@ struct dc {
        struct compressor *fbc_compressor;
 
        struct dc_debug_data debug_data;
+
+       const char *build_id;
 };
 
 enum frame_buffer_mode {