]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amd/display: Add Logging for Gamma Related information (1/2)
authorWyatt Wood <wyatt.wood@amd.com>
Wed, 24 Jul 2019 17:29:38 +0000 (13:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Aug 2019 15:55:55 +0000 (10:55 -0500)
[Why]
A recent bug showed that logging would be useful in
debugging various gamma issues.

[How]
Add new log types and logging code to the color module.

Signed-off-by: Wyatt Wood <wyatt.wood@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/include/logger_interface.h
drivers/gpu/drm/amd/display/include/logger_types.h
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
drivers/gpu/drm/amd/display/modules/color/color_gamma.h

index a0b68c266dabe27b4b5af3d5130fc5f294c631e9..6e008de25629be9cf18432b7728969c0ce5ce963 100644 (file)
@@ -155,4 +155,6 @@ void context_clock_trace(
 
 #define DISPLAY_STATS_END(entry) (void)(entry)
 
+#define LOG_GAMMA_WRITE(msg, ...)
+
 #endif /* __DAL_LOGGER_INTERFACE_H__ */
index ea8d445816b85515fabe6943ca8e336d53572455..81650ee40f0bd27661f04c83305602f92dc59046 100644 (file)
@@ -117,6 +117,7 @@ enum dc_log_type {
        LOG_DSC,
 #endif
        LOG_DWB,
+       LOG_GAMMA_DEBUG,
        LOG_SECTION_TOTAL_COUNT
 };
 
index 6f853f2519d94225aee4979cb1b4282ce2ce26f5..34745f8755824f30e98333a09f2d0a427a5d7cf0 100644 (file)
@@ -97,6 +97,18 @@ void setup_x_points_distribution(void)
        }
 }
 
+void log_x_points_distribution(struct dal_logger *logger)
+{
+       int i = 0;
+
+       if (logger != NULL) {
+               LOG_GAMMA_WRITE("]Log X Distribution\n");
+
+               for (i = 0; i < MAX_HW_POINTS; i++)
+                       LOG_GAMMA_WRITE("]%llu\n", coordinates_x[i].x.value);
+       }
+}
+
 static void compute_pq(struct fixed31_32 in_x, struct fixed31_32 *out_y)
 {
        /* consts for PQ gamma formula. */
index 69cecd2ec25197392d3abd68571bbeeb7e5596bc..44ddea58523a8008216e10437a08ddedef5e36c8 100644 (file)
@@ -92,6 +92,7 @@ struct translate_from_linear_space_args {
 };
 
 void setup_x_points_distribution(void);
+void log_x_points_distribution(struct dal_logger *logger);
 void precompute_pq(void);
 void precompute_de_pq(void);