Re: [drm/fb-helper] BUG: unable to handle kernel paging request at 95d24c70
From: Thierry Reding
Date: Fri Dec 19 2014 - 05:16:47 EST
On Thu, Dec 18, 2014 at 06:04:45PM -0800, Fengguang Wu wrote:
>
> Hi Thierry,
>
> FYI, here is another bisect result.
Thanks. Looking at the cirrus driver more closely it already employs the
big hammer upon failure and ends up calling drm_fb_helper_fini() via the
cirrus_driver_unload() call in cirrus_driver_load()'s cleanup path.
> commit 7bf2844ed14de049a4ccec26eb3d8b4c3d5c1971
> Author: Thierry Reding <treding@xxxxxxxxxx>
> AuthorDate: Wed Dec 17 16:39:59 2014 +0100
> Commit: Daniel Vetter <daniel.vetter@xxxxxxxx>
> CommitDate: Wed Dec 17 22:05:08 2014 +0100
>
> drm/fb-helper: Propagate errors from initial config failure
>
> Make drm_fb_helper_initial_config() return an int rather than a bool so
> that the error can be properly propagated. While at it, update drivers
> to propagate errors further rather than just ignore them.
>
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
> Cc: Rob Clark <robdclark@xxxxxxxxx>
> Cc: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: Christian KÃnig <christian.koenig@xxxxxxx>
> Cc: Ben Skeggs <bskeggs@xxxxxxxxxx>
> Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>
> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
Using the attached patch on top of this I can no longer reproduce either
this or the earlier result. I'll send a revised patch with this squashed
in.
Thanks,
Thierry
diff --git a/drivers/gpu/drm/cirrus/cirrus_fbdev.c b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
index 0682210b068b..f7e8c6530beb 100644
--- a/drivers/gpu/drm/cirrus/cirrus_fbdev.c
+++ b/drivers/gpu/drm/cirrus/cirrus_fbdev.c
@@ -318,26 +318,20 @@ int cirrus_fbdev_init(struct cirrus_device *cdev)
ret = drm_fb_helper_init(cdev->dev, &gfbdev->helper,
cdev->num_crtc, CIRRUSFB_CONN_LIMIT);
if (ret)
- goto free;
+ return ret;
ret = drm_fb_helper_single_add_all_connectors(&gfbdev->helper);
if (ret)
- goto fini;
+ return ret;
/* disable all the possible outputs/crtcs before entering KMS mode */
drm_helper_disable_unused_functions(cdev->dev);
ret = drm_fb_helper_initial_config(&gfbdev->helper, bpp_sel);
if (ret)
- goto fini;
+ return ret;;
return 0;
-
-free:
- kfree(gfbdev);
-fini:
- drm_fb_helper_fini(&gfbdev->helper);
- return ret;
}
void cirrus_fbdev_fini(struct cirrus_device *cdev)
Attachment:
pgpoGzF7Y7sXI.pgp
Description: PGP signature