[PATCH] drm: Add a driver for kvm emulated Cirrus

Matt Turner mattst88 at gmail.com
Mon Apr 18 13:26:45 PDT 2011


On Mon, Apr 18, 2011 at 4:04 PM, Matthew Garrett <mjg at redhat.com> wrote:
> qemu-kvm emulates a Cirrus GPU, including its acceleration engine. We
> typically then run a Cirrus-specific X driver on top of this, which
> turns requests into commands and sends them to the emulated accelerator.
> This all seems to be unnecessary overhead given that we're just going
> to end up writing to memory from the host instead, and performance is
> almost certainly going to be better using an unaccelerated framebuffer
> and a guest-side shadow.
>
> This patch provides a simple modesetting-only KMS driver for the hardware
> emulated in qemu-kvm. It's stripped down to the point where it's able to
> program the emulation, but would almost certainly fail miserably if asked
> to run on real hardware. It's intended to reduce virt overhead slightly,
> but also to serve as a template to writing a basic KMS driver.
>
> The code and structure are heavily derived from Matt Turner's glint
> driver, with the modesetting code cribbed from cirrusfb (hence the
> license).

Nice!

> +#define CIRRUS_DPMS_CLEARED (-1)

I wanted to add a DPMS_CLEARED to DRM, since it's duplicated in at
least Nouveau, glint, and now cirrusfb. I guess we should fix that at
some point.

The only other nit-pick I've got is that I named variables gfb and
gfbdev because I'm uncreative with variable names and because glint
started with a 'g'. Not important though.

Thanks, I'll have to give it a try. Please have a

Reviewed-by: Matt Turner <mattst88 at gmail.com>

Matt


More information about the dri-devel mailing list