Commit bbdd620d authored by Wyatt Wood's avatar Wyatt Wood Committed by Alex Deucher
Browse files

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: default avatarWyatt Wood <wyatt.wood@amd.com>
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent cf718049
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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__ */
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ enum dc_log_type {
	LOG_DSC,
#endif
	LOG_DWB,
	LOG_GAMMA_DEBUG,
	LOG_SECTION_TOTAL_COUNT
};

+12 −0
Original line number Diff line number Diff line
@@ -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. */
+1 −0
Original line number Diff line number Diff line
@@ -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);