]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/display: Constify all Property
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 13 Dec 2024 15:31:19 +0000 (15:31 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 15 Dec 2024 18:54:51 +0000 (12:54 -0600)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
27 files changed:
hw/display/artist.c
hw/display/ati.c
hw/display/bcm2835_fb.c
hw/display/bochs-display.c
hw/display/cg3.c
hw/display/cirrus_vga.c
hw/display/cirrus_vga_isa.c
hw/display/exynos4210_fimd.c
hw/display/g364fb.c
hw/display/i2c-ddc.c
hw/display/macfb.c
hw/display/pl110.c
hw/display/qxl.c
hw/display/ramfb-standalone.c
hw/display/sm501.c
hw/display/tcx.c
hw/display/vga-isa.c
hw/display/vga-mmio.c
hw/display/vga-pci.c
hw/display/vhost-user-gpu.c
hw/display/virtio-gpu-gl.c
hw/display/virtio-gpu-pci.c
hw/display/virtio-gpu-rutabaga.c
hw/display/virtio-gpu.c
hw/display/virtio-vga.c
hw/display/vmware_vga.c
hw/display/xlnx_dp.c

index 5790b7a64edd929184787b3ad75f998db4b77b60..49deed328d9070829ec8152f9d644cf7caf101dc 100644 (file)
@@ -1474,7 +1474,7 @@ static const VMStateDescription vmstate_artist = {
     }
 };
 
-static Property artist_properties[] = {
+static const Property artist_properties[] = {
     DEFINE_PROP_UINT16("width",        ARTISTState, width, 1280),
     DEFINE_PROP_UINT16("height",       ARTISTState, height, 1024),
     DEFINE_PROP_UINT16("depth",        ARTISTState, depth, 8),
index 593a25328d57ccef562316651c54572ddf766f8f..e24e092bbc54938a2128ff50cbae1beff7c98e46 100644 (file)
@@ -1039,7 +1039,7 @@ static void ati_vga_exit(PCIDevice *dev)
     graphic_console_close(s->vga.con);
 }
 
-static Property ati_vga_properties[] = {
+static const Property ati_vga_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", ATIVGAState, vga.vram_size_mb, 16),
     DEFINE_PROP_STRING("model", ATIVGAState, model),
     DEFINE_PROP_UINT16("x-device-id", ATIVGAState, dev_id,
index 7005d5bfeaee923e9f33b3149e4223d74744525a..2539fcc8ab8b1c98d3aa8b7f3ee70cbb89b6eacf 100644 (file)
@@ -429,7 +429,7 @@ static void bcm2835_fb_realize(DeviceState *dev, Error **errp)
     qemu_console_resize(s->con, s->config.xres, s->config.yres);
 }
 
-static Property bcm2835_fb_props[] = {
+static const Property bcm2835_fb_props[] = {
     DEFINE_PROP_UINT32("vcram-base", BCM2835FBState, vcram_base, 0),/*required*/
     DEFINE_PROP_UINT32("vcram-size", BCM2835FBState, vcram_size,
                        DEFAULT_VCRAM_SIZE),
index 3b1d922b6eae6bb860d8bdbdc4fdca02038d76b7..9a3263aa016ee8b66d51a1904a81e1c3b47a6dab 100644 (file)
@@ -345,7 +345,7 @@ static void bochs_display_exit(PCIDevice *dev)
     graphic_console_close(s->con);
 }
 
-static Property bochs_display_properties[] = {
+static const Property bochs_display_properties[] = {
     DEFINE_PROP_SIZE("vgamem", BochsDisplayState, vgamem, 16 * MiB),
     DEFINE_PROP_BOOL("edid", BochsDisplayState, enable_edid, true),
     DEFINE_EDID_PROPERTIES(BochsDisplayState, edid_info),
index 95f8f98b993861a731450c49c13760c306516b0a..75b3312c245051e5961b1af72959a08128721d37 100644 (file)
@@ -361,7 +361,7 @@ static void cg3_reset(DeviceState *d)
     qemu_irq_lower(s->irq);
 }
 
-static Property cg3_properties[] = {
+static const Property cg3_properties[] = {
     DEFINE_PROP_UINT32("vram-size",    CG3State, vram_size, -1),
     DEFINE_PROP_UINT16("width",        CG3State, width,     -1),
     DEFINE_PROP_UINT16("height",       CG3State, height,    -1),
index 150883a97166a4d5fa876ee1f35517a633707490..198ed9ed9bee5f2a23f628eed01940104233b5fb 100644 (file)
@@ -2982,7 +2982,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp)
     }
 }
 
-static Property pci_vga_cirrus_properties[] = {
+static const Property pci_vga_cirrus_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
                        cirrus_vga.vga.vram_size_mb, 4),
     DEFINE_PROP_BOOL("blitter", struct PCICirrusVGAState,
index 84be51670ed8ad7b9942cb0ba5e0cbfaefa919d3..d0d134470faeb1f9ffa44f8512bda29d1338036b 100644 (file)
@@ -69,7 +69,7 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Error **errp)
     /* FIXME not qdev yet */
 }
 
-static Property isa_cirrus_vga_properties[] = {
+static const Property isa_cirrus_vga_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
                        cirrus_vga.vga.vram_size_mb, 4),
     DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState,
index f3d82498bfc9ccd5e93d4c4e94d5e19812943ec0..4f097a172c33845c5ea00072bcc296c51c38ba7e 100644 (file)
@@ -1925,7 +1925,7 @@ static const GraphicHwOps exynos4210_fimd_ops = {
     .gfx_update  = exynos4210_fimd_update,
 };
 
-static Property exynos4210_fimd_properties[] = {
+static const Property exynos4210_fimd_properties[] = {
     DEFINE_PROP_LINK("framebuffer-memory", Exynos4210fimdState, fbmem,
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_PROP_END_OF_LIST(),
index fa2f184908554e1a6a46f05e0f4f5a0ec5df5673..a7533c690828ff8a025e6c652dab29e24e9edc60 100644 (file)
@@ -512,7 +512,7 @@ static void g364fb_sysbus_reset(DeviceState *d)
     g364fb_reset(&s->g364);
 }
 
-static Property g364fb_sysbus_properties[] = {
+static const Property g364fb_sysbus_properties[] = {
     DEFINE_PROP_UINT32("vram_size", G364SysBusState, g364.vram_size, 8 * MiB),
     DEFINE_PROP_END_OF_LIST(),
 };
index 465b00355e1e80fd21678b29c5bbf2312200ea59..a2d1f2b044b219e42fbfe728a65b32984be5f2cc 100644 (file)
@@ -95,7 +95,7 @@ static const VMStateDescription vmstate_i2c_ddc = {
     }
 };
 
-static Property i2c_ddc_properties[] = {
+static const Property i2c_ddc_properties[] = {
     DEFINE_EDID_PROPERTIES(I2CDDCState, edid_info),
     DEFINE_PROP_END_OF_LIST(),
 };
index a5b4a499f3e4b376bc6e08b0c4ce2c71e30268a5..977901bfdd05a9b0d0e6ae79baef3dcce5221237 100644 (file)
@@ -758,7 +758,7 @@ static void macfb_nubus_reset(DeviceState *d)
     macfb_reset(&s->macfb);
 }
 
-static Property macfb_sysbus_properties[] = {
+static const Property macfb_sysbus_properties[] = {
     DEFINE_PROP_UINT32("width", MacfbSysBusState, macfb.width, 640),
     DEFINE_PROP_UINT32("height", MacfbSysBusState, macfb.height, 480),
     DEFINE_PROP_UINT8("depth", MacfbSysBusState, macfb.depth, 8),
@@ -777,7 +777,7 @@ static const VMStateDescription vmstate_macfb_sysbus = {
     }
 };
 
-static Property macfb_nubus_properties[] = {
+static const Property macfb_nubus_properties[] = {
     DEFINE_PROP_UINT32("width", MacfbNubusState, macfb.width, 640),
     DEFINE_PROP_UINT32("height", MacfbNubusState, macfb.height, 480),
     DEFINE_PROP_UINT8("depth", MacfbNubusState, macfb.depth, 8),
index 7f145bbdbab8f120762d1c999c0cd67868e13508..eca00b4279449a97d92bcd0a74f2c87ab6200cd9 100644 (file)
@@ -535,7 +535,7 @@ static const GraphicHwOps pl110_gfx_ops = {
     .gfx_update  = pl110_update_display,
 };
 
-static Property pl110_properties[] = {
+static const Property pl110_properties[] = {
     DEFINE_PROP_LINK("framebuffer-memory", PL110State, fbmem,
                      TYPE_MEMORY_REGION, MemoryRegion *),
     DEFINE_PROP_END_OF_LIST(),
index 0c4b1c9bf2b68a64e9842f36bb2972524928d852..949949d374bbfb8dbaf2d44be85e22877eccd6f5 100644 (file)
@@ -2458,7 +2458,7 @@ static const VMStateDescription qxl_vmstate = {
     }
 };
 
-static Property qxl_properties[] = {
+static const Property qxl_properties[] = {
         DEFINE_PROP_UINT32("ram_size", PCIQXLDevice, vga.vram_size, 64 * MiB),
         DEFINE_PROP_UINT64("vram_size", PCIQXLDevice, vram32_size, 64 * MiB),
         DEFINE_PROP_UINT32("revision", PCIQXLDevice, revision,
index 20eab34ff41112ea9ce38a41cd8477ca5cb47ac2..e677f44be680af8057e302634102d5b5556269e7 100644 (file)
@@ -60,7 +60,7 @@ static const VMStateDescription ramfb_dev_vmstate = {
     }
 };
 
-static Property ramfb_properties[] = {
+static const Property ramfb_properties[] = {
     DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate,  true),
     DEFINE_PROP_END_OF_LIST(),
 };
index 38d005c1682e5fa58afe985d4f9c81a88c03d8dd..446b648f1a4a927770bce73e6265a505f0394740 100644 (file)
@@ -2054,7 +2054,7 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp)
     /* TODO : chain irq to IRL */
 }
 
-static Property sm501_sysbus_properties[] = {
+static const Property sm501_sysbus_properties[] = {
     DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0),
     /* this a debug option, prefer PROP_UINT over PROP_BIT for simplicity */
     DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, DEFAULT_X_PIXMAN),
@@ -2143,7 +2143,7 @@ static void sm501_realize_pci(PCIDevice *dev, Error **errp)
                      &s->state.mmio_region);
 }
 
-static Property sm501_pci_properties[] = {
+static const Property sm501_pci_properties[] = {
     DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB),
     DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, DEFAULT_X_PIXMAN),
     DEFINE_PROP_END_OF_LIST(),
index f000288fcd3d5d91b68333102215b88c983cc00a..3eb0a91ff9cb17922ac4b1e7b00d647f50f4679e 100644 (file)
@@ -879,7 +879,7 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)
     qemu_console_resize(s->con, s->width, s->height);
 }
 
-static Property tcx_properties[] = {
+static const Property tcx_properties[] = {
     DEFINE_PROP_UINT32("vram_size", TCXState, vram_size, -1),
     DEFINE_PROP_UINT16("width",    TCXState, width,     -1),
     DEFINE_PROP_UINT16("height",   TCXState, height,    -1),
index c0256326350dc07ce8296f80f4794f2e10371d9e..a6cbf771031d14c61d82da92bfa8de016b8306bf 100644 (file)
@@ -88,7 +88,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
     rom_add_vga(VGABIOS_FILENAME);
 }
 
-static Property vga_isa_properties[] = {
+static const Property vga_isa_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8),
     DEFINE_PROP_END_OF_LIST(),
 };
index be33204517e7a6379b65c7b0da2fbee82db343bd..b759efdde752c4e69f432bdd46574daa24c912de 100644 (file)
@@ -111,7 +111,7 @@ static void vga_mmio_realizefn(DeviceState *dev, Error **errp)
     s->vga.con = graphic_console_init(dev, 0, s->vga.hw_ops, &s->vga);
 }
 
-static Property vga_mmio_properties[] = {
+static const Property vga_mmio_properties[] = {
     DEFINE_PROP_UINT8("it_shift", VGAMmioState, it_shift, 0),
     DEFINE_PROP_UINT32("vgamem_mb", VGAMmioState, vga.vram_size_mb, 8),
     DEFINE_PROP_END_OF_LIST(),
index 6b51019966e8f8a6f4443e9128cfb22e028c4f53..3145c448f5938c93fd8fc055adee71d3f170e0c5 100644 (file)
@@ -330,7 +330,7 @@ static void pci_secondary_vga_reset(DeviceState *dev)
     vga_common_reset(&d->vga);
 }
 
-static Property vga_pci_properties[] = {
+static const Property vga_pci_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
     DEFINE_PROP_BIT("mmio", PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_MMIO, true),
     DEFINE_PROP_BIT("qemu-extended-regs",
@@ -342,7 +342,7 @@ static Property vga_pci_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
-static Property secondary_pci_properties[] = {
+static const Property secondary_pci_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", PCIVGAState, vga.vram_size_mb, 16),
     DEFINE_PROP_BIT("qemu-extended-regs",
                     PCIVGAState, flags, PCI_VGA_FLAG_ENABLE_QEXT, true),
index 14548f1a577192e79a5d89cc0fd9a7280af961b6..a36eddcb12f371c142d0d66255b8772297c15a1b 100644 (file)
@@ -645,7 +645,7 @@ static struct vhost_dev *vhost_user_gpu_get_vhost(VirtIODevice *vdev)
     return g->vhost ? &g->vhost->dev : NULL;
 }
 
-static Property vhost_user_gpu_properties[] = {
+static const Property vhost_user_gpu_properties[] = {
     VIRTIO_GPU_BASE_PROPERTIES(VhostUserGPU, parent_obj.conf),
     DEFINE_PROP_END_OF_LIST(),
 };
index 7c0e448b4661badbba499da1ef178a226b250ef6..6f31149e1ee470e3d25bbe24322a4619908d1e84 100644 (file)
@@ -154,7 +154,7 @@ static void virtio_gpu_gl_device_realize(DeviceState *qdev, Error **errp)
     virtio_gpu_device_realize(qdev, errp);
 }
 
-static Property virtio_gpu_gl_properties[] = {
+static const Property virtio_gpu_gl_properties[] = {
     DEFINE_PROP_BIT("stats", VirtIOGPU, parent_obj.conf.flags,
                     VIRTIO_GPU_FLAG_STATS_ENABLED, false),
     DEFINE_PROP_BIT("venus", VirtIOGPU, parent_obj.conf.flags,
index da6a99f0380a582966fe0d9d0b1ae3cec8605d32..89d27c9d85c659aa88b508a283d9b3a421221725 100644 (file)
@@ -21,7 +21,7 @@
 #include "hw/virtio/virtio-gpu-pci.h"
 #include "qom/object.h"
 
-static Property virtio_gpu_pci_base_properties[] = {
+static const Property virtio_gpu_pci_base_properties[] = {
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
     DEFINE_PROP_END_OF_LIST(),
 };
index 17bf701a21634541d0e062c5835fb43a7133309c..f6486acddaeb59b64ddea37e77da9bc2ed83d6d7 100644 (file)
@@ -1096,7 +1096,7 @@ static void virtio_gpu_rutabaga_realize(DeviceState *qdev, Error **errp)
     virtio_gpu_device_realize(qdev, errp);
 }
 
-static Property virtio_gpu_rutabaga_properties[] = {
+static const Property virtio_gpu_rutabaga_properties[] = {
     DEFINE_PROP_BIT64("gfxstream-vulkan", VirtIOGPURutabaga, capset_mask,
                       RUTABAGA_CAPSET_GFXSTREAM_VULKAN, false),
     DEFINE_PROP_BIT64("cross-domain", VirtIOGPURutabaga, capset_mask,
index 7d22d03bbfa8e3541fa47ac57ec98a13e8656c12..82741d19e56ab3680012852f9b450fc0013deeb6 100644 (file)
@@ -1674,7 +1674,7 @@ static const VMStateDescription vmstate_virtio_gpu = {
     .post_load = virtio_gpu_post_load,
 };
 
-static Property virtio_gpu_properties[] = {
+static const Property virtio_gpu_properties[] = {
     VIRTIO_GPU_BASE_PROPERTIES(VirtIOGPU, parent_obj.conf),
     DEFINE_PROP_SIZE("max_hostmem", VirtIOGPU, conf_max_hostmem,
                      256 * MiB),
index 276f315108be30d4607e5db3daf6d78dc9ebf914..532e4c62d57b8f7bdd1adfceb39112df7bd7efc4 100644 (file)
@@ -209,7 +209,7 @@ static void virtio_vga_set_big_endian_fb(Object *obj, bool value, Error **errp)
     d->vga.big_endian_fb = value;
 }
 
-static Property virtio_vga_base_properties[] = {
+static const Property virtio_vga_base_properties[] = {
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
     DEFINE_PROP_END_OF_LIST(),
 };
index f2d72c3fc7c11f971a564fc47f11873fcde1aa44..f49bbf393a1d12a96dde25cb08732f7f252faee1 100644 (file)
@@ -1332,7 +1332,7 @@ static void pci_vmsvga_realize(PCIDevice *dev, Error **errp)
                      &s->chip.fifo_ram);
 }
 
-static Property vga_vmware_properties[] = {
+static const Property vga_vmware_properties[] = {
     DEFINE_PROP_UINT32("vgamem_mb", struct pci_vmsvga_state_s,
                        chip.vga.vram_size_mb, 16),
     DEFINE_PROP_BOOL("global-vmstate", struct pci_vmsvga_state_s,
index 6ab2335499d7cc5cf91f035dddfd7cbce600ec4d..7838f28bcad0f51af4f197cdb369d52bb485d0b8 100644 (file)
@@ -1387,7 +1387,7 @@ static void xlnx_dp_reset(DeviceState *dev)
     xlnx_dp_update_irq(s);
 }
 
-static Property xlnx_dp_device_properties[] = {
+static const Property xlnx_dp_device_properties[] = {
     DEFINE_AUDIO_PROPERTIES(XlnxDPState, aud_card),
     DEFINE_PROP_END_OF_LIST(),
 };