linux/drivers/gpu/drm/amd/display/include/logger_interface.h

/*
 * Copyright 2012-15 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#ifndef __DAL_LOGGER_INTERFACE_H__
#define __DAL_LOGGER_INTERFACE_H__

#include "logger_types.h"

struct dc_context;
struct dc_link;
struct dc_surface_update;
struct resource_context;
struct dc_state;

/*
 *
 * DAL logger functionality
 *
 */

void pre_surface_trace(
		struct dc *dc,
		const struct dc_plane_state *const *plane_states,
		int surface_count);

void update_surface_trace(
		struct dc *dc,
		const struct dc_surface_update *updates,
		int surface_count);

void post_surface_trace(struct dc *dc);

void context_timing_trace(
		struct dc *dc,
		struct resource_context *res_ctx);

void context_clock_trace(
		struct dc *dc,
		struct dc_state *context);

/* Any function which is empty or have incomplete implementation should be
 * marked by this macro.
 * Note that the message will be printed exactly once for every function
 * it is used in order to avoid repeating of the same message. */

#define DAL_LOGGER_NOT_IMPL(fmt, ...)

/******************************************************************************
 * Convenience macros to save on typing.
 *****************************************************************************/

#define DC_ERROR(...)

#define DC_SYNC_INFO(...)

/* Connectivity log format:
 * [time stamp]   [drm] [Major_minor] [connector name] message.....
 * eg:
 * [   26.590965] [drm] [Conn_LKTN]	  [DP-1] HBRx4 pass VS=0, PE=0^
 * [   26.881060] [drm] [Conn_Mode]	  [DP-1] {2560x1080, 2784x1111@185580Khz}^
 */

#define CONN_DATA_DETECT(link, hex_data, hex_len, ...)

#define CONN_DATA_LINK_LOSS(link, hex_data, hex_len, ...)

#define CONN_MSG_LT(link, ...)

#define CONN_MSG_MODE(link, ...)

/*
 * Display Test Next logging
 */
#define DTN_INFO_BEGIN()

#define DTN_INFO(msg, ...)

#define DTN_INFO_END()

#define PERFORMANCE_TRACE_START()

#define PERFORMANCE_TRACE_END()

#define DISPLAY_STATS_BEGIN(entry)

#define DISPLAY_STATS(msg, ...)

#define DISPLAY_STATS_END(entry)

#define LOG_GAMMA_WRITE(msg, ...)

#endif /* __DAL_LOGGER_INTERFACE_H__ */