drm/cirrus: rewrite and modernize driver.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 5 Apr 2019 09:52:19 +0000 (11:52 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 8 Apr 2019 04:59:27 +0000 (06:59 +0200)
commitab3e023b1b4c9887c9f0f761b47f3f0516bd3434
tree2988c8484aa74bd0c72365028237cd145be531d8
parentec3de7a43e9cac8a2dc1fce069321cb9538f0b34
drm/cirrus: rewrite and modernize driver.

Time to kill some bad sample code people are copying from ;)

This is a complete rewrite of the cirrus driver.  The cirrus_mode_set()
function is pretty much the only function which is carried over largely
unmodified.  Everything else is upside down.

It is a single monster patch.  But given that it does some pretty
fundamental changes to the drivers workflow and also reduces the code
size by roughly 70% I think it'll still be alot easier to review than a
longish baby-step patch series.

Changes summary:
 - Given the small amout of video memory (4 MB) the cirrus device has
   the rewritten driver doesn't try to manage buffers there.  Instead
   it will blit (memcpy) the active framebuffer to video memory.
 - All gem objects are stored in main memory and are manged using the
   new shmem helpers.  ttm is out.
 - It supports RG16, RG24 and XR24 formats.  XR24 gets converted to RG24
   or RG16 at blit time if needed, to avoid the pitch becoming larger
   than what the cirrus hardware can handle.
 - The simple display pipeline is used.
 - The generic fbdev emulation is used.
 - It's a atomic driver now.
 - It runs wayland.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190405095219.9231-6-kraxel@redhat.com
drivers/gpu/drm/cirrus/Kconfig
drivers/gpu/drm/cirrus/Makefile
drivers/gpu/drm/cirrus/cirrus.c [new file with mode: 0644]
drivers/gpu/drm/cirrus/cirrus_drv.c [deleted file]
drivers/gpu/drm/cirrus/cirrus_drv.h [deleted file]
drivers/gpu/drm/cirrus/cirrus_fbdev.c [deleted file]
drivers/gpu/drm/cirrus/cirrus_main.c [deleted file]
drivers/gpu/drm/cirrus/cirrus_mode.c [deleted file]
drivers/gpu/drm/cirrus/cirrus_ttm.c [deleted file]