qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 1/7] hw/display/sm501: Add debug property to control pixma


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v9 1/7] hw/display/sm501: Add debug property to control pixman usage
Date: Tue, 7 Mar 2023 16:11:37 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 7/3/23 12:42, BALATON Zoltan wrote:
Add a property to allow disabling pixman and always use the fallbacks
for different operations which is useful for testing different drawing
methods or debugging pixman related issues.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Tested-by: Rene Engel <ReneEngel80@emailn.de>
---
  hw/display/sm501.c | 18 +++++++++++++++---
  1 file changed, 15 insertions(+), 3 deletions(-)


  static Property sm501_sysbus_properties[] = {
      DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0),
+    DEFINE_PROP_UINT8("x-pixman", SM501SysBusState, state.use_pixman, 7),
      DEFINE_PROP_END_OF_LIST(),
  };
@@ -2122,6 +2126,7 @@ static void sm501_realize_pci(PCIDevice *dev, Error **errp) static Property sm501_pci_properties[] = {
      DEFINE_PROP_UINT32("vram-size", SM501PCIState, vram_size, 64 * MiB),
+    DEFINE_PROP_UINT8("x-pixman", SM501PCIState, state.use_pixman, 7),

FYI, alternatively:

DEFINE_PROP_BIT("x-pixman-fill", SM501PCIState, state.use_pixman, 0, 1),
DEFINE_PROP_BIT("x-pixman-blit", SM501PCIState, state.use_pixman, 1, 1),
DEFINE_PROP_BIT("x-pixman-overlap-blit", SM501PCIState,
                state.use_pixman, 2, 1),

      DEFINE_PROP_END_OF_LIST(),
  };
@@ -2162,11 +2167,18 @@ static void sm501_pci_class_init(ObjectClass *klass, void *data)
      dc->vmsd = &vmstate_sm501_pci;
  }
+static void sm501_pci_init(Object *o)
+{
+    object_property_set_description(o, "x-pixman", "Use pixman for: "
+                                    "1: fill, 2: blit, 4: overlap blit");
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]