Re: [PATCH] media: venus: core: look up static codec nodes among children only

From: Andrey Derkach

Date: Sat Dec 05 2026 - 13:04:16 EST


On Mon, Sep 28, 2026 at 11:42:39PM +0200, David Heidelberg wrote:
> Use of_get_child_by_name(), which only looks at the direct children,
> where static codec nodes live, and leaves the parent's refcount alone.

Tested on a Xiaomi Mi 9 SE (SDM712, sdm845-venus-v2), on the
sdm670-mainline 7.3.7 tree. Without this patch, a few unload and reload
cycles of venus_core ended in "of_node_release() detected bad
of_node_put() on /soc@0/video-codec@aa00000" and refcount_t warnings.
With it, 15 cycles of unloading and reloading venus_core, venus_dec and
venus_enc, each followed by a hardware H.264 decode, log nothing, and
every decode works.

Tested-by: Andrey Derkach <gabin278@xxxxxxxxx> # Xiaomi Mi 9 SE (SDM712)