Re: [PATCH drm-misc-next v2 2/4] drm/vc4: plane: protect device resources after removal

From: Danilo Krummrich
Date: Wed Aug 24 2022 - 11:58:54 EST


Hi Maxime,

On 8/24/22 17:48, Maxime Ripard wrote:
@@ -1252,12 +1261,17 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)
WARN_ON_ONCE(plane->state->crtc_x < 0 || plane->state->crtc_y < 0);
addr = bo->dma_addr + fb->offsets[0];
+ if (!drm_dev_enter(plane->dev, &idx))
+ return;
+
/* Write the new address into the hardware immediately. The
* scanout will start from this address as soon as the FIFO
* needs to refill with pixels.
*/
writel(addr, &vc4_state->hw_dlist[vc4_state->ptr0_offset]);
+ drm_dev_exit(idx);
+

You did change the CRTC patch, but the comment to protect the entire
function also applies to this one.

Yes, I changed this one too, but missed this particular function - gonna send a v3.

- Danilo


Maxime