mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Nathan Hebert <nhebert@chromium.org>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Fritz Koenig <frkoenig@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	Steve Cho <stevecho@chromium.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v4,3/4] media: mediatek: vcodec: move core context from device to each instance
Date: Fri, 9 Jun 2023 15:50:15 -0400	[thread overview]
Message-ID: <5d15905d-2a7b-4eb6-9f52-38303eaf5292@notapiano> (raw)
In-Reply-To: <20230525014009.23345-4-yunfei.dong@mediatek.com>

On Thu, May 25, 2023 at 09:40:08AM +0800, Yunfei Dong wrote:
[..]
> --- a/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
> +++ b/drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c
[..]
> @@ -247,6 +229,8 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue,
>  
>  		kfree(lat_buf->private_data);
>  	}
> +
> +	cancel_work_sync(&msg_queue->core_work);

Hi Yunfei,

this hunk is causing warnings during boot and when exercising the decoder with
fluster on mt8192-asurada-spherion. This deinit function is called on the
v4l2 release callback, even though the work might not have been initialized as
that only happens if/when the codec specific 'decode' callback is called (as a
result of device_run m2m callback).

Thanks,
Nícolas

<4>[  496.164381] ------------[ cut here ]------------
<4>[  496.169259] WARNING: CPU: 5 PID: 2338 at kernel/workqueue.c:3376 __flush_work.isra.0+0x23c/0x258
<4>[  496.178299] Modules linked in: r8153_ecm cdc_ether usbnet r8152 mt7921e mt7921_common mt76_connac_lib mt76 mac80211 btusb btintel btmtk btrtl btbcm cfg80211 bluetooth uvcvideo mt8192_mt6359_rt1015_rt5682 uvc ecdh_generic snd_soc_mt8192_afe ecc videobuf2_vmalloc crct10dif_ce cros_usbpd_logger fuse ip_tables ipv6
<4>[  496.206108] CPU: 5 PID: 2338 Comm: gst-launch-1.0 Tainted: G        W          6.4.0-rc5-next-20230607+ #475
<4>[  496.216182] Hardware name: Google Spherion (rev0 - 3) (DT)
<4>[  496.221915] pstate: 00400009 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
<4>[  496.229125] pc : __flush_work.isra.0+0x23c/0x258
<4>[  496.233992] lr : __cancel_work_timer+0x14c/0x1c8
<4>[  496.238859] sp : ffff8000896e3b00
<4>[  496.242423] x29: ffff8000896e3b00 x28: ffff57c3d4079f80 x27: 0000000000000000
<4>[  496.249807] x26: ffff57c3d4079f80 x25: ffffb76395b59dc8 x24: 0000000000000001
<4>[  496.257191] x23: ffffb763928daab8 x22: ffff57c3d4079f80 x21: 0000000000000000
<4>[  496.264575] x20: ffffb763955f6778 x19: ffff57c3cf06f4a0 x18: 0000000000000000
<4>[  496.271958] x17: 000000040044ffff x16: 005000f2b5503510 x15: 0000000000000000
<4>[  496.279342] x14: ffff57c3c03a1f80 x13: ffffa0616a2fc000 x12: 000000003464d91d
<4>[  496.286726] x11: 0000000000000000 x10: 0000000000001b10 x9 : ffffb763928de61c
<4>[  496.294110] x8 : ffff57c3d407baf0 x7 : 0000000000000000 x6 : ffff57c3d4079f80
<4>[  496.301494] x5 : ffff57c3d4079f80 x4 : 0000000000000000 x3 : 0000000000000000
<4>[  496.308878] x2 : ffff8000896e3bf0 x1 : 0000000000000011 x0 : 0000000000000000
<4>[  496.316262] Call trace:
<4>[  496.318958]  __flush_work.isra.0+0x23c/0x258
<4>[  496.323477]  __cancel_work_timer+0x14c/0x1c8
<4>[  496.327996]  cancel_work_sync+0x1c/0x30
<4>[  496.332082]  vdec_msg_queue_deinit+0xac/0xc8
<4>[  496.336604]  vdec_h264_slice_deinit+0x64/0xb8
<4>[  496.341211]  vdec_if_deinit+0x3c/0x68
<4>[  496.345123]  mtk_vcodec_dec_release+0x20/0x40
<4>[  496.349729]  fops_vcodec_release+0x50/0xd8
<4>[  496.354074]  v4l2_release+0x7c/0x100
<4>[  496.357900]  __fput+0x80/0x270
<4>[  496.361205]  ____fput+0x18/0x30
<4>[  496.364595]  task_work_run+0x78/0xe0
<4>[  496.368420]  do_notify_resume+0x29c/0x7f8
<4>[  496.372680]  el0_svc+0xa4/0xb8
<4>[  496.375987]  el0t_64_sync_handler+0xc0/0xc8
<4>[  496.380423]  el0t_64_sync+0x1a8/0x1b0
<4>[  496.384336] ---[ end trace 0000000000000000 ]---

  parent reply	other threads:[~2023-06-09 19:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  1:40 [PATCH v4,0/4] media: mediatek: vcodec: Fix decoder under flow and plt test fails randomly Yunfei Dong
2023-05-25  1:40 ` [PATCH v4,1/4] media: mediatek: vcodec: Avoid unneeded error logging Yunfei Dong
2023-05-25  8:11   ` AngeloGioacchino Del Regno
2023-06-07  4:16     ` Fei Shao
2023-05-25  1:40 ` [PATCH v4,2/4] media: mediatek: vcodec: using decoder status instead of core work count Yunfei Dong
2023-05-25  8:12   ` AngeloGioacchino Del Regno
2023-05-25  1:40 ` [PATCH v4,3/4] media: mediatek: vcodec: move core context from device to each instance Yunfei Dong
2023-05-25  8:12   ` AngeloGioacchino Del Regno
2023-06-09 19:50   ` Nícolas F. R. A. Prado [this message]
2023-05-25  1:40 ` [PATCH v4,4/4] media: mediatek: vcodec: using empty lat buffer as the last one Yunfei Dong
2023-05-25  8:12   ` AngeloGioacchino Del Regno

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=5d15905d-2a7b-4eb6-9f52-38303eaf5292@notapiano \
    --to=nfraprado@collabora.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=frkoenig@chromium.org \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=nhebert@chromium.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=stevecho@chromium.org \
    --cc=wenst@chromium.org \
    --cc=yunfei.dong@mediatek.com \
    /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

all inboxes | Powered by JetHome®