Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Add Logging for Gamma Related information (1/2)

[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>

authored by

Wyatt Wood and committed by
Alex Deucher
bbdd620d cf718049

+16
+2
drivers/gpu/drm/amd/display/include/logger_interface.h
··· 155 155 156 156 #define DISPLAY_STATS_END(entry) (void)(entry) 157 157 158 + #define LOG_GAMMA_WRITE(msg, ...) 159 + 158 160 #endif /* __DAL_LOGGER_INTERFACE_H__ */
+1
drivers/gpu/drm/amd/display/include/logger_types.h
··· 117 117 LOG_DSC, 118 118 #endif 119 119 LOG_DWB, 120 + LOG_GAMMA_DEBUG, 120 121 LOG_SECTION_TOTAL_COUNT 121 122 }; 122 123
+12
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
··· 97 97 } 98 98 } 99 99 100 + void log_x_points_distribution(struct dal_logger *logger) 101 + { 102 + int i = 0; 103 + 104 + if (logger != NULL) { 105 + LOG_GAMMA_WRITE("]Log X Distribution\n"); 106 + 107 + for (i = 0; i < MAX_HW_POINTS; i++) 108 + LOG_GAMMA_WRITE("]%llu\n", coordinates_x[i].x.value); 109 + } 110 + } 111 + 100 112 static void compute_pq(struct fixed31_32 in_x, struct fixed31_32 *out_y) 101 113 { 102 114 /* consts for PQ gamma formula. */
+1
drivers/gpu/drm/amd/display/modules/color/color_gamma.h
··· 92 92 }; 93 93 94 94 void setup_x_points_distribution(void); 95 + void log_x_points_distribution(struct dal_logger *logger); 95 96 void precompute_pq(void); 96 97 void precompute_de_pq(void); 97 98