Skip to content

Commit

Permalink
drm/ast: Set up fbdev after registering device; remove error checks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Zimmermann committed Apr 8, 2020
1 parent 3dba4e1 commit a4cbf26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/ast/ast_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <drm/drm_crtc_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_gem_vram_helper.h>
#include <drm/drm_probe_helper.h>

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

drm_fbdev_generic_setup(dev, 32);

return 0;

err_ast_driver_unload:
Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/drm/ast/ast_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_gem.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_vram_helper.h>
Expand Down Expand Up @@ -512,10 +511,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)

drm_mode_config_reset(dev);

ret = drm_fbdev_generic_setup(dev, 32);
if (ret)
goto out_free;

return 0;
out_free:
kfree(ast);
Expand Down

0 comments on commit a4cbf26

Please sign in to comment.