[PATCH 0/3] media: mediatek: fix VPU device leaks on probe

Johan Hovold posted 3 patches 4 months, 2 weeks ago
There is a newer version of this series
drivers/media/platform/mediatek/mdp/mtk_mdp_core.c  |  7 +++++--
.../mediatek/vcodec/common/mtk_vcodec_fw_vpu.c      | 13 +++++++++++++
drivers/media/platform/mediatek/vpu/mtk_vpu.h       |  2 +-
3 files changed, 19 insertions(+), 3 deletions(-)
[PATCH 0/3] media: mediatek: fix VPU device leaks on probe
Posted by Johan Hovold 4 months, 2 weeks ago
This series fixes VPU device leaks during probe of the mdp and two codec
drivers.

Included is also a minor documentation update to make it clear that the
VPU lookup helper returns the device with an incremented refcount.

Johan


Johan Hovold (3):
  media: mediatek: vcodec: fix device leak on codec init
  media: mediatek: mdp: fix device leak on probe
  media: mediatek: amend vpu_get_plat_device() documentation

 drivers/media/platform/mediatek/mdp/mtk_mdp_core.c  |  7 +++++--
 .../mediatek/vcodec/common/mtk_vcodec_fw_vpu.c      | 13 +++++++++++++
 drivers/media/platform/mediatek/vpu/mtk_vpu.h       |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

-- 
2.49.1
Re: [PATCH 0/3] media: mediatek: fix VPU device leaks on probe
Posted by Johan Hovold 3 months, 1 week ago
On Wed, Sep 24, 2025 at 03:35:49PM +0200, Johan Hovold wrote:
> This series fixes VPU device leaks during probe of the mdp and two codec
> drivers.
> 
> Included is also a minor documentation update to make it clear that the
> VPU lookup helper returns the device with an incremented refcount.

Can these be picked up for 6.19?

Johan
Re: [PATCH 0/3] media: mediatek: fix VPU device leaks on probe
Posted by Nicolas Dufresne 3 months, 1 week ago
Hi,

Le lundi 27 octobre 2025 à 14:37 +0100, Johan Hovold a écrit :
> On Wed, Sep 24, 2025 at 03:35:49PM +0200, Johan Hovold wrote:
> > This series fixes VPU device leaks during probe of the mdp and two codec
> > drivers.
> > 
> > Included is also a minor documentation update to make it clear that the
> > VPU lookup helper returns the device with an incremented refcount.
> 
> Can these be picked up for 6.19?

They are picked already, please check in the tree,

https://gitlab.freedesktop.org/linux-media/media-committers/-/commits/next

Nicolas
Re: [PATCH 0/3] media: mediatek: fix VPU device leaks on probe
Posted by Johan Hovold 3 months, 1 week ago
On Mon, Oct 27, 2025 at 07:29:39PM +0000, Nicolas Dufresne wrote:
> Le lundi 27 octobre 2025 à 14:37 +0100, Johan Hovold a écrit :
> > On Wed, Sep 24, 2025 at 03:35:49PM +0200, Johan Hovold wrote:
> > > This series fixes VPU device leaks during probe of the mdp and two codec
> > > drivers.
> > > 
> > > Included is also a minor documentation update to make it clear that the
> > > VPU lookup helper returns the device with an incremented refcount.
> > 
> > Can these be picked up for 6.19?
> 
> They are picked already, please check in the tree,
> 
> https://gitlab.freedesktop.org/linux-media/media-committers/-/commits/next

I can't seem to find them in that branch either, and they are not in
linux-next. 

(I seem to have trimmed my original message too much so that the patch
summaries were not included in my reminder. Perhaps you are thinking of
the related mtk-mdp3 fix?)

But I do see an incomplete attempt at a fix of the reference leak in
that branch by someone else in commit cdd0f118ef87 ("media: mediatek:
vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init()")

Can that commit be dropped in favour of this series or shall I rebase on
top of it?

Johan
Re: [PATCH 0/3] media: mediatek: fix VPU device leaks on probe
Posted by Johan Hovold 3 months, 1 week ago
On Tue, Oct 28, 2025 at 09:21:24AM +0100, Johan Hovold wrote:
> On Mon, Oct 27, 2025 at 07:29:39PM +0000, Nicolas Dufresne wrote:
> > Le lundi 27 octobre 2025 à 14:37 +0100, Johan Hovold a écrit :
> > > On Wed, Sep 24, 2025 at 03:35:49PM +0200, Johan Hovold wrote:
> > > > This series fixes VPU device leaks during probe of the mdp and two codec
> > > > drivers.
> > > > 
> > > > Included is also a minor documentation update to make it clear that the
> > > > VPU lookup helper returns the device with an incremented refcount.
> > > 
> > > Can these be picked up for 6.19?
> > 
> > They are picked already, please check in the tree,
> > 
> > https://gitlab.freedesktop.org/linux-media/media-committers/-/commits/next
> 
> I can't seem to find them in that branch either, and they are not in
> linux-next. 
> 
> (I seem to have trimmed my original message too much so that the patch
> summaries were not included in my reminder. Perhaps you are thinking of
> the related mtk-mdp3 fix?)
> 
> But I do see an incomplete attempt at a fix of the reference leak in
> that branch by someone else in commit cdd0f118ef87 ("media: mediatek:
> vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init()")
> 
> Can that commit be dropped in favour of this series or shall I rebase on
> top of it?

Scratch that. The merged commit is correct. I'll respin this series on
top.

Johan