qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V3 4/8] introduce dpcd module.


From: Frederic Konrad
Subject: Re: [Qemu-devel] [PATCH V3 4/8] introduce dpcd module.
Date: Tue, 21 Jul 2015 18:03:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 11/07/2015 02:29, Hyun Kwon wrote:
Hi Fred,

Thanks for the patch.

-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Monday, July 06, 2015 9:22 AM
To: address@hidden
Cc: address@hidden; Peter Crosthwaite; Hyun Kwon;
address@hidden; address@hidden;
address@hidden
Subject: [PATCH V3 4/8] introduce dpcd module.

From: KONRAD Frederic <address@hidden>

This introduces a DPCD module. It wires on a aux-bus and can be accessed
by
driver to get lane-speed, etc.

Signed-off-by: KONRAD Frederic <address@hidden>
---
  default-configs/aarch64-softmmu.mak |   1 +
  hw/display/Makefile.objs            |   1 +
  hw/display/dpcd.c                   | 157
++++++++++++++++++++++++++++++++++++
  hw/display/dpcd.h                   |  94 +++++++++++++++++++++
  4 files changed, 253 insertions(+)
  create mode 100644 hw/display/dpcd.c
  create mode 100644 hw/display/dpcd.h

diff --git a/default-configs/aarch64-softmmu.mak b/default-
configs/aarch64-softmmu.mak
index d3a2665..87165b7 100644
--- a/default-configs/aarch64-softmmu.mak
+++ b/default-configs/aarch64-softmmu.mak
@@ -4,4 +4,5 @@
  include arm-softmmu.mak

  CONFIG_AUX=y
+CONFIG_DPCD=y
  CONFIG_XLNX_ZYNQMP=y
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index dd8ea76..6d7004a 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -38,3 +38,4 @@ common-obj-$(CONFIG_QXL) += qxl.o qxl-logger.o qxl-
render.o
  obj-$(CONFIG_VIRTIO) += virtio-gpu.o
  obj-$(CONFIG_VIRTIO_PCI) += virtio-gpu-pci.o
  obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o
+obj-$(CONFIG_DPCD) += dpcd.o
diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c
new file mode 100644
index 0000000..cf666f8
--- /dev/null
+++ b/hw/display/dpcd.c
@@ -0,0 +1,157 @@
+/*
+ * dpcd.c
[snip]

+
+static void dpcd_reset(DeviceState *dev)
+{
+    DPCDState *s = DPCD(dev);
+
+    memset(&(s->dpcd_info), 0, sizeof(s->dpcd_info));
+
+    s->dpcd_info[DPCD_REVISION] = DPCD_REV_1_0;
+    s->dpcd_info[DPCD_MAX_LINK_RATE] = DPCD_5_4GBPS;
+    s->dpcd_info[DPCD_MAX_LANE_COUNT] = DPCD_ONE_LANE;
In my opinion, it's better to use the maximum value. Thus, I'd use 
DPCD_FOUR_LANES here.

+    s->dpcd_info[DPCD_RECEIVE_PORT0_CAP_0] = DPCD_EDID_PRESENT;
+    /* buffer size */
+    s->dpcd_info[DPCD_RECEIVE_PORT0_CAP_1] = 0xFF;
+
+    s->dpcd_info[DPCD_LANE0_1_STATUS] = DPCD_LANE0_CR_DONE
+                                      | DPCD_LANE0_CHANNEL_EQ_DONE
+                                      | DPCD_LANE0_SYMBOL_LOCKED;
+
+    s->dpcd_info[DPCD_LANE_ALIGN_STATUS_UPDATED] =
DPCD_INTERLANE_ALIGN_DONE;
+    s->dpcd_info[DPCD_SINK_STATUS] = DPCD_RECEIVE_PORT_0_STATUS;
+}
For some reason, on my set up, this dpcd_reset() functions isn't being called. 
I had to add it to the dpcd_init() as before. I'm not sure if that is from 
using different baseline. Please make sure the dpcd is initialized correctly.

Thanks,
-hyun

Ok this seems to be called.. I can't reproduce the issue.

Thanks,
Fred


This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]