Marc Zyngier
fa62ee2528
drm/meson: Free RDMA resources after tearing down DRM
Removing the meson DRM module results in the following splat:
[ 2179.451346] Hardware name: , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
[ 2179.458316] Workqueue: events drm_mode_rmfb_work_fn [drm]
[ 2179.463597] pstate: 80c00009 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
[ 2179.469558] pc : meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
[ 2179.475243] lr : meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
[ 2179.480930] sp : ffffffc01212bb70
[ 2179.484207] x29: ffffffc01212bb70 x28: ffffff8044f66f00
[ 2179.489469] x27: ffffff8045b13800 x26: 0000000000000001
[ 2179.494730] x25: 0000000000000000 x24: 0000000000000001
[ 2179.499991] x23: 0000000000000000 x22: 0000000000000000
[ 2179.505252] x21: 0000000000280000 x20: 0000000000001a01
[ 2179.510513] x19: ffffff8046029480 x18: 0000000000000000
[ 2179.515775] x17: 0000000000000000 x16: 0000000000000000
[ 2179.521036] x15: 0000000000000000 x14: 0000000000000000
[ 2179.526297] x13: 0040000000000326 x12: 0309030303260300
[ 2179.531558] x11: 03000000054004a0 x10: 0418054004000400
[ 2179.536820] x9 : ffffffc008fe4914 x8 : ffffff8040a1adc0
[ 2179.542081] x7 : 0000000000000000 x6 : ffffff8042aa0080
[ 2179.547342] x5 : ffffff8044f66f00 x4 : ffffffc008fe5bc8
[ 2179.552603] x3 : 0000000000010101 x2 : 0000000000000001
[ 2179.557865] x1 : 0000000000000000 x0 : 0000000000000000
[ 2179.563127] Call trace:
[ 2179.565548] meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
[ 2179.570894] meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
[ 2179.576241] meson_plane_atomic_disable+0x38/0xb0 [meson_drm]
[ 2179.581966] drm_atomic_helper_commit_planes+0x1e0/0x21c [drm_kms_helper]
[ 2179.588684] drm_atomic_helper_commit_tail_rpm+0x68/0xb0 [drm_kms_helper]
[ 2179.595410] commit_tail+0xac/0x190 [drm_kms_helper]
[ 2179.600326] drm_atomic_helper_commit+0x16c/0x390 [drm_kms_helper]
[ 2179.606484] drm_atomic_commit+0x58/0x70 [drm]
[ 2179.610880] drm_framebuffer_remove+0x398/0x434 [drm]
[ 2179.615881] drm_mode_rmfb_work_fn+0x68/0x8c [drm]
[ 2179.620575] process_one_work+0x1cc/0x49c
[ 2179.624538] worker_thread+0x200/0x444
[ 2179.628246] kthread+0x14c/0x160
[ 2179.631439] ret_from_fork+0x10/0x38
caused by the fact that the RDMA buffer has already been freed,
resulting in meson_rdma_writel_sync() getting a NULL pointer.
Move the afbcd reset and meson_rdma_free calls after the DRM
unregistration is complete so that the teardown can safely complete.
Fixes: d1b5e41e13 ("drm/meson: Add AFBCD module driver")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-2-maz@kernel.org
2020-11-17 14:47:08 +01:00
..
2020-10-30 16:31:20 +01:00
2020-10-17 15:05:30 -06:00
2020-10-30 14:51:01 -07:00
2020-09-28 16:03:30 -07:00
2020-11-02 18:14:07 +01:00
2020-10-01 16:23:50 +03:00
2020-11-06 09:36:42 -07:00
2020-10-30 16:57:41 -05:00
2020-10-24 10:39:22 -07:00
2020-11-06 18:21:08 +02:00
2020-10-25 14:51:49 -07:00
2020-10-25 14:51:49 -07:00
2020-09-29 17:27:08 +01:00
2020-10-29 14:07:30 +01:00
2020-10-16 12:21:15 -07:00
2020-10-28 11:41:15 -06:00
2020-10-19 14:28:30 -07:00
2020-09-29 17:50:10 +09:00
2020-10-28 19:12:03 +01:00
2020-11-05 17:09:18 +01:00
2020-10-12 13:26:49 -07:00
2020-09-30 00:40:06 +09:00
2020-10-26 12:40:02 +01:00
2020-10-14 15:56:58 -07:00
2020-11-17 14:47:08 +01:00
2020-10-23 16:16:31 -07:00
2020-11-05 11:32:03 -08:00
2020-10-24 10:33:08 -07:00
2020-10-29 20:10:25 +01:00
2020-11-06 16:02:00 +01:00
2020-10-17 11:01:01 -07:00
2020-10-13 12:12:44 -07:00
2020-10-27 19:03:53 +01:00
2020-10-23 10:54:13 -07:00
2020-11-05 11:25:02 -08:00
2020-10-25 10:59:34 -07:00
2020-10-27 16:01:22 +02:00
2020-11-10 14:36:36 +01:00
2020-11-08 09:52:57 -08:00
2020-10-07 12:02:58 +02:00
2020-10-16 09:28:45 -06:00
2020-10-16 12:21:15 -07:00
2020-10-24 10:39:22 -07:00
2020-10-14 15:05:38 -07:00
2020-11-04 11:49:10 +10:00
2020-10-24 10:39:22 -07:00
2020-09-28 12:17:36 +02:00
2020-10-26 16:57:18 -04:00
2020-10-14 15:56:58 -07:00
2020-11-04 11:49:10 +10:00
2020-10-30 11:04:11 -07:00
2020-10-30 18:24:51 +01:00
2020-11-06 11:50:28 -08:00
2020-10-20 10:36:41 -07:00
2020-10-25 11:12:31 -07:00
2020-10-13 18:38:28 -07:00
2020-11-05 07:10:50 -07:00
2020-09-27 14:25:48 +02:00
2020-11-02 09:32:46 -08:00
2020-10-27 13:21:03 +05:30
2020-10-06 07:07:03 +02:00
2020-11-04 13:55:30 -06:00
2020-10-01 22:30:07 +01:00
2020-10-22 12:41:00 -07:00
2020-10-14 15:25:04 -07:00
2020-10-23 16:16:31 -07:00
2020-10-27 19:23:04 +01:00
2020-10-24 10:33:08 -07:00
2020-11-02 18:04:34 +01:00
2020-10-24 10:33:08 -07:00
2020-10-16 11:11:22 -07:00
2020-09-25 19:05:31 +02:00
2020-11-03 13:19:01 +00:00
2020-10-22 12:56:33 -07:00
2020-10-24 10:39:22 -07:00
2020-10-22 12:58:21 -07:00
2020-10-21 11:22:08 -07:00
2020-11-03 15:12:16 +01:00
2020-11-06 15:24:12 -08:00
2020-09-25 14:41:51 +02:00
2020-10-29 22:13:38 +01:00
2020-10-01 22:59:55 +02:00
2020-11-06 11:23:26 +00:00
2020-11-05 17:08:43 +01:00
2020-10-29 17:22:59 -05:00
2020-10-26 10:55:56 +01:00
2020-10-25 14:51:49 -07:00
2020-09-30 09:42:36 +02:00
2020-11-08 11:28:08 -08:00
2020-11-16 16:31:09 +01:00
2020-10-31 14:41:48 -07:00
2020-11-03 11:07:40 -07:00
2020-10-30 04:02:53 -04:00
2020-11-17 11:00:43 +01:00
2020-10-02 11:36:13 +02:00
2020-10-23 11:00:57 -07:00
2020-10-05 14:49:24 +02:00
2020-10-24 10:33:08 -07:00
2020-10-25 10:55:35 -07:00