diff options
author | Harry Wentland <harry.wentland@amd.com> | 2017-09-13 02:33:40 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-27 01:17:43 +0300 |
commit | 01a526f3dee9abe1e2db9e37e4ceb4149f8ae77b (patch) | |
tree | 43a52325195b6404cafae87989c44b35d9de908d /drivers/gpu/drm/amd/display/dc/basics | |
parent | 02e749dcbe5da2b1b2b1c3825be094287257046f (diff) | |
download | linux-01a526f3dee9abe1e2db9e37e4ceb4149f8ae77b.tar.xz |
drm/amd/display: Pass log_mask from DM
Linux and Windows often desire different log levels.
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/basics/logger.c | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c index 0b17374b1535..5895dd3903a3 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/logger.c +++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c @@ -64,40 +64,9 @@ static const struct dc_log_type_info log_type_info_tbl[] = { }; -#define DC_DEFAULT_LOG_MASK ((1 << LOG_ERROR) | \ - (1 << LOG_WARNING) | \ - (1 << LOG_EVENT_MODE_SET) | \ - (1 << LOG_EVENT_DETECTION) | \ - (1 << LOG_EVENT_LINK_TRAINING) | \ - (1 << LOG_EVENT_LINK_LOSS) | \ - (1 << LOG_EVENT_UNDERFLOW) | \ - (1 << LOG_RESOURCE) | \ - (1 << LOG_FEATURE_OVERRIDE) | \ - (1 << LOG_DETECTION_EDID_PARSER) | \ - (1 << LOG_DC) | \ - (1 << LOG_HW_HOTPLUG) | \ - (1 << LOG_HW_SET_MODE) | \ - (1 << LOG_HW_RESUME_S3) | \ - (1 << LOG_HW_HPD_IRQ) | \ - (1 << LOG_SYNC) | \ - (1 << LOG_BANDWIDTH_VALIDATION) | \ - (1 << LOG_MST) | \ - (1 << LOG_DETECTION_DP_CAPS) | \ - (1 << LOG_BACKLIGHT)) | \ - (1 << LOG_I2C_AUX) | \ - (1 << LOG_IF_TRACE) | \ - (1 << LOG_DTN) /* | \ - (1 << LOG_DEBUG) | \ - (1 << LOG_BIOS) | \ - (1 << LOG_SURFACE) | \ - (1 << LOG_SCALER) | \ - (1 << LOG_DML) | \ - (1 << LOG_HW_LINK_TRAINING) | \ - (1 << LOG_HW_AUDIO)| \ - (1 << LOG_BANDWIDTH_CALCS)*/ - /* ----------- Object init and destruction ----------- */ -static bool construct(struct dc_context *ctx, struct dal_logger *logger) +static bool construct(struct dc_context *ctx, struct dal_logger *logger, + uint32_t log_mask) { /* malloc buffer and init offsets */ logger->log_buffer_size = DAL_LOGGER_BUFFER_MAX_SIZE; @@ -120,7 +89,7 @@ static bool construct(struct dc_context *ctx, struct dal_logger *logger) logger->ctx = ctx; - logger->mask = DC_DEFAULT_LOG_MASK; + logger->mask = log_mask; return true; } @@ -133,14 +102,14 @@ static void destruct(struct dal_logger *logger) } } -struct dal_logger *dal_logger_create(struct dc_context *ctx) +struct dal_logger *dal_logger_create(struct dc_context *ctx, uint32_t log_mask) { /* malloc struct */ struct dal_logger *logger = dm_alloc(sizeof(struct dal_logger)); if (!logger) return NULL; - if (!construct(ctx, logger)) { + if (!construct(ctx, logger, log_mask)) { dm_free(logger); return NULL; } |