From: Thomas Zimmermann <tzimmermann@suse.de>
To: noralf@tronnes.org, daniel@ffwll.ch, airlied@linux.ie,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
xinliang.liu@linaro.org, zourongrong@gmail.com,
john.stultz@linaro.org, kong.kongxinwei@hisilicon.com,
puck.chen@hisilicon.com, paul@crapouillou.net,
chunkuang.hu@kernel.org, p.zabel@pengutronix.de,
matthias.bgg@gmail.com, jsarha@ti.com, tomi.valkeinen@ti.com,
sean@poorly.run, hdegoede@redhat.com, kraxel@redhat.com,
emil.velikov@collabora.com, sam@ravnborg.org,
yc_chen@aspeedtech.com, tiantao6@hisilicon.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH v2 01/10] drm/ast: Set up fbdev after registering device; remove error checks
Date: Wed, 8 Apr 2020 10:26:32 +0200 [thread overview]
Message-ID: <20200408082641.590-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20200408082641.590-1-tzimmermann@suse.de>
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: Gerd Hoffmann <kraxel@redhat.com>
---
drivers/gpu/drm/ast/ast_drv.c | 3 +++
drivers/gpu/drm/ast/ast_main.c | 5 -----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c
index 30aa73a5d9b72..b7ba22dddcad9 100644
--- a/drivers/gpu/drm/ast/ast_drv.c
+++ b/drivers/gpu/drm/ast/ast_drv.c
@@ -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>
@@ -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:
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 18a0a4ce00f6e..e5398e3dabe70 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -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>
@@ -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);
--
2.26.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-08 8:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 8:26 [PATCH v2 00/10] Set up generic fbdev after registering device Thomas Zimmermann
2020-04-08 8:26 ` Thomas Zimmermann [this message]
2020-04-08 8:26 ` [PATCH v2 02/10] drm/hibmc: Remove error check from fbdev setup Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 03/10] drm/kirin: Set up fbdev after fully registering device Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 04/10] drm/ingenic: Remove error check from fbdev setup Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 05/10] drm/mediatek: " Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 06/10] drm/mgag200: Set up fbdev after registering device; remove error checks Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 07/10] drm/tilcdc: Set up fbdev after fully registering device Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 08/10] drm/udl: Remove error check from fbdev setup Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 09/10] drm/vboxvideo: Set up fbdev after registering device; remove error checks Thomas Zimmermann
2020-04-08 8:26 ` [PATCH v2 10/10] drm/fb-helper: Remove return value from drm_fbdev_generic_setup() Thomas Zimmermann
2020-04-08 8:50 ` Sam Ravnborg
2020-04-08 9:05 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200408082641.590-2-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=hdegoede@redhat.com \
--cc=john.stultz@linaro.org \
--cc=jsarha@ti.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=kraxel@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--cc=p.zabel@pengutronix.de \
--cc=paul@crapouillou.net \
--cc=puck.chen@hisilicon.com \
--cc=sam@ravnborg.org \
--cc=sean@poorly.run \
--cc=tiantao6@hisilicon.com \
--cc=tomi.valkeinen@ti.com \
--cc=xinliang.liu@linaro.org \
--cc=yc_chen@aspeedtech.com \
--cc=zourongrong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.