summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2024-04-08 17:30:50 -0700
committerPetri Gynther <pgynther@google.com>2024-04-12 11:24:05 -0700
commit6661d371f70ffe55afa586e349896df12a846cd9 (patch)
treed00461e5ad2e65fdb5d749ea22054ca0a6cb0946
parent7c5a39499e82ae3d9c952badcd2526ba5926f42c (diff)
downloaddisplay-android-gs-shusky-5.15-android15-beta.tar.gz
Add EDID hexdump capability to see the ground truth on the EDID data provided by the sink. Bug: 333456021 Signed-off-by: Petri Gynther <pgynther@google.com> Change-Id: Ib40d3adb21220aa0ae0d7387822adf581f311ff9
-rw-r--r--samsung/exynos_drm_dp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/samsung/exynos_drm_dp.c b/samsung/exynos_drm_dp.c
index 97786f2..0f1a526 100644
--- a/samsung/exynos_drm_dp.c
+++ b/samsung/exynos_drm_dp.c
@@ -190,6 +190,10 @@ static unsigned long dp_bist_mode = DP_BIST_OFF;
module_param(dp_bist_mode, ulong, 0664);
MODULE_PARM_DESC(dp_bist_mode, "use BIST mode by setting dp_bist_mode=x");
+static bool dp_edid_hexdump = false;
+module_param(dp_edid_hexdump, bool, 0664);
+MODULE_PARM_DESC(dp_edid_hexdump, "Enable/disable DP EDID hexdump");
+
static int dp_emulation_mode;
static void dp_fill_host_caps(struct dp_device *dp)
@@ -360,6 +364,8 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux *dp_aux,
static int dp_get_edid_block(void *data, u8 *edid, unsigned int block,
size_t length)
{
+ struct dp_device *dp = data;
+
// Hard-coded EDID for DP emulation mode
static const unsigned char emul_edid_block0[] = {
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1e, 0x6d, 0x01, 0x00, 0x01,
@@ -388,6 +394,11 @@ static int dp_get_edid_block(void *data, u8 *edid, unsigned int block,
if (!dp_emulation_mode) {
dp_hw_read_edid(block, length, edid);
+ if (dp_edid_hexdump) {
+ dp_info(dp, "EDID: block %u length %zu\n", block, length);
+ print_hex_dump(KERN_INFO, "exynos-drmdp: ", DUMP_PREFIX_NONE,
+ 16, 1, edid, length, true);
+ }
return 0;
}
@@ -399,7 +410,7 @@ static int dp_get_edid_block(void *data, u8 *edid, unsigned int block,
return 0;
}
- dp_warn(dp_drvdata, "%s: unknown edid block %d requested\n", __func__, block);
+ dp_warn(dp, "%s: unknown EDID block %d requested\n", __func__, block);
return -1;
}