platform: dce: Add support for debug level logs

Add support to print debug level dce logs.
This is to reduce the number of prints spew by dce in kernel logs.

Bug 3472984

Change-Id: Idaf0dbb3511ee92a632bb0be8c445212e228f8d5
Signed-off-by: Mahesh Kumar <mahkumar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2692698
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Mahesh Kumar
2022-04-05 11:57:24 +00:00
committed by Laxman Dewangan
parent 183b03657c
commit 4b609b3dd4
2 changed files with 17 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -20,6 +20,7 @@ enum dce_log_type {
DCE_ERROR,
DCE_WARNING,
DCE_INFO,
DCE_DEBUG,
};
/*
@@ -66,4 +67,16 @@ void dce_log_msg(struct tegra_dce *d, const char *func_name, int line,
#define dce_info(d, fmt, arg...) \
dce_log_msg(d, __func__, __LINE__, DCE_INFO, fmt, ##arg)
/**
* dce_debug - Print a debug message
*
* @d - Pointer to tegra_dce.
* @fmt - A format string (printf style).
* @arg... - Arguments for the format string.
*
* print a debug message.
*/
#define dce_debug(d, fmt, arg...) \
dce_log_msg(d, __func__, __LINE__, DCE_DEBUG, fmt, ##arg)
#endif