<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix"><br>
    </div>
    <blockquote type="cite"
      cite="mid:9c25d1f.1954.1926eeca432.Coremail.andyshrk@163.com">
      <pre wrap="" class="moz-quote-pre">Hi Baihan,

At 2024-10-01 15:26:23, "shiyongbang" <a class="moz-txt-link-rfc2396E"
      href="mailto:shiyongbang@huawei.com"><shiyongbang@huawei.com></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">From: baihan li <a
        class="moz-txt-link-rfc2396E" href="mailto:libaihan@huawei.com"><libaihan@huawei.com></a>

Add dp aux read/write functions. They are basic functions
and will be used later.

Signed-off-by: baihan li <a class="moz-txt-link-rfc2396E"
        href="mailto:libaihan@huawei.com"><libaihan@huawei.com></a>
---
drivers/gpu/drm/hisilicon/hibmc/Makefile     |   3 +-
drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.c  | 227 +++++++++++++++++++
drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.h  |  80 +++++++
drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h |  88 +++++++
drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h  |  76 +++++++
5 files changed, 473 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.c
create mode 100644 drivers/gpu/drm/hisilicon/hibmc/dp/dp_aux.h
create mode 100644 drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h
create mode 100644 drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h

diff --git a/drivers/gpu/drm/hisilicon/hibmc/Makefile b/drivers/gpu/drm/hisilicon/hibmc/Makefile
index d25c75e60d3d..8770ec6dfffd 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/Makefile
+++ b/drivers/gpu/drm/hisilicon/hibmc/Makefile
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_drm_i2c.o
+hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_drm_i2c.o \
+              dp/dp_aux.o
</pre>
      </blockquote>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">+
+#define DPCD_LINK_BW_SET               0x0100
+#define DPCD_LANE_COUNT_SET            0x0101
+#define DPCD_TRAINING_PATTERN_SET      0x0102
+#define DPCD_TRAINING_LANE0_SET                0x0103
+#define DPCD_DOWNSPREAD_CTRL           0x0107
+#define DPCD_LANE0_1_STATUS            0x0202
+#define DPCD_ADJUST_REQUEST_LANE0_1    0x0206
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">It seems that all of these have been defined in this header file.
 include/drm/display/drm_dp.h:
DP_LINK_BW_SET
DP_LANE_COUNT_SET</pre>
    </blockquote>
    <pre>  Ok, I will use general defination in <span
    style="white-space: pre-wrap">include/drm/display/drm_dp.h.
  Thanks.
        Baihan Li.

</span></pre>
  </body>
</html>