Skip to content

Commit a4cbf26

Browse files
committed
drm/ast: Set up fbdev after registering device; remove error checks
Generic fbdev support is a DRM client. Set it up after registering the new DRM device. Remove the error checks as the driver's probe function should not depend on a DRM client's state. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-2-tzimmermann@suse.de
1 parent 3dba4e1 commit a4cbf26

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/gpu/drm/ast/ast_drv.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include <drm/drm_crtc_helper.h>
3434
#include <drm/drm_drv.h>
35+
#include <drm/drm_fb_helper.h>
3536
#include <drm/drm_gem_vram_helper.h>
3637
#include <drm/drm_probe_helper.h>
3738

@@ -111,6 +112,8 @@ static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
111112
if (ret)
112113
goto err_ast_driver_unload;
113114

115+
drm_fbdev_generic_setup(dev, 32);
116+
114117
return 0;
115118

116119
err_ast_driver_unload:

‎drivers/gpu/drm/ast/ast_main.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#include <drm/drm_atomic_helper.h>
3232
#include <drm/drm_crtc_helper.h>
33-
#include <drm/drm_fb_helper.h>
3433
#include <drm/drm_gem.h>
3534
#include <drm/drm_gem_framebuffer_helper.h>
3635
#include <drm/drm_gem_vram_helper.h>
@@ -512,10 +511,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
512511

513512
drm_mode_config_reset(dev);
514513

515-
ret = drm_fbdev_generic_setup(dev, 32);
516-
if (ret)
517-
goto out_free;
518-
519514
return 0;
520515
out_free:
521516
kfree(ast);

0 commit comments

Comments
 (0)