From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/4] qdev: add display capability
Date: Tue, 11 Aug 2009 11:20:27 +0200 [thread overview]
Message-ID: <1249982427-14481-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1249982427-14481-1-git-send-email-kraxel@redhat.com>
... and tag devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/cirrus_vga.c | 1 +
hw/qdev.c | 1 +
hw/qdev.h | 2 ++
hw/syborg_fb.c | 1 +
hw/tcx.c | 1 +
hw/vga.c | 1 +
hw/vmware_vga.c | 1 +
7 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 95d822a..65dd8a0 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3345,6 +3345,7 @@ void pci_cirrus_vga_init(PCIBus *bus)
static PCIDeviceInfo cirrus_vga_info = {
.qdev.name = "Cirrus VGA",
.qdev.size = sizeof(PCICirrusVGAState),
+ .qdev.caps = DEV_CAP_DISPLAY,
.init = pci_cirrus_vga_initfn,
.config_write = pci_cirrus_write_config,
};
diff --git a/hw/qdev.c b/hw/qdev.c
index c026305..b15408d 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -110,6 +110,7 @@ static int qdev_print_devinfo(DeviceInfo *info, char *dest, int len)
static const char *capname[] = {
[ DEV_CAP_BIT_AUDIO ] = "audio",
[ DEV_CAP_BIT_ETHERNET ] = "ethernet",
+ [ DEV_CAP_BIT_DISPLAY ] = "display",
};
const char *sep;
int pos = 0;
diff --git a/hw/qdev.h b/hw/qdev.h
index ee282f0..ea38a88 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -105,10 +105,12 @@ typedef void (*SCSIAttachFn)(DeviceState *host, BlockDriverState *bdrv,
enum DeviceCapBits {
DEV_CAP_BIT_AUDIO = 0,
DEV_CAP_BIT_ETHERNET = 1,
+ DEV_CAP_BIT_DISPLAY = 2,
};
#define DEV_CAP_AUDIO (1 << DEV_CAP_BIT_AUDIO)
#define DEV_CAP_ETHERNET (1 << DEV_CAP_BIT_ETHERNET)
+#define DEV_CAP_DISPLAY (1 << DEV_CAP_BIT_DISPLAY)
struct DeviceInfo {
const char *name;
diff --git a/hw/syborg_fb.c b/hw/syborg_fb.c
index efa5c0e..9d9a07e 100644
--- a/hw/syborg_fb.c
+++ b/hw/syborg_fb.c
@@ -534,6 +534,7 @@ static SysBusDeviceInfo syborg_fb_info = {
.init = syborg_fb_init,
.qdev.name = "syborg,framebuffer",
.qdev.size = sizeof(SyborgFBState),
+ .qdev.caps = DEV_CAP_DISPLAY,
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("width", SyborgFBState, cols, 0),
DEFINE_PROP_UINT32("height", SyborgFBState, rows, 0),
diff --git a/hw/tcx.c b/hw/tcx.c
index 68dbf02..a6f29fc 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -645,6 +645,7 @@ static SysBusDeviceInfo tcx_info = {
.init = tcx_init1,
.qdev.name = "SUNW,tcx",
.qdev.size = sizeof(TCXState),
+ .qdev.caps = DEV_CAP_DISPLAY,
.qdev.props = (Property[]) {
DEFINE_PROP_TADDR("addr", TCXState, addr, -1),
DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1),
diff --git a/hw/vga.c b/hw/vga.c
index 4a0f197..7090075 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2530,6 +2530,7 @@ int pci_vga_init(PCIBus *bus,
static PCIDeviceInfo vga_info = {
.qdev.name = "VGA",
.qdev.size = sizeof(PCIVGAState),
+ .qdev.caps = DEV_CAP_DISPLAY,
.init = pci_vga_initfn,
.config_write = pci_vga_write_config,
.qdev.props = (Property[]) {
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 5ceebf1..0c7df8e 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1246,6 +1246,7 @@ void pci_vmsvga_init(PCIBus *bus)
static PCIDeviceInfo vmsvga_info = {
.qdev.name = "QEMUware SVGA",
.qdev.size = sizeof(struct pci_vmsvga_state_s),
+ .qdev.caps = DEV_CAP_DISPLAY,
.init = pci_vmsvga_initfn,
};
--
1.6.2.5
next prev parent reply other threads:[~2009-08-11 9:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-11 9:20 [Qemu-devel] [PATCH 1/4] qdev: device capabilities Gerd Hoffmann
2009-08-11 9:20 ` [Qemu-devel] [PATCH 2/4] qdev: add audio capability Gerd Hoffmann
2009-08-11 9:20 ` [Qemu-devel] [PATCH 3/4] qdev: add ethernet capability Gerd Hoffmann
2009-08-11 9:20 ` Gerd Hoffmann [this message]
2009-08-11 13:42 ` [Qemu-devel] [PATCH 4/4] qdev: add display capability Anthony Liguori
2009-08-11 14:17 ` Gerd Hoffmann
2009-08-11 15:57 ` Anthony Liguori
2009-08-11 16:28 ` Gerd Hoffmann
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=1249982427-14481-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--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).