[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/26] hw/display/apple-gfx: uses DEFINE_TYPES macro
From: |
Phil Dennis-Jordan |
Subject: |
[PATCH 04/26] hw/display/apple-gfx: uses DEFINE_TYPES macro |
Date: |
Mon, 15 Jul 2024 23:06:43 +0200 |
Switches the device definition to the more modern macro variants.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
---
hw/display/apple-gfx.m | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m
index 3b437e2519..87bcdcd98e 100644
--- a/hw/display/apple-gfx.m
+++ b/hw/display/apple-gfx.m
@@ -86,10 +86,8 @@ -(void)mmioWriteAtOffset:(size_t) offset
value:(uint32_t)value;
typedef QTAILQ_HEAD(, AppleGFXTask) AppleGFXTaskList;
typedef struct AppleGFXState {
- /* Private */
SysBusDevice parent_obj;
- /* Public */
qemu_irq irq_gfx;
qemu_irq irq_iosfc;
MemoryRegion iomem_gfx;
@@ -562,17 +560,14 @@ static void apple_gfx_class_init(ObjectClass *klass, void
*data)
dc->realize = apple_gfx_realize;
}
-static TypeInfo apple_gfx_info = {
- .name = TYPE_APPLE_GFX,
- .parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(AppleGFXState),
- .class_init = apple_gfx_class_init,
- .instance_init = apple_gfx_init,
+static TypeInfo apple_gfx_types[] = {
+ {
+ .name = TYPE_APPLE_GFX,
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(AppleGFXState),
+ .class_init = apple_gfx_class_init,
+ .instance_init = apple_gfx_init,
+ }
};
-static void apple_gfx_register_types(void)
-{
- type_register_static(&apple_gfx_info);
-}
-
-type_init(apple_gfx_register_types)
+DEFINE_TYPES(apple_gfx_types)
--
2.39.3 (Apple Git-146)
- Re: hw/display/apple-gfx, (continued)
- Re:, Phil Dennis-Jordan, 2024/07/17
[PATCH 09/26] hw/display/apple-gfx: Wraps ObjC autorelease code in pool, Phil Dennis-Jordan, 2024/07/17
[PATCH 10/26] hw/display/apple-gfx: Fixes ObjC new/init misuse, plugs leaks, Phil Dennis-Jordan, 2024/07/17
[PATCH 08/26] hw/display/apple-gfx: Adds migration blocker, Phil Dennis-Jordan, 2024/07/17
[PATCH 24/26] hw/display/apple-gfx: Adds configurable mode list, Phil Dennis-Jordan, 2024/07/17
[PATCH 25/26] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF, Phil Dennis-Jordan, 2024/07/17
[PATCH 21/26] hw/display/apple-gfx: Implements texture syncing for non-UMA GPUs, Phil Dennis-Jordan, 2024/07/17
[PATCH 04/26] hw/display/apple-gfx: uses DEFINE_TYPES macro,
Phil Dennis-Jordan <=
[PATCH 23/26] hw/display/apple-gfx: Host GPU picking improvements, Phil Dennis-Jordan, 2024/07/17
[PATCH 01/26] hw/vmapple/apple-gfx: Introduce ParavirtualizedGraphics.Framework support, Phil Dennis-Jordan, 2024/07/17
[PATCH 02/26] hw/vmapple/apple-gfx: BQL renaming update, Phil Dennis-Jordan, 2024/07/17
[PATCH 05/26] hw/display/apple-gfx: native -> little endian memory ops, Phil Dennis-Jordan, 2024/07/17
[PATCH 07/26] hw/display/apple-gfx: Makes set_mode thread & memory safe, Phil Dennis-Jordan, 2024/07/17
[PATCH 20/26] hw/display/apple-gfx: Fixes cursor hotspot handling, Phil Dennis-Jordan, 2024/07/17
[PATCH 06/26] hw/display/apple-gfx: Removes dead/superfluous code, Phil Dennis-Jordan, 2024/07/17
[PATCH 17/26] hw/display/apple-gfx: Asynchronous rendering and graphics update, Phil Dennis-Jordan, 2024/07/17
[PATCH 13/26] hw/display/apple-gfx: Defines PGTask_s struct instead of casting, Phil Dennis-Jordan, 2024/07/17
[PATCH 16/26] hw/display/apple-gfx: Asynchronous MMIO writes on x86-64, Phil Dennis-Jordan, 2024/07/17