aboutsummaryrefslogtreecommitdiff
path: root/include/hw/display
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-01-30 13:00:05 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-02-01 11:58:50 +0100
commit70cc0c1fb0b7b7bc185ca4a233e215ef44f35913 (patch)
treee27600fffa8afa5da73c536cd1d63c6b80f8023d /include/hw/display
parent57d434407adc967a696d7afad0cc32f8f7eb4a4f (diff)
downloadqemu-70cc0c1fb0b7b7bc185ca4a233e215ef44f35913.zip
qemu-70cc0c1fb0b7b7bc185ca4a233e215ef44f35913.tar.gz
qemu-70cc0c1fb0b7b7bc185ca4a233e215ef44f35913.tar.bz2
hw/display/milkymist-tmu2: Move inlined code from header to source
Move the complexity of milkymist_tmu2_create() into the source file. Doing so we avoid to include the X11/OpenGL headers in all LM32 devices, and we also avoid the duplicate declaration of glx_fbconfig_attr[] (it is already declared in hw/display/milkymist-tmu2.c). Since TYPE_MILKYMIST_TMU2 is now accessible, use it. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190130120005.23123-5-philmd@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/hw/display')
-rw-r--r--include/hw/display/milkymist_tmu2.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/hw/display/milkymist_tmu2.h b/include/hw/display/milkymist_tmu2.h
new file mode 100644
index 0000000..148a119
--- /dev/null
+++ b/include/hw/display/milkymist_tmu2.h
@@ -0,0 +1,41 @@
+/*
+ * QEMU model of the Milkymist texture mapping unit.
+ *
+ * Copyright (c) 2010 Michael Walle <michael@walle.cc>
+ * Copyright (c) 2010 Sebastien Bourdeauducq
+ * <sebastien.bourdeauducq@lekernel.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ * Specification available at:
+ * http://milkymist.walle.cc/socdoc/tmu2.pdf
+ *
+ */
+
+#ifndef HW_DISPLAY_MILKYMIST_TMU2_H
+#define HW_DISPLAY_MILKYMIST_TMU2_H
+
+#include "hw/qdev.h"
+
+#if defined(CONFIG_X11) && defined(CONFIG_OPENGL)
+DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq);
+#else
+static inline DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq)
+{
+ return NULL;
+}
+#endif
+
+#endif /* HW_DISPLAY_MILKYMIST_TMU2_H */