dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Maxime Ripard <mripard@kernel.org>
Cc: jfalempe@redhat.com, javierm@redhat.com,
	dri-devel@lists.freedesktop.org, mairacanal@riseup.net,
	noralf@tronnes.org, jose.exposito89@gmail.com,
	arthurgrillo@riseup.net
Subject: Re: [PATCH v5 0/7] drm: Reuse temporary memory for format conversion
Date: Fri, 17 Nov 2023 11:07:50 +0100	[thread overview]
Message-ID: <e445fb5d-0cdd-4ba0-aafd-1f025bcca30b@suse.de> (raw)
In-Reply-To: <skb2mpjs5hawsl4daczcunfplds65uj762vdpcvp3lurrldxdb@e65uaawi2kpu>


[-- Attachment #1.1: Type: text/plain, Size: 2486 bytes --]

Hi

Am 17.11.23 um 10:34 schrieb Maxime Ripard:
> 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.

My apologies. From my point of view, that conversion had ended. I left 
the patch set for a while to wait for further comments or questions, but 
nothing happened. So I merged it.

Revert it if you cannot live with the changes. IIRC you found the 
reduced number of alloc/free cycles to be irrelevant. But even then, the 
patches allow us to move the allocation from atomic_update to 
atomic_check, thus detecting allocation failures early. That's an 
improvement to me.

Best regards
Thomas

> 
> Maxime

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-11-17 10:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 14:06 [PATCH v5 0/7] drm: Reuse temporary memory for format conversion Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 1/7] drm/format-helper: Cache buffers with struct drm_format_conv_state Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 2/7] drm/atomic-helper: Add format-conversion state to shadow-plane state Thomas Zimmermann
2023-10-09 14:22   ` Javier Martinez Canillas
2023-10-10  9:40     ` Maxime Ripard
2023-10-10 11:01       ` Javier Martinez Canillas
2023-10-09 14:06 ` [PATCH v5 3/7] drm/format-helper: Pass format-conversion state to helpers Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 4/7] drm/ofdrm: Preallocate format-conversion buffer in atomic_check Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 5/7] drm/simpledrm: " Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 6/7] drm/ssd130x: Fix atomic_check for disabled planes Thomas Zimmermann
2023-10-13 17:16   ` Javier Martinez Canillas
2023-10-16 10:24     ` Thomas Zimmermann
2023-10-09 14:06 ` [PATCH v5 7/7] drm/ssd130x: Preallocate format-conversion buffer in atomic_check Thomas Zimmermann
2023-11-17  9:34 ` [PATCH v5 0/7] drm: Reuse temporary memory for format conversion Maxime Ripard
2023-11-17 10:07   ` Thomas Zimmermann [this message]
2023-11-17 10:44     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e445fb5d-0cdd-4ba0-aafd-1f025bcca30b@suse.de \
    --to=tzimmermann@suse.de \
    --cc=arthurgrillo@riseup.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jfalempe@redhat.com \
    --cc=jose.exposito89@gmail.com \
    --cc=mairacanal@riseup.net \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox