Peter Maydell <[email protected]> writes: > On 22 February 2013 15:37, Anthony Liguori <[email protected]> wrote: >> I think what I'd prefer to do is add a parameter to >> graphics_console_init() for the name of the DisplayState. >> >> This will better support having multiple graphics tabs in the future. I >> can spin this patch later today unless you can do it sooner. > > I'm not sure this helps, since the thing that calls > graphics_console_init() is the actual graphics device model, > which isn't the thing that has useful labels to distinguish > multiple graphics cards in a single system. (Consider a PC > model with two cirrus cards plugged in: they'll both end > up named "VGA" or "Cirrus" or something unless there's > a lot more infrastructure for the board to be able to > configure the name somehow.)
They way I plan on doing it is simply making a NULL end up with 'video0' or something like that. For the video cards we emulate for the PC, I'll give them proper names. It's pretty handy to have a more specific name IMHO. I'd rather see 'Cirrus VGA' than 'video0'. Regards, Anthony Liguori > The right way to deal with this is for the video output to > be wired up from the graphics device to the UI via a QOM > connection of some kind. Then the thing doing the wiring > (the board model) could supply a suitable label when it did > so. > > That's a lot of effort to go to for a really minor thing, > though; I'd just call it "Graphics" or "Video" (and have > the UI layer add "(1)" "(2)" etc if there are multiple > displays). > > -- PMM
