diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2019-07-03 10:58:27 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2019-07-09 11:25:12 +0300 |
commit | 8a99de3dc0dd417e1f46c8e27e63b1363ecfb969 (patch) | |
tree | 501dc273e7e642745241713ae68f9939e92fddab /drivers/gpu/drm/ast/ast_drv.c | |
parent | f458579ede0b721418f7fc9f0eb624ca058ea0ea (diff) | |
download | linux-8a99de3dc0dd417e1f46c8e27e63b1363ecfb969.tar.xz |
drm/ast: Replace struct ast_fbdev with generic framebuffer emulation
This patch replaces ast's framebuffer console with DRM's generic
implememtation. All respective code is being removed from the driver.
The console is set up with a shadow buffer. The actual buffer object is
not permanently pinned in video ram, but just another buffer object that
the driver moves in and out of vram as necessary. The driver's function
ast_crtc_do_set_base() used to contain special handling for the framebuffer
console. With the new generic framebuffer, the driver does not need this
code an longer.
v2:
* use drm_fb_helper_set_suspend_unlocked() in ast_drm_{thaw,freeze}()
* dirty function no longer required
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/315835/
Diffstat (limited to 'drivers/gpu/drm/ast/ast_drv.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_drv.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 3811997e78c4..2c977d0ac8fe 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c @@ -100,28 +100,21 @@ ast_pci_remove(struct pci_dev *pdev) static int ast_drm_freeze(struct drm_device *dev) { drm_kms_helper_poll_disable(dev); - pci_save_state(dev->pdev); + drm_fb_helper_set_suspend_unlocked(dev->fb_helper, true); - console_lock(); - ast_fbdev_set_suspend(dev, 1); - console_unlock(); return 0; } static int ast_drm_thaw(struct drm_device *dev) { - int error = 0; - ast_post_gpu(dev); drm_mode_config_reset(dev); drm_helper_resume_force_mode(dev); + drm_fb_helper_set_suspend_unlocked(dev->fb_helper, false); - console_lock(); - ast_fbdev_set_suspend(dev, 0); - console_unlock(); - return error; + return 0; } static int ast_drm_resume(struct drm_device *dev) |