Patchwork [04/17] hw/arm_sysctl: Implement SYS_CFG_DVIMODE as a no-op

login
register
mail settings
Submitter Peter Maydell
Date March 15, 2013, 4:56 p.m.
Message ID <1363366599-24238-5-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/228107/
State New
Headers show

Comments

Peter Maydell - March 15, 2013, 4:56 p.m.
SYS_CFG_DVIMODE allows the guest to select whether the
output DVI signal is VGA, SVGA, XGA, SGA or UXGA. Since
this makes no difference to QEMU, implement writes as a
no-op so Linux doesn't complain.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/arm_sysctl.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index a6e5ed4..840bfad 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -295,6 +295,14 @@  static bool vexpress_cfgctrl_write(arm_sysctl_state *s, unsigned int dcc,
             return true;
         }
         break;
+    case SYS_CFG_DVIMODE:
+        if (site == SYS_CFG_SITE_MB && device == 0) {
+            /* Selecting DVI mode is meaningless for QEMU: we will
+             * always display the output correctly according to the
+             * pixel height/width programmed into the CLCD controller.
+             */
+            return true;
+        }
     default:
         break;
     }