Thread (1 message) 1 message, 1 author, 2025-06-24

Re: [PATCH v2 04/16] drm/panel/sun4i: Keep up with refcounting

From: Maxime Ripard <mripard@kernel.org>
Date: 2025-06-24 08:53:05
Also in: dri-devel, linux-renesas-soc, linux-samsung-soc, linux-sunxi, linux-tegra, lkml

On Fri, Jun 20, 2025 at 03:54:10PM -0500, Anusha Srivatsa wrote:
On Fri, Jun 20, 2025 at 8:27 AM Maxime Ripard [off-list ref] wrote:
quoted
Hi,

On Thu, Jun 19, 2025 at 02:15:56PM -0500, Anusha Srivatsa wrote:
quoted
Put the panel reference back when driver is no
longer using it.

Signed-off-by: Anusha Srivatsa <redacted>
When I asked you to provide a rationale for why you think the
drm_panel_put() call belonged where it does, it was pretty obvious it
needed to be done for all patches with the same issue, not just a few
random ones.
Well, not totally random. THe intention was to specifically explain
the cases where the drm_panel_put() is part of a probe(), enable() or
attach() like function since that caused confusion in the last
version. There must have been misunderstanding on my end when I
thought only those cases needed additional explanation. I will make
the commit message more verbose.
Eventually, it's a memory management thing. You can't judge how a
driver, framework or function uses the memory from 3 lines of context.

This patch is a good example: it might make sense from the 3 lines of
context. But if you consider what this function is doing, and how it
uses the drm_panel pointer, what you did is broken.

Maxime

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help