From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
intel-gvt-dev@lists.freedesktop.org,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 5/5] [debug] some logging
Date: Fri, 11 Jan 2019 10:31:16 +0100 [thread overview]
Message-ID: <20190111093116.17188-6-kraxel@redhat.com> (raw)
In-Reply-To: <20190111093116.17188-1-kraxel@redhat.com>
---
hw/vfio/display.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index a3a710b3ee..96b5474243 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -42,6 +42,8 @@ static void vfio_display_edid_link_up(void *opaque)
VFIOPCIDevice *vdev = opaque;
VFIODisplay *dpy = vdev->dpy;
+ fprintf(stderr, "%s:\n", __func__);
+
dpy->edid_regs->link_state = VFIO_DEVICE_GFX_LINK_STATE_UP;
pwrite_field(vdev->vbasedev.fd, dpy->edid_info, dpy->edid_regs, link_state);
return;
@@ -60,6 +62,9 @@ static void vfio_display_edid_update(VFIOPCIDevice *vdev, bool enabled, int pref
.prefy = prefy ?: vdev->display_yres,
};
+ fprintf(stderr, "%s: ui info: %dx%d, %s\n", __func__,
+ prefx, prefy, enabled ? "on" : "off");
+
timer_del(dpy->edid_link_timer);
dpy->edid_regs->link_state = VFIO_DEVICE_GFX_LINK_STATE_DOWN;
pwrite_field(vdev->vbasedev.fd, dpy->edid_info, dpy->edid_regs, link_state);
@@ -74,6 +79,9 @@ static void vfio_display_edid_update(VFIOPCIDevice *vdev, bool enabled, int pref
if (edid.maxy && edid.prefy > edid.maxy) {
edid.prefy = edid.maxy;
}
+ fprintf(stderr, "%s: edid: %dx%d\n", __func__,
+ edid.prefx, edid.prefy);
+
qemu_edid_generate(dpy->edid_blob,
dpy->edid_regs->edid_max_size,
&edid);
@@ -123,6 +131,8 @@ static void vfio_display_edid_init(VFIOPCIDevice *vdev)
VFIO_REGION_SUBTYPE_GFX_EDID,
&dpy->edid_info);
if (ret) {
+ fprintf(stderr, "%s: no edid region (%s)\n",
+ __func__, strerror(errno));
return;
}
@@ -132,6 +142,12 @@ static void vfio_display_edid_init(VFIOPCIDevice *vdev)
pread_field(vdev->vbasedev.fd, dpy->edid_info, dpy->edid_regs, max_xres);
pread_field(vdev->vbasedev.fd, dpy->edid_info, dpy->edid_regs, max_yres);
dpy->edid_blob = g_malloc0(dpy->edid_regs->edid_max_size);
+ fprintf(stderr, "%s: edid region: offset %d, size %d, max-res %dx%d\n",
+ __func__,
+ dpy->edid_regs->edid_offset,
+ dpy->edid_regs->edid_max_size,
+ dpy->edid_regs->max_xres,
+ dpy->edid_regs->max_yres);
/* if xres + yres properties are unset use the maximum resolution */
if (!vdev->display_xres)
--
2.9.3
next prev parent reply other threads:[~2019-01-11 9:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 9:31 [Qemu-devel] [PATCH 0/5] vfio/display: add edid support Gerd Hoffmann
2019-01-11 9:31 ` [Qemu-devel] [PATCH 1/5] vfio: update kernel headers Gerd Hoffmann
2019-01-11 15:32 ` Eric Blake
2019-01-14 6:15 ` Gerd Hoffmann
2019-01-11 9:31 ` [Qemu-devel] [PATCH 2/5] vfio/display: add edid support Gerd Hoffmann
2019-01-17 22:27 ` Alex Williamson
2019-01-11 9:31 ` [Qemu-devel] [PATCH 3/5] vfio/display: add xres + yres properties Gerd Hoffmann
2019-01-17 22:27 ` Alex Williamson
2019-01-11 9:31 ` [Qemu-devel] [PATCH 4/5] vfio/display: delay link up event Gerd Hoffmann
2019-01-17 22:27 ` Alex Williamson
2019-01-11 9:31 ` Gerd Hoffmann [this message]
2019-01-11 15:33 ` [Qemu-devel] [PATCH 5/5] [debug] some logging Eric Blake
2019-01-14 12:37 ` Gerd Hoffmann
2019-01-13 17:12 ` [Qemu-devel] [PATCH 0/5] vfio/display: add edid support no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190111093116.17188-6-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).