Commit 5e05be7
drm/msm/dsi: free TX buffer in unbind
If the drm/msm init code gets an error during output modeset
initialisation, the kernel will report an error regarding DRM memory
manager not being clean during shutdown. This is because
msm_dsi_modeset_init() allocates a piece of GEM memory for the TX
buffer, but destruction of the buffer happens only at
msm_dsi_host_destroy(), which is called during DSI driver's remove()
time, much later than the DRM MM shutdown.
To solve this issue, move the TX buffer destruction to dsi_unbind(), so
that the buffer is destructed at the correct time. Note, we also have to
store a reference to the address space, because priv->kms->aspace is
cleared before components are unbound.
Reported-by: Bjorn Andersson <andersson@kernel.org>
Fixes: 8f59ee9 ("drm/msm/dsi: Adjust probe order")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/562238/
Signed-off-by: Rob Clark <robdclark@chromium.org>1 parent 69b321b commit 5e05be7
3 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
1134 | 1135 | | |
1135 | 1136 | | |
1136 | 1137 | | |
| 1138 | + | |
| 1139 | + | |
1137 | 1140 | | |
1138 | | - | |
| 1141 | + | |
1139 | 1142 | | |
1140 | 1143 | | |
1141 | 1144 | | |
| |||
1164 | 1167 | | |
1165 | 1168 | | |
1166 | 1169 | | |
1167 | | - | |
| 1170 | + | |
1168 | 1171 | | |
| 1172 | + | |
1169 | 1173 | | |
1170 | | - | |
1171 | 1174 | | |
1172 | 1175 | | |
1173 | 1176 | | |
| |||
1178 | 1181 | | |
1179 | 1182 | | |
1180 | 1183 | | |
1181 | | - | |
1182 | 1184 | | |
1183 | | - | |
| 1185 | + | |
| 1186 | + | |
1184 | 1187 | | |
| 1188 | + | |
1185 | 1189 | | |
1186 | 1190 | | |
1187 | 1191 | | |
| |||
1967 | 1971 | | |
1968 | 1972 | | |
1969 | 1973 | | |
1970 | | - | |
1971 | 1974 | | |
1972 | 1975 | | |
1973 | 1976 | | |
| |||
0 commit comments