From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66B71C982FF for ; Tue, 22 Sep 2026 11:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yZ7m14nglimJsIUJImK3pMgdcUp8p6Dy4xZ9KKZFCzA=; b=yd45yqDArv7UX/l0aJQw9LY0Mr 5nCSXUvQfE7fYSFY9eN1Vr5mUqOE5Afk+Bf/8Hy9ZxeV/pwTEKsYPZ9zyNMPGvoAV7K7zCEPVXE9/ PPdCX2a528PJ1ISTX2KWKgHQ+y6c90NY3WXah0vEVi3WDk0w092Sq7GSiLBLKtdXMSULXr4nq1G+m crrGOuRYpPobZDd3UwsRYSBPMislc0VLc5ATJmPebnK7745qM5TaS9BqG5dN+m+bIMPnttfgJM6vr J997xvTwxxtYflGKXaY/8qxxpb0pEmjWn+ICdXlw0JIS6g1GSnYKL0sflKLo1rpmFxNASZpoP/3lD F3NflHwg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8yrJ-00000005CaM-2aTo; Tue, 22 Sep 2026 11:40:25 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8yr0-00000005CA1-12sH; Tue, 22 Sep 2026 11:40:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1790077204; bh=g+uWp8GE5+l5SIkEyY6Vib3qVErtfIu+oq4xkgSWvfo=; h=Date:Subject:To:References:From:In-Reply-To:From; b=CvNIdMLdkrFipraKmV6ceiqmuuxTu0xed6CBvGQspKvg4IOHdqZPUou/SFPp96iNn IpDM9+bPlOCDV8PDGQA7zUpHgmStWsRT5uf+Zg3D+NXfflPVMWbyz716mpHSkaeeZ+ FKq1U6s9tCaJc6mnkBrVKKbJWs4Z8dVkwBp0Tcz4Cmyzt37YcKMKxY2a1MrQQhnVXf uAvNbgb8Ay9p6hctPP7tDqIx6sIjZwjBWHPxhaJcNfvV1juwKYOr2VOcm0bEbsOnTp rd1g2BHZMXemIbqgiQCIQVJ/X6hpNSq7CtKpgM3F6WL7/FL/e9epS+1IC2pk8jJzHP jy3jEO9a/V5wQ== Received: from [100.64.1.21] (unknown [100.64.1.21]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id C5E4017E03B6; Tue, 22 Sep 2026 13:40:03 +0200 (CEST) Message-ID: <193cb5ee-09ea-4105-90ab-3968c796ff86@collabora.com> Date: Tue, 22 Sep 2026 13:40:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v17 06/12] media: mediatek: jpeg: fix buffer state update timing To: Kyrie Wu , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Bin Liu , kyrie wu , Hans Verkuil , irui wang , Nicolas Dufresne , 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 References: <20260922091530.241762-1-kyrie.wu@mediatek.com> <20260922091530.241762-7-kyrie.wu@mediatek.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20260922091530.241762-7-kyrie.wu@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260922_044006_451674_F6107593 X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 9/22/26 11:15, Kyrie Wu wrote: > Update the destination buffer state only after the decoder has selected > a hardware core and resumed its runtime PM state successfully. This avoids > assigning frame tracking data to buffers that will be returned early, such > as when a source resolution change is detected. > > Protect the destination buffer state update with the hardware spinlock so > the completion path observes a consistent context and frame number. Stop > walking the done queue after completing the next expected frame, since the > remaining buffers still need to wait for their own frame order. > > Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface") > Signed-off-by: Kyrie Wu > Reviewed-by: Nicolas Dufresne Reviewed-by: AngeloGioacchino Del Regno