disp: msm: dp: add debug logs to ipc logging

Add existing debug logs to ipc logging to be
accessed through debugfs.

Change-Id: Id9bfe61cb7921674eadc5635847c81a0fbdaef5c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
This commit is contained in:
Nisarg Bhavsar
2022-04-12 17:56:18 -07:00
父節點 249b73b0c7
當前提交 15b7e73a10
共有 8 個文件被更改,包括 173 次插入101 次删除

查看文件

@@ -12,6 +12,31 @@
#include "dp_debug.h" #include "dp_debug.h"
#define DP_AUX_ENUM_STR(x) #x #define DP_AUX_ENUM_STR(x) #x
#define DP_AUX_IPC_NUM_PAGES 10
#define DP_AUX_DEBUG(dp_aux, fmt, ...) \
do { \
if (dp_aux) \
ipc_log_string(dp_aux->ipc_log_context, "[d][%-4d]"fmt,\
current->pid, ##__VA_ARGS__); \
DP_DEBUG_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_AUX_WARN(dp_aux, fmt, ...) \
do { \
if (dp_aux) \
ipc_log_string(dp_aux->ipc_log_context, "[w][%-4d]"fmt,\
current->pid, ##__VA_ARGS__); \
DP_WARN_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_AUX_ERR(dp_aux, fmt, ...) \
do { \
if (dp_aux) \
ipc_log_string(dp_aux->ipc_log_context, "[e][%-4d]"fmt,\
current->pid, ##__VA_ARGS__); \
DP_ERR_V(fmt, ##__VA_ARGS__); \
} while (0)
enum { enum {
DP_AUX_DATA_INDEX_WRITE = BIT(31), DP_AUX_DATA_INDEX_WRITE = BIT(31),
@@ -57,10 +82,11 @@ static void dp_aux_hex_dump(struct drm_dp_aux *drm_aux,
u8 linebuf[64]; u8 linebuf[64];
struct dp_aux_private *aux = container_of(drm_aux, struct dp_aux_private *aux = container_of(drm_aux,
struct dp_aux_private, drm_aux); struct dp_aux_private, drm_aux);
struct dp_aux *dp_aux = &aux->dp_aux;
snprintf(prefix, sizeof(prefix), "%s %s %4xh(%2zu): ", snprintf(prefix, sizeof(prefix), "%s %s %4xh(%2zu): ",
aux->native ? "NAT" : "I2C", (msg->request & DP_AUX_I2C_MOT) ? "I2C" : "NAT",
aux->read ? "RD" : "WR", (msg->request & DP_AUX_I2C_READ) ? "RD" : "WR",
msg->address, msg->size); msg->address, msg->size);
for (i = 0; i < msg->size; i += rowsize) { for (i = 0; i < msg->size; i += rowsize) {
@@ -70,7 +96,10 @@ static void dp_aux_hex_dump(struct drm_dp_aux *drm_aux,
hex_dump_to_buffer(msg->buffer + i, linelen, rowsize, 1, hex_dump_to_buffer(msg->buffer + i, linelen, rowsize, 1,
linebuf, sizeof(linebuf), false); linebuf, sizeof(linebuf), false);
DP_DEBUG("%s%s\n", prefix, linebuf); if (msg->size == 1 && msg->address == 0)
DP_DEBUG_V("%s%s\n", prefix, linebuf);
else
DP_AUX_DEBUG(dp_aux, "%s%s\n", prefix, linebuf);
} }
} }
#else #else
@@ -107,6 +136,7 @@ static u32 dp_aux_write(struct dp_aux_private *aux,
u8 *msgdata = msg->buffer; u8 *msgdata = msg->buffer;
int const aux_cmd_fifo_len = 128; int const aux_cmd_fifo_len = 128;
int i = 0; int i = 0;
struct dp_aux *dp_aux = &aux->dp_aux;
if (aux->read) if (aux->read)
len = 4; len = 4;
@@ -118,7 +148,7 @@ static u32 dp_aux_write(struct dp_aux_private *aux,
* limit buf length to 128 bytes here * limit buf length to 128 bytes here
*/ */
if (len > aux_cmd_fifo_len) { if (len > aux_cmd_fifo_len) {
DP_ERR("buf len error\n"); DP_AUX_ERR(dp_aux, "buf len error\n");
return 0; return 0;
} }
@@ -166,18 +196,19 @@ static int dp_aux_cmd_fifo_tx(struct dp_aux_private *aux,
{ {
u32 ret = 0, len = 0, timeout; u32 ret = 0, len = 0, timeout;
int const aux_timeout_ms = HZ/4; int const aux_timeout_ms = HZ/4;
struct dp_aux *dp_aux = &aux->dp_aux;
reinit_completion(&aux->comp); reinit_completion(&aux->comp);
len = dp_aux_write(aux, msg); len = dp_aux_write(aux, msg);
if (len == 0) { if (len == 0) {
DP_ERR("DP AUX write failed\n"); DP_AUX_ERR(dp_aux, "DP AUX write failed\n");
return -EINVAL; return -EINVAL;
} }
timeout = wait_for_completion_timeout(&aux->comp, aux_timeout_ms); timeout = wait_for_completion_timeout(&aux->comp, aux_timeout_ms);
if (!timeout) { if (!timeout) {
DP_ERR("aux %s timeout\n", (aux->read ? "read" : "write")); DP_AUX_ERR(dp_aux, "aux %s timeout\n", (aux->read ? "read" : "write"));
return -ETIMEDOUT; return -ETIMEDOUT;
} }
@@ -200,6 +231,7 @@ static void dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
u8 *dp; u8 *dp;
u32 i, actual_i; u32 i, actual_i;
u32 len = msg->size; u32 len = msg->size;
struct dp_aux *dp_aux = &aux->dp_aux;
aux->catalog->clear_trans(aux->catalog, true); aux->catalog->clear_trans(aux->catalog, true);
@@ -221,7 +253,7 @@ static void dp_aux_cmd_fifo_rx(struct dp_aux_private *aux,
actual_i = (data >> 16) & 0xFF; actual_i = (data >> 16) & 0xFF;
if (i != actual_i) if (i != actual_i)
DP_WARN("Index mismatch: expected %d, found %d\n", DP_AUX_WARN(dp_aux, "Index mismatch: expected %d, found %d\n",
i, actual_i); i, actual_i);
} }
} }
@@ -280,7 +312,7 @@ static void dp_aux_isr(struct dp_aux *dp_aux)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -302,7 +334,7 @@ static void dp_aux_reconfig(struct dp_aux *dp_aux)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -318,7 +350,7 @@ static void dp_aux_abort_transaction(struct dp_aux *dp_aux, bool abort)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -427,6 +459,7 @@ static int dp_aux_transfer_ready(struct dp_aux_private *aux,
int ret = 0; int ret = 0;
int const aux_cmd_native_max = 16; int const aux_cmd_native_max = 16;
int const aux_cmd_i2c_max = 128; int const aux_cmd_i2c_max = 128;
struct dp_aux *dp_aux = &aux->dp_aux;
if (atomic_read(&aux->aborted)) { if (atomic_read(&aux->aborted)) {
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
@@ -445,7 +478,7 @@ static int dp_aux_transfer_ready(struct dp_aux_private *aux,
/* msg sanity check */ /* msg sanity check */
if ((aux->native && (msg->size > aux_cmd_native_max)) || if ((aux->native && (msg->size > aux_cmd_native_max)) ||
(msg->size > aux_cmd_i2c_max)) { (msg->size > aux_cmd_i2c_max)) {
DP_ERR("%s: invalid msg: size(%zu), request(%x)\n", DP_AUX_ERR(dp_aux, "%s: invalid msg: size(%zu), request(%x)\n",
__func__, msg->size, msg->request); __func__, msg->size, msg->request);
ret = -EINVAL; ret = -EINVAL;
goto error; goto error;
@@ -550,6 +583,7 @@ static ssize_t dp_aux_bridge_transfer(struct drm_dp_aux *drm_aux,
size = aux->aux_bridge->transfer(aux->aux_bridge, size = aux->aux_bridge->transfer(aux->aux_bridge,
drm_aux, msg); drm_aux, msg);
aux->bridge_in_transfer = false; aux->bridge_in_transfer = false;
dp_aux_hex_dump(drm_aux, msg);
} }
return size; return size;
@@ -581,6 +615,7 @@ static ssize_t dp_aux_transfer_debug(struct drm_dp_aux *drm_aux,
size = aux->sim_bridge->transfer(aux->sim_bridge, size = aux->sim_bridge->transfer(aux->sim_bridge,
drm_aux, msg); drm_aux, msg);
aux->sim_in_transfer = false; aux->sim_in_transfer = false;
dp_aux_hex_dump(drm_aux, msg);
} }
end: end:
return size; return size;
@@ -599,7 +634,7 @@ static void dp_aux_init(struct dp_aux *dp_aux, struct dp_aux_cfg *aux_cfg)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux || !aux_cfg) { if (!dp_aux || !aux_cfg) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -608,6 +643,10 @@ static void dp_aux_init(struct dp_aux *dp_aux, struct dp_aux_cfg *aux_cfg)
if (aux->enabled) if (aux->enabled)
return; return;
dp_aux->ipc_log_context = ipc_log_context_create(DP_AUX_IPC_NUM_PAGES, "drm_dp_aux", 0);
if (!dp_aux->ipc_log_context)
DP_AUX_WARN(dp_aux, "Error in creating dp_aux_ipc_log context\n");
dp_aux_reset_phy_config_indices(aux_cfg); dp_aux_reset_phy_config_indices(aux_cfg);
aux->catalog->setup(aux->catalog, aux_cfg); aux->catalog->setup(aux->catalog, aux_cfg);
aux->catalog->reset(aux->catalog); aux->catalog->reset(aux->catalog);
@@ -622,7 +661,7 @@ static void dp_aux_deinit(struct dp_aux *dp_aux)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -631,6 +670,11 @@ static void dp_aux_deinit(struct dp_aux *dp_aux)
if (!aux->enabled) if (!aux->enabled)
return; return;
if (dp_aux->ipc_log_context) {
ipc_log_context_destroy(dp_aux->ipc_log_context);
dp_aux->ipc_log_context = NULL;
}
atomic_set(&aux->aborted, 1); atomic_set(&aux->aborted, 1);
aux->catalog->enable(aux->catalog, false); aux->catalog->enable(aux->catalog, false);
aux->enabled = false; aux->enabled = false;
@@ -642,7 +686,7 @@ static int dp_aux_register(struct dp_aux *dp_aux, struct drm_device *drm_dev)
int ret = 0; int ret = 0;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
@@ -658,7 +702,7 @@ static int dp_aux_register(struct dp_aux *dp_aux, struct drm_device *drm_dev)
atomic_set(&aux->aborted, 1); atomic_set(&aux->aborted, 1);
ret = drm_dp_aux_register(&aux->drm_aux); ret = drm_dp_aux_register(&aux->drm_aux);
if (ret) { if (ret) {
DP_ERR("%s: failed to register drm aux: %d\n", __func__, ret); DP_AUX_ERR(dp_aux, "%s: failed to register drm aux: %d\n", __func__, ret);
goto exit; goto exit;
} }
dp_aux->drm_aux = &aux->drm_aux; dp_aux->drm_aux = &aux->drm_aux;
@@ -675,7 +719,7 @@ static void dp_aux_deregister(struct dp_aux *dp_aux)
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -689,7 +733,7 @@ static void dp_aux_set_sim_mode(struct dp_aux *dp_aux,
struct dp_aux_private *aux; struct dp_aux_private *aux;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
return; return;
} }
@@ -719,7 +763,7 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
enum fsa_function event = FSA_USBC_DISPLAYPORT_DISCONNECTED; enum fsa_function event = FSA_USBC_DISPLAYPORT_DISCONNECTED;
if (!dp_aux) { if (!dp_aux) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
rc = -EINVAL; rc = -EINVAL;
goto end; goto end;
} }
@@ -727,7 +771,7 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
aux = container_of(dp_aux, struct dp_aux_private, dp_aux); aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
if (!aux->aux_switch_node) { if (!aux->aux_switch_node) {
DP_DEBUG("undefined fsa4480 handle\n"); DP_AUX_DEBUG(dp_aux, "undefined fsa4480 handle\n");
rc = -EINVAL; rc = -EINVAL;
goto end; goto end;
} }
@@ -741,18 +785,18 @@ static int dp_aux_configure_aux_switch(struct dp_aux *dp_aux,
event = FSA_USBC_ORIENTATION_CC2; event = FSA_USBC_ORIENTATION_CC2;
break; break;
default: default:
DP_ERR("invalid orientation\n"); DP_AUX_ERR(dp_aux, "invalid orientation\n");
rc = -EINVAL; rc = -EINVAL;
goto end; goto end;
} }
} }
DP_DEBUG("enable=%d, orientation=%d, event=%d\n", DP_AUX_DEBUG(dp_aux, "enable=%d, orientation=%d, event=%d\n",
enable, orientation, event); enable, orientation, event);
rc = fsa4480_switch_event(aux->aux_switch_node, event); rc = fsa4480_switch_event(aux->aux_switch_node, event);
if (rc) if (rc)
DP_ERR("failed to configure fsa4480 i2c device (%d)\n", rc); DP_AUX_ERR(dp_aux, "failed to configure fsa4480 i2c device (%d)\n", rc);
end: end:
return rc; return rc;
} }
@@ -763,10 +807,10 @@ struct dp_aux *dp_aux_get(struct device *dev, struct dp_catalog_aux *catalog,
{ {
int rc = 0; int rc = 0;
struct dp_aux_private *aux; struct dp_aux_private *aux;
struct dp_aux *dp_aux; struct dp_aux *dp_aux = NULL;
if (!catalog || !parser) { if (!catalog || !parser) {
DP_ERR("invalid input\n"); DP_AUX_ERR(dp_aux, "invalid input\n");
rc = -ENODEV; rc = -ENODEV;
goto error; goto error;
} }

查看文件

@@ -42,6 +42,7 @@ struct dp_aux {
bool read; bool read;
struct mutex *access_lock; struct mutex *access_lock;
void *ipc_log_context;
struct drm_dp_aux *drm_aux; struct drm_dp_aux *drm_aux;
int (*drm_aux_register)(struct dp_aux *aux, struct drm_device *drm_dev); int (*drm_aux_register)(struct dp_aux *aux, struct drm_device *drm_dev);

查看文件

@@ -13,9 +13,40 @@
#include "dp_aux.h" #include "dp_aux.h"
#include "dp_display.h" #include "dp_display.h"
#include "dp_pll.h" #include "dp_pll.h"
#include <linux/ipc_logging.h>
#define DP_IPC_LOG(fmt, ...) \
do { \
void *ipc_logging_context = get_ipc_log_context(); \
ipc_log_string(ipc_logging_context, fmt, ##__VA_ARGS__); \
} while (0)
#define DP_DEBUG(fmt, ...) \ #define DP_DEBUG(fmt, ...) \
do { \ do { \
DP_IPC_LOG("[d][%-4d]"fmt, current->pid, ##__VA_ARGS__); \
DP_DEBUG_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_INFO(fmt, ...) \
do { \
DP_IPC_LOG("[i][%-4d]"fmt, current->pid, ##__VA_ARGS__); \
DP_INFO_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_WARN(fmt, ...) \
do { \
DP_IPC_LOG("[w][%-4d]"fmt, current->pid, ##__VA_ARGS__); \
DP_WARN_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_ERR(fmt, ...) \
do { \
DP_IPC_LOG("[e][%-4d]"fmt, current->pid, ##__VA_ARGS__); \
DP_ERR_V(fmt, ##__VA_ARGS__); \
} while (0)
#define DP_DEBUG_V(fmt, ...) \
do { \
if (drm_debug_enabled(DRM_UT_KMS)) \ if (drm_debug_enabled(DRM_UT_KMS)) \
DRM_DEBUG("[msm-dp-debug][%-4d]"fmt, current->pid, \ DRM_DEBUG("[msm-dp-debug][%-4d]"fmt, current->pid, \
##__VA_ARGS__); \ ##__VA_ARGS__); \
@@ -24,7 +55,7 @@
current->pid, ##__VA_ARGS__); \ current->pid, ##__VA_ARGS__); \
} while (0) } while (0)
#define DP_INFO(fmt, ...) \ #define DP_INFO_V(fmt, ...) \
do { \ do { \
if (drm_debug_enabled(DRM_UT_KMS)) \ if (drm_debug_enabled(DRM_UT_KMS)) \
DRM_INFO("[msm-dp-info][%-4d]"fmt, current->pid, \ DRM_INFO("[msm-dp-info][%-4d]"fmt, current->pid, \
@@ -34,13 +65,13 @@
current->pid, ##__VA_ARGS__); \ current->pid, ##__VA_ARGS__); \
} while (0) } while (0)
#define DP_WARN(fmt, ...) \ #define DP_WARN_V(fmt, ...) \
pr_warn("[drm:%s][msm-dp-warn][%-4d]"fmt, __func__, \ pr_warn("[drm:%s][msm-dp-warn][%-4d]"fmt, __func__, \
current->pid, ##__VA_ARGS__) current->pid, ##__VA_ARGS__)
#define DP_ERR(fmt, ...) \ #define DP_ERR_V(fmt, ...) \
pr_err("[drm:%s][msm-dp-err][%-4d]"fmt, __func__, \ pr_err("[drm:%s][msm-dp-err][%-4d]"fmt, __func__, \
current->pid, ##__VA_ARGS__) current->pid, ##__VA_ARGS__)
#define DEFAULT_DISCONNECT_DELAY_MS 0 #define DEFAULT_DISCONNECT_DELAY_MS 0
#define MAX_DISCONNECT_DELAY_MS 10000 #define MAX_DISCONNECT_DELAY_MS 10000

查看文件

@@ -15,6 +15,7 @@
#include <linux/usb/phy.h> #include <linux/usb/phy.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/pm_qos.h> #include <linux/pm_qos.h>
#include <linux/ipc_logging.h>
#include "sde_connector.h" #include "sde_connector.h"
@@ -34,6 +35,7 @@
#include "dp_pll.h" #include "dp_pll.h"
#include "sde_dbg.h" #include "sde_dbg.h"
#define DRM_DP_IPC_NUM_PAGES 10
#define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__) #define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__)
#define dp_display_state_show(x) { \ #define dp_display_state_show(x) { \
@@ -2908,7 +2910,7 @@ static int dp_display_validate_topology(struct dp_display_private *dp,
return -EPERM; return -EPERM;
} }
DP_DEBUG("mode %sx%d is valid, supported DP topology lm:%d dsc:%d 3dmux:%d\n", DP_DEBUG_V("mode %sx%d is valid, supported DP topology lm:%d dsc:%d 3dmux:%d\n",
mode->name, fps, num_lm, num_dsc, num_3dmux); mode->name, fps, num_lm, num_dsc, num_3dmux);
return 0; return 0;
@@ -2968,7 +2970,8 @@ static enum drm_mode_status dp_display_validate_mode(
mode_status = MODE_OK; mode_status = MODE_OK;
end: end:
mutex_unlock(&dp->session_lock); mutex_unlock(&dp->session_lock);
DP_DEBUG("[%s] mode is %s\n", mode->name,
DP_DEBUG_V("[%s] mode is %s\n", mode->name,
(mode_status == MODE_OK) ? "valid" : "invalid"); (mode_status == MODE_OK) ? "valid" : "invalid");
return mode_status; return mode_status;
@@ -2991,11 +2994,11 @@ static int dp_display_get_available_dp_resources(struct dp_display *dp_display,
max_dp_avail_res->num_dsc = min(avail_res->num_dsc, max_dp_avail_res->num_dsc = min(avail_res->num_dsc,
dp_display->max_dsc_count); dp_display->max_dsc_count);
DP_DEBUG("max_lm:%d, avail_lm:%d, dp_avail_lm:%d\n", DP_DEBUG_V("max_lm:%d, avail_lm:%d, dp_avail_lm:%d\n",
dp_display->max_mixer_count, avail_res->num_lm, dp_display->max_mixer_count, avail_res->num_lm,
max_dp_avail_res->num_lm); max_dp_avail_res->num_lm);
DP_DEBUG("max_dsc:%d, avail_dsc:%d, dp_avail_dsc:%d\n", DP_DEBUG_V("max_dsc:%d, avail_dsc:%d, dp_avail_dsc:%d\n",
dp_display->max_dsc_count, avail_res->num_dsc, dp_display->max_dsc_count, avail_res->num_dsc,
max_dp_avail_res->num_dsc); max_dp_avail_res->num_dsc);
@@ -3051,7 +3054,7 @@ static void dp_display_convert_to_dp_mode(struct dp_display *dp_display,
free_dsc_blks = dp_display->max_dsc_count - free_dsc_blks = dp_display->max_dsc_count -
dp->tot_dsc_blks_in_use + dp->tot_dsc_blks_in_use +
dp_panel->dsc_blks_in_use; dp_panel->dsc_blks_in_use;
DP_DEBUG("Before: in_use:%d, max:%d, free:%d\n", DP_DEBUG_V("Before: in_use:%d, max:%d, free:%d\n",
dp->tot_dsc_blks_in_use, dp->tot_dsc_blks_in_use,
dp_display->max_dsc_count, free_dsc_blks); dp_display->max_dsc_count, free_dsc_blks);
@@ -3074,7 +3077,7 @@ static void dp_display_convert_to_dp_mode(struct dp_display *dp_display,
} }
if (dp_mode->capabilities & DP_PANEL_CAPS_DSC) if (dp_mode->capabilities & DP_PANEL_CAPS_DSC)
DP_DEBUG("After: in_use:%d, max:%d, free:%d, req:%d, caps:0x%x\n", DP_DEBUG_V("After: in_use:%d, max:%d, free:%d, req:%d, caps:0x%x\n",
dp->tot_dsc_blks_in_use, dp->tot_dsc_blks_in_use,
dp_display->max_dsc_count, dp_display->max_dsc_count,
free_dsc_blks, required_dsc_blks, free_dsc_blks, required_dsc_blks,
@@ -3594,6 +3597,10 @@ static int dp_display_probe(struct platform_device *pdev)
g_dp_display = &dp->dp_display; g_dp_display = &dp->dp_display;
g_dp_display->dp_ipc_log = ipc_log_context_create(DRM_DP_IPC_NUM_PAGES, "drm_dp", 0);
if (!g_dp_display->dp_ipc_log)
DP_WARN("Error in creating ipc_log_context\n");
g_dp_display->enable = dp_display_enable; g_dp_display->enable = dp_display_enable;
g_dp_display->post_enable = dp_display_post_enable; g_dp_display->post_enable = dp_display_post_enable;
g_dp_display->pre_disable = dp_display_pre_disable; g_dp_display->pre_disable = dp_display_pre_disable;
@@ -3705,6 +3712,11 @@ static int dp_display_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
devm_kfree(&pdev->dev, dp); devm_kfree(&pdev->dev, dp);
if (g_dp_display->dp_ipc_log) {
ipc_log_context_destroy(g_dp_display->dp_ipc_log);
g_dp_display->dp_ipc_log = NULL;
}
return 0; return 0;
} }
@@ -3766,6 +3778,13 @@ static void dp_pm_complete(struct device *dev)
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state);
} }
void *get_ipc_log_context(void)
{
if (g_dp_display && g_dp_display->dp_ipc_log)
return g_dp_display->dp_ipc_log;
return NULL;
}
static const struct dev_pm_ops dp_pm_ops = { static const struct dev_pm_ops dp_pm_ops = {
.prepare = dp_pm_prepare, .prepare = dp_pm_prepare,
.complete = dp_pm_complete, .complete = dp_pm_complete,

查看文件

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
*/ */
@@ -49,6 +50,7 @@ struct dp_display {
void *dp_mst_prv_info; void *dp_mst_prv_info;
u32 max_mixer_count; u32 max_mixer_count;
u32 max_dsc_count; u32 max_dsc_count;
void *dp_ipc_log;
int (*enable)(struct dp_display *dp_display, void *panel); int (*enable)(struct dp_display *dp_display, void *panel);
int (*post_enable)(struct dp_display *dp_display, void *panel); int (*post_enable)(struct dp_display *dp_display, void *panel);
@@ -105,6 +107,8 @@ struct dp_display {
struct msm_resource_caps_info *max_dp_avail_res); struct msm_resource_caps_info *max_dp_avail_res);
}; };
void *get_ipc_log_context(void);
#if IS_ENABLED(CONFIG_DRM_MSM_DP) #if IS_ENABLED(CONFIG_DRM_MSM_DP)
int dp_display_get_num_of_displays(void); int dp_display_get_num_of_displays(void);
int dp_display_get_displays(void **displays, int count); int dp_display_get_displays(void **displays, int count);

查看文件

@@ -47,7 +47,9 @@
#include "dp_parser.h" #include "dp_parser.h"
#define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__) #define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__)
#define DP_MST_INFO(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__) #define DP_MST_INFO(fmt, ...) DP_INFO(fmt, ##__VA_ARGS__)
#define DP_MST_DEBUG_V(fmt, ...) DP_DEBUG_V(fmt, ##__VA_ARGS__)
#define DP_MST_INFO_V(fmt, ...) DP_INFO_V(fmt, ##__VA_ARGS__)
#define MAX_DP_MST_DRM_ENCODERS 2 #define MAX_DP_MST_DRM_ENCODERS 2
#define MAX_DP_MST_DRM_BRIDGES 2 #define MAX_DP_MST_DRM_BRIDGES 2
@@ -250,7 +252,7 @@ static int dp_mst_calc_pbn_mode(struct dp_display_mode *dp_mode)
pbn = drm_dp_calc_pbn_mode(dp_mode->timing.pixel_clk_khz, bpp, false); pbn = drm_dp_calc_pbn_mode(dp_mode->timing.pixel_clk_khz, bpp, false);
pbn_fp = drm_fixp_from_fraction(pbn, 1); pbn_fp = drm_fixp_from_fraction(pbn, 1);
DP_DEBUG("before overhead pbn:%d, bpp:%d\n", pbn, bpp); DP_DEBUG_V("before overhead pbn:%d, bpp:%d\n", pbn, bpp);
if (dsc_en) if (dsc_en)
pbn_fp = drm_fixp_mul(pbn_fp, dp_mode->dsc_overhead_fp); pbn_fp = drm_fixp_mul(pbn_fp, dp_mode->dsc_overhead_fp);
@@ -260,7 +262,7 @@ static int dp_mst_calc_pbn_mode(struct dp_display_mode *dp_mode)
pbn = drm_fixp2int(pbn_fp); pbn = drm_fixp2int(pbn_fp);
DP_DEBUG("after overhead pbn:%d, bpp:%d\n", pbn, bpp); DP_DEBUG_V("after overhead pbn:%d, bpp:%d\n", pbn, bpp);
return pbn; return pbn;
} }
@@ -288,7 +290,7 @@ static int dp_mst_bridge_attach(struct drm_bridge *dp_bridge,
{ {
struct dp_mst_bridge *bridge; struct dp_mst_bridge *bridge;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
if (!dp_bridge) { if (!dp_bridge) {
@@ -314,7 +316,7 @@ static bool dp_mst_bridge_mode_fixup(struct drm_bridge *drm_bridge,
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
struct dp_mst_bridge_state *bridge_state; struct dp_mst_bridge_state *bridge_state;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
if (!drm_bridge || !mode || !adjusted_mode) { if (!drm_bridge || !mode || !adjusted_mode) {
DP_ERR("Invalid params\n"); DP_ERR("Invalid params\n");
@@ -357,7 +359,7 @@ static int _dp_mst_compute_config(struct drm_atomic_state *state,
int slots = 0, pbn; int slots = 0, pbn;
struct sde_connector *c_conn = to_sde_connector(connector); struct sde_connector *c_conn = to_sde_connector(connector);
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id);
pbn = mst->mst_fw_cbs->calc_pbn_mode(mode); pbn = mst->mst_fw_cbs->calc_pbn_mode(mode);
@@ -445,7 +447,7 @@ static void _dp_mst_bridge_pre_enable_part1(struct dp_mst_bridge *dp_bridge)
bool ret; bool ret;
int pbn, slots; int pbn, slots;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge));
/* skip mst specific disable operations during suspend */ /* skip mst specific disable operations during suspend */
@@ -485,7 +487,7 @@ static void _dp_mst_bridge_pre_enable_part2(struct dp_mst_bridge *dp_bridge)
struct dp_display *dp_display = dp_bridge->display; struct dp_display *dp_display = dp_bridge->display;
struct dp_mst_private *mst = dp_display->dp_mst_prv_info; struct dp_mst_private *mst = dp_display->dp_mst_prv_info;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge));
/* skip mst specific disable operations during suspend */ /* skip mst specific disable operations during suspend */
@@ -508,7 +510,7 @@ static void _dp_mst_bridge_pre_disable_part1(struct dp_mst_bridge *dp_bridge)
struct dp_mst_private *mst = dp_display->dp_mst_prv_info; struct dp_mst_private *mst = dp_display->dp_mst_prv_info;
struct drm_dp_mst_port *port = c_conn->mst_port; struct drm_dp_mst_port *port = c_conn->mst_port;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge));
/* skip mst specific disable operations during suspend */ /* skip mst specific disable operations during suspend */
@@ -535,7 +537,7 @@ static void _dp_mst_bridge_pre_disable_part2(struct dp_mst_bridge *dp_bridge)
to_sde_connector(dp_bridge->connector); to_sde_connector(dp_bridge->connector);
struct drm_dp_mst_port *port = c_conn->mst_port; struct drm_dp_mst_port *port = c_conn->mst_port;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(dp_bridge));
/* skip mst specific disable operations during suspend */ /* skip mst specific disable operations during suspend */
@@ -572,7 +574,7 @@ static void dp_mst_bridge_pre_enable(struct drm_bridge *drm_bridge)
return; return;
} }
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
bridge = to_dp_mst_bridge(drm_bridge); bridge = to_dp_mst_bridge(drm_bridge);
dp = bridge->display; dp = bridge->display;
@@ -642,7 +644,7 @@ static void dp_mst_bridge_enable(struct drm_bridge *drm_bridge)
return; return;
} }
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(bridge));
dp = bridge->display; dp = bridge->display;
@@ -671,7 +673,7 @@ static void dp_mst_bridge_disable(struct drm_bridge *drm_bridge)
return; return;
} }
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
bridge = to_dp_mst_bridge(drm_bridge); bridge = to_dp_mst_bridge(drm_bridge);
if (!bridge->connector) { if (!bridge->connector) {
@@ -721,7 +723,7 @@ static void dp_mst_bridge_post_disable(struct drm_bridge *drm_bridge)
return; return;
} }
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(bridge)); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, DP_MST_CONN_ID(bridge));
dp = bridge->display; dp = bridge->display;
@@ -753,7 +755,7 @@ static void dp_mst_bridge_mode_set(struct drm_bridge *drm_bridge,
struct dp_mst_bridge_state *dp_bridge_state; struct dp_mst_bridge_state *dp_bridge_state;
struct dp_display *dp; struct dp_display *dp;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
if (!drm_bridge || !mode || !adjusted_mode) { if (!drm_bridge || !mode || !adjusted_mode) {
DP_ERR("Invalid params\n"); DP_ERR("Invalid params\n");
@@ -904,7 +906,7 @@ dp_mst_connector_detect(struct drm_connector *connector,
struct dp_panel *dp_panel; struct dp_panel *dp_panel;
enum drm_connector_status status; enum drm_connector_status status;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
dp_panel = c_conn->drv_panel; dp_panel = c_conn->drv_panel;
@@ -927,7 +929,7 @@ void dp_mst_clear_edid_cache(void *dp_display) {
struct drm_connector *conn; struct drm_connector *conn;
struct sde_connector *c_conn; struct sde_connector *c_conn;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
if (!dp) { if (!dp) {
@@ -949,7 +951,7 @@ void dp_mst_clear_edid_cache(void *dp_display) {
drm_connector_list_iter_end(&conn_iter); drm_connector_list_iter_end(&conn_iter);
DP_MST_DEBUG("exit:\n"); DP_MST_DEBUG_V("exit:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT);
} }
@@ -962,7 +964,7 @@ static int dp_mst_connector_get_modes(struct drm_connector *connector,
int rc = 0; int rc = 0;
struct edid *edid = NULL; struct edid *edid = NULL;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id);
mutex_lock(&mst->edid_lock); mutex_lock(&mst->edid_lock);
@@ -1001,7 +1003,7 @@ duplicate_edid:
connector, edid); connector, edid);
end: end:
DP_MST_DEBUG("exit: id: %d rc: %d\n", connector->base.id, rc); DP_MST_DEBUG_V("exit: id: %d rc: %d\n", connector->base.id, rc);
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id, rc); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id, rc);
return rc; return rc;
@@ -1089,16 +1091,16 @@ int dp_mst_connector_get_mode_info(struct drm_connector *connector,
{ {
int rc; int rc;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id);
rc = dp_connector_get_mode_info(connector, drm_mode, NULL, mode_info, rc = dp_connector_get_mode_info(connector, drm_mode, NULL, mode_info,
display, avail_res); display, avail_res);
DP_MST_DEBUG("mst connector:%d get mode info. rc:%d\n", DP_MST_DEBUG_V("mst connector:%d get mode info. rc:%d\n",
connector->base.id, rc); connector->base.id, rc);
DP_MST_DEBUG("exit:\n"); DP_MST_DEBUG_V("exit:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id);
return rc; return rc;
@@ -1173,7 +1175,7 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
struct sde_connector *c_conn = to_sde_connector(connector); struct sde_connector *c_conn = to_sde_connector(connector);
struct dp_display_mode dp_mode; struct dp_display_mode dp_mode;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id);
if (!state) if (!state)
@@ -1308,7 +1310,7 @@ static int dp_mst_connector_config_hdr(struct drm_connector *connector,
{ {
int rc; int rc;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, connector->base.id);
rc = dp_connector_config_hdr(connector, display, c_state); rc = dp_connector_config_hdr(connector, display, c_state);
@@ -1316,7 +1318,7 @@ static int dp_mst_connector_config_hdr(struct drm_connector *connector,
DP_MST_DEBUG("mst connector:%d cfg hdr. rc:%d\n", DP_MST_DEBUG("mst connector:%d cfg hdr. rc:%d\n",
connector->base.id, rc); connector->base.id, rc);
DP_MST_DEBUG("exit:\n"); DP_MST_DEBUG_V("exit:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id, rc); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, connector->base.id, rc);
return rc; return rc;
@@ -1329,7 +1331,7 @@ static void dp_mst_connector_pre_destroy(struct drm_connector *connector,
struct sde_connector *c_conn = to_sde_connector(connector); struct sde_connector *c_conn = to_sde_connector(connector);
u32 conn_id = connector->base.id; u32 conn_id = connector->base.id;
DP_MST_DEBUG("enter:\n"); DP_MST_DEBUG_V("enter:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, conn_id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, conn_id);
kfree(c_conn->cached_edid); kfree(c_conn->cached_edid);
@@ -1338,7 +1340,7 @@ static void dp_mst_connector_pre_destroy(struct drm_connector *connector,
drm_dp_mst_put_port_malloc(c_conn->mst_port); drm_dp_mst_put_port_malloc(c_conn->mst_port);
dp_display->mst_connector_uninstall(dp_display, connector); dp_display->mst_connector_uninstall(dp_display, connector);
DP_MST_DEBUG("exit:\n"); DP_MST_DEBUG_V("exit:\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, conn_id); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, conn_id);
} }
@@ -1384,7 +1386,7 @@ dp_mst_add_connector(struct drm_dp_mst_topology_mgr *mgr,
struct sde_connector *c_conn; struct sde_connector *c_conn;
int rc, i; int rc, i;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
dp_mst = container_of(mgr, struct dp_mst_private, mst_mgr); dp_mst = container_of(mgr, struct dp_mst_private, mst_mgr);
@@ -1589,7 +1591,7 @@ dp_mst_add_fixed_connector(struct drm_dp_mst_topology_mgr *mgr,
struct drm_connector *connector; struct drm_connector *connector;
int i, enc_idx; int i, enc_idx;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
dp_mst = container_of(mgr, struct dp_mst_private, mst_mgr); dp_mst = container_of(mgr, struct dp_mst_private, mst_mgr);
@@ -1654,7 +1656,7 @@ dp_mst_drm_fixed_connector_init(struct dp_display *dp_display,
struct drm_connector *connector; struct drm_connector *connector;
int rc; int rc;
DP_MST_DEBUG("enter\n"); DP_MST_DEBUG_V("enter\n");
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY);
dev = dp_display->drm_dev; dev = dp_display->drm_dev;

查看文件

@@ -87,35 +87,6 @@ static const struct dp_mst_sim_port output_port = {
0, 0, 2520, 2520, NULL, 0 0, 0, 2520, 2520, NULL, 0
}; };
#if IS_ENABLED(CONFIG_DYNAMIC_DEBUG)
static void dp_sim_aux_hex_dump(struct drm_dp_aux_msg *msg)
{
char prefix[64];
int i, linelen, remaining = msg->size;
const int rowsize = 16;
u8 linebuf[64];
snprintf(prefix, sizeof(prefix), "%s %s %4xh(%2zu): ",
(msg->request & DP_AUX_I2C_MOT) ? "I2C" : "NAT",
(msg->request & DP_AUX_I2C_READ) ? "RD" : "WR",
msg->address, msg->size);
for (i = 0; i < msg->size; i += rowsize) {
linelen = min(remaining, rowsize);
remaining -= rowsize;
hex_dump_to_buffer(msg->buffer + i, linelen, rowsize, 1,
linebuf, sizeof(linebuf), false);
DP_DEBUG("%s%s\n", prefix, linebuf);
}
}
#else
static void dp_sim_aux_hex_dump(struct drm_dp_aux_msg *msg)
{
}
#endif /* CONFIG_DYNAMIC_DEBUG */
static int dp_sim_register_hpd(struct dp_aux_bridge *bridge, static int dp_sim_register_hpd(struct dp_aux_bridge *bridge,
int (*hpd_cb)(void *, bool, bool), void *dev) int (*hpd_cb)(void *, bool, bool), void *dev)
{ {
@@ -334,8 +305,6 @@ static ssize_t dp_sim_transfer(struct dp_aux_bridge *bridge,
ret = drm_aux->transfer(drm_aux, msg); ret = drm_aux->transfer(drm_aux, msg);
end: end:
dp_sim_aux_hex_dump(msg);
mutex_unlock(&sim_dev->lock); mutex_unlock(&sim_dev->lock);
return ret; return ret;

查看文件

@@ -45,7 +45,9 @@
#include "dp_debug.h" #include "dp_debug.h"
#define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__) #define DP_MST_DEBUG(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__)
#define DP_MST_INFO(fmt, ...) DP_DEBUG(fmt, ##__VA_ARGS__) #define DP_MST_INFO(fmt, ...) DP_INFO(fmt, ##__VA_ARGS__)
#define DP_MST_DEBUG_V(fmt, ...) DP_DEBUG_V(fmt, ##__VA_ARGS__)
#define DP_MST_INFO_V(fmt, ...) DP_INFO_V(fmt, ##__VA_ARGS__)
#define DDC_SEGMENT_ADDR 0x30 #define DDC_SEGMENT_ADDR 0x30
@@ -104,7 +106,7 @@ static void dp_sideband_hex_dump(const char *name,
hex_dump_to_buffer(buffer + i, linelen, rowsize, 1, hex_dump_to_buffer(buffer + i, linelen, rowsize, 1,
linebuf, sizeof(linebuf), false); linebuf, sizeof(linebuf), false);
DP_MST_DEBUG("%s%s\n", prefix, linebuf); DP_MST_DEBUG_V("%s%s\n", prefix, linebuf);
} }
} }
#else #else