qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/9] fbdev: add linux framebuffer display driver


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 4/9] fbdev: add linux framebuffer display driver.
Date: Mon, 24 Sep 2012 15:09:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120825 Thunderbird/10.0.7

On 09/24/12 13:06, Stefano Stabellini wrote:
> On Fri, 21 Sep 2012, Gerd Hoffmann wrote:
>>   Hi,
>>
>>>> +    case FB_ACQ_REQ:
>>>> +        fbdev_switch_acquire();
>>>> +        redraw_screen++;
>>>
>>> Rather than introducing redraw_screen, I would just call vga_hw_invalidate
>>> instead here. It is always a win if we can avoid to introduce one more
>>> state machine.
>>
>> Wouldn't that make the vga emulation do additional work which is simply
>> not needed?
> 
> It causes full_update to be set and that causes vga_draw_line to be
> called for every line on the screen.
> However in the important cases (32bpp and 16bpp) the buffer is shared
> and nothing happens. So no more work.

When looking at the code I feel again like this is one relict we should
just get rid of ...

The reason it exists in the first place seems to be console switching.
The qemu-internal one, via Ctrl-Alt-<nr>, to serial / monitor text
consoles.  In that case the vga emulation must be able to restore the
display, and vga_hw_invalidate will handle it.

That logic predates the display surfaces though.  I think today we could
just assign a displaysurface to each qemu console and be done with it.
Console switching will just switch display surfaces without any
re-rendering needed.  Likewise screendumping can stop hoping through all
the loops it hops today.

Any other vga_hw_invalidate calls creped in over time (ab-)use it to
kick a redraw in the ui code.  They kick the vga emulation for no
reason, there is nothing the vga emulation must redraw.

cheers,
  Gerd



reply via email to

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