From patchwork Mon Aug 31 10:27:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 32617 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 0C428B6F31 for ; Mon, 31 Aug 2009 20:28:29 +1000 (EST) Received: from localhost ([127.0.0.1]:36101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi47d-0005GK-PX for incoming@patchwork.ozlabs.org; Mon, 31 Aug 2009 06:28:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi476-0005Ef-5q for qemu-devel@nongnu.org; Mon, 31 Aug 2009 06:27:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi471-0005DY-Fl for qemu-devel@nongnu.org; Mon, 31 Aug 2009 06:27:51 -0400 Received: from [199.232.76.173] (port=56573 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi471-0005DM-9w for qemu-devel@nongnu.org; Mon, 31 Aug 2009 06:27:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2945) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mi470-0003Uz-PV for qemu-devel@nongnu.org; Mon, 31 Aug 2009 06:27:47 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7VARkwO020210 for ; Mon, 31 Aug 2009 06:27:46 -0400 Received: from zweiblum.home.kraxel.org (vpn2-8-244.ams2.redhat.com [10.36.8.244]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n7VARfRv028704; Mon, 31 Aug 2009 06:27:43 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 0E932700D7; Mon, 31 Aug 2009 12:27:39 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 31 Aug 2009 12:27:38 +0200 Message-Id: <1251714459-2467-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1251714459-2467-1-git-send-email-kraxel@redhat.com> References: <1251714459-2467-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 4/5] qdev: add display capability X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org ... and tag devices. Signed-off-by: Gerd Hoffmann --- 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 991d1da..d530305 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -3361,6 +3361,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 ff7da96..b6a1a1d 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 45808fa..2df6ad3 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 7be04a3..c4a2a15 100644 --- a/hw/syborg_fb.c +++ b/hw/syborg_fb.c @@ -535,6 +535,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 d1e5851..b809e51 100644 --- a/hw/tcx.c +++ b/hw/tcx.c @@ -634,6 +634,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 6b5070a..4898b7a 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2539,6 +2539,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 c6bce5a..151edf1 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -1247,6 +1247,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, };