Message ID | 20230901163944.RFT.4.I4752a39ad9f8fd08b32c2b78a8a3e40491bfb5eb@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: drm-misc drivers call drm_atomic_helper_shutdown() at the right times | expand |
On Fri, 1 Sep 2023 16:39:55 -0700, Douglas Anderson wrote: > Based on grepping through the source code, this driver appears to be > missing a call to drm_atomic_helper_shutdown() at remove time. Let's > add it. > > The fact that we should call drm_atomic_helper_shutdown() in the case > > [ ... ] Acked-by: Maxime Ripard <mripard@kernel.org> Thanks! Maxime
Hi, On Fri, Sep 1, 2023 at 4:40 PM Douglas Anderson <dianders@chromium.org> wrote: > > Based on grepping through the source code, this driver appears to be > missing a call to drm_atomic_helper_shutdown() at remove time. Let's > add it. > > The fact that we should call drm_atomic_helper_shutdown() in the case > of OS driver remove comes straight out of the kernel doc "driver > instance overview" in drm_drv.c. > > Suggested-by: Maxime Ripard <mripard@kernel.org> > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- > This commit is only compile-time tested. > > NOTE: I'm not 100% sure this is the correct thing to do, but I _think_ > so. Please shout if you know better. > > drivers/gpu/drm/solomon/ssd130x.c | 1 + > 1 file changed, 1 insertion(+) Landed this to drm-misc-next. Since I wasn't 100% sure, if someone finds that this is bad after-the-fact, we can certainly revert. 10c8204c8b17 drm/ssd130x: Call drm_atomic_helper_shutdown() at remove time
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index 5a80b228d18c..dc06fd82fd30 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -1131,6 +1131,7 @@ EXPORT_SYMBOL_GPL(ssd130x_probe); void ssd130x_remove(struct ssd130x_device *ssd130x) { drm_dev_unplug(&ssd130x->drm); + drm_atomic_helper_shutdown(&ssd130x->drm); } EXPORT_SYMBOL_GPL(ssd130x_remove);
Based on grepping through the source code, this driver appears to be missing a call to drm_atomic_helper_shutdown() at remove time. Let's add it. The fact that we should call drm_atomic_helper_shutdown() in the case of OS driver remove comes straight out of the kernel doc "driver instance overview" in drm_drv.c. Suggested-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> --- This commit is only compile-time tested. NOTE: I'm not 100% sure this is the correct thing to do, but I _think_ so. Please shout if you know better. drivers/gpu/drm/solomon/ssd130x.c | 1 + 1 file changed, 1 insertion(+)