[PATCH v5 0/7] drm: Reuse temporary memory for format conversion

Maxime Ripard mripard at kernel.org
Fri Nov 17 09:34:42 UTC 2023


On Mon, Oct 09, 2023 at 04:06:29PM +0200, Thomas Zimmermann wrote:
> DRM's format-conversion helpers require temporary memory. Pass the
> buffer from the caller to allow the caller to preallocate the buffer
> memory.
> 
> The motivation for this patchset is the recent work on a DRM panic
> handler. [1] The panic handler requires format conversion to display an
> error to the screen. But allocating memory during a kernel panic is
> fragile. The changes in this patchset enable the DRM panic handler to
> preallocate buffer storage before the panic occurs.
> 
> Patch 1 adds struct drm_format_conv_state, a simple interface to pass
> around the buffer storage. Patch 2 adds an instance of the struct to
> the shadow-plane state. Patch 3 moves the buffer's memory management
> from the format helpers into their callers within the DRM drivers. Most
> of the affected drivers use the state instance stored in their shadow-
> plane state. The shadow-plane code releases the buffer memory automatically.
> 
> Patches 4 to 7 update three drivers to pre-allocate the format-conversion
> buffer in their plane's atomic_check function. The drivers thus detect OOM
> errors before the display update begins.
> 
> Tested with simpledrm.

So, I just discovered that you merged that series.

You've complained before about "sneaking patches in", and while I was
disagreeing with you then, this particular instance is definitely a
strong case for it. You've merged it without telling anyone, and despite
our ongoing conversation on the v4 that was active more recently than
the v5. And that you never responded to.

Awesome.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20231117/5a9eb094/attachment.sig>


More information about the dri-devel mailing list