diff mbox

[v2,7/9] hw/vexpress.c: Instantiate the motherboard CLCD

Message ID 1327408760-3666-8-git-send-email-peter.maydell@linaro.org
State Superseded
Headers show

Commit Message

Peter Maydell Jan. 24, 2012, 12:39 p.m. UTC
Instantiate the CLCD on the vexpress motherboard as well as one on
the daughterboard -- the A15 daughterboard does not have a CLCD
and so relies on the motherboard one.

At the moment QEMU doesn't provide infrastructure for selecting
which display device gets to actually show graphics -- the first
one registered is it. Fortunately this works for the major use
case (Linux): if the daughterboard has a CLCD it will come first
and be used, otherwise we fall back to the motherboard CLCD.
So we don't (currently) need to implement the control register
which allows software to tell the mux which video output to pass
through to the outside world.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/vexpress.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Andreas Färber Jan. 25, 2012, 6:28 p.m. UTC | #1
Am 24.01.2012 13:39, schrieb Peter Maydell:
> Instantiate the CLCD on the vexpress motherboard as well as one on
> the daughterboard -- the A15 daughterboard does not have a CLCD
> and so relies on the motherboard one.
> 
> At the moment QEMU doesn't provide infrastructure for selecting
> which display device gets to actually show graphics -- the first
> one registered is it. Fortunately this works for the major use
> case (Linux): if the daughterboard has a CLCD it will come first
> and be used, otherwise we fall back to the motherboard CLCD.
> So we don't (currently) need to implement the control register
> which allows software to tell the mux which video output to pass
> through to the outside world.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Andreas Färber <afaerber@suse.de>

I do hope we find a solution to deal with n displays in the future. I
consider that a post-QOM topic and maybe Anthony's planned DisplayState
refactoring helps with that.

The Origen Board has (provisions for) an LCD in addition to HDMI output,
for instance.

Andreas
Paul Brook Feb. 10, 2012, 2:51 a.m. UTC | #2
> I do hope we find a solution to deal with n displays in the future. I
> consider that a post-QOM topic and maybe Anthony's planned DisplayState
> refactoring helps with that.

It used to work.  Not particularly pretty or user friendly, but definitely 
functional.  I put a fair amount of effort into making DisplayState support 
this the first time round :-)

I think the mips jazz board is currently the only board that actually has 
multiple displays.  I used it with a simple custom PCI display device.
The VGA devices hardcode a particular ISA port range, so multiple instances 
don't get along well.

Paul
Peter Maydell Feb. 15, 2012, 1:36 p.m. UTC | #3
On 10 February 2012 02:51, Paul Brook <paul@codesourcery.com> wrote:
>> I do hope we find a solution to deal with n displays in the future. I
>> consider that a post-QOM topic and maybe Anthony's planned DisplayState
>> refactoring helps with that.
>
> It used to work.  Not particularly pretty or user friendly, but definitely
> functional.  I put a fair amount of effort into making DisplayState support
> this the first time round :-)

Yes, it looks like the console.c code mostly supports this, but at the
moment vl.c calls get_displaystate() which just returns the first registered
DisplayState, and that is the one which gets passed to sdl_display_init()
and friends.

-- PMM
diff mbox

Patch

diff --git a/hw/vexpress.c b/hw/vexpress.c
index 9033b50..9860085 100644
--- a/hw/vexpress.c
+++ b/hw/vexpress.c
@@ -282,7 +282,7 @@  static void vexpress_common_init(const VEDBoardInfo *daughterboard,
 
     /* VE_COMPACTFLASH: not modelled */
 
-    /* VE_CLCD: not modelled (we use the daughterboard CLCD only) */
+    sysbus_create_simple("pl111", map[VE_CLCD], pic[14]);
 
     /* VE_NORFLASH0: not modelled */
     /* VE_NORFLASH0ALIAS: not modelled */