aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch')
-rw-r--r--common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch b/common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch
new file mode 100644
index 00000000..ec6b5405
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0672-drm-amd-dal-disable-BM-calcs-log-by-default.patch
@@ -0,0 +1,64 @@
+From df17e72a8d5ff3f1d576e7cdd74bbf92b2c3ba64 Mon Sep 17 00:00:00 2001
+From: Mykola Lysenko <Mykola.Lysenko@amd.com>
+Date: Thu, 7 Jan 2016 16:11:42 +0800
+Subject: [PATCH 0672/1110] drm/amd/dal: disable BM calcs log by default
+
+It is only related to verbose output, not for
+errors.
+
+Also, do not output anything in case logger
+buffer is empty. This will remove empty DRM
+output case nothing was added to buffer
+after dal_logger_open.
+
+This could happen in case dal_logger_close was
+called just after dal_logger_open, or when log
+major/minor disabled
+
+Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
+Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
+---
+ drivers/gpu/drm/amd/dal/dc/basics/logger.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/basics/logger.c b/drivers/gpu/drm/amd/dal/dc/basics/logger.c
+index b2bf14f..9c2a889 100644
+--- a/drivers/gpu/drm/amd/dal/dc/basics/logger.c
++++ b/drivers/gpu/drm/amd/dal/dc/basics/logger.c
+@@ -241,9 +241,7 @@ struct log_major_mask_info {
+
+ #define LG_SYNC_MSK (1 << LOG_MINOR_SYNC_TIMING)
+
+-#define LG_BWM_MSK (1 << LOG_MINOR_BWM_MODE_VALIDATION) | \
+- (1 << LOG_MINOR_BWM_REQUIRED_BANDWIDTH_CALCS)
+-
++#define LG_BWM_MSK (1 << LOG_MINOR_BWM_MODE_VALIDATION)
+
+ static const struct log_major_mask_info log_major_mask_info_tbl[] = {
+ /* LogMajor major name default MinorTble tblElementCnt */
+@@ -402,13 +400,15 @@ static void log_to_debug_console(struct log_entry *entry)
+ if (logger->flags.bits.ENABLE_CONSOLE == 0)
+ return;
+
+- switch (entry->major) {
+- case LOG_MAJOR_ERROR:
+- dal_error("%s", entry->buf);
+- break;
+- default:
+- dal_output_to_console("%s", entry->buf);
+- break;
++ if (entry->buf_offset) {
++ switch (entry->major) {
++ case LOG_MAJOR_ERROR:
++ dal_error("%s", entry->buf);
++ break;
++ default:
++ dal_output_to_console("%s", entry->buf);
++ break;
++ }
+ }
+ }
+
+--
+2.7.4
+