Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5893643rdb; Thu, 14 Dec 2023 02:45:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxkC8UShe/EJeHSg/mh5dRXoF/8p/pZ6Xq2vlytyD3bWoUoxm502NS3g1ctDQA7R2Z0ECr X-Received: by 2002:a05:6870:961d:b0:1fb:d30:c160 with SMTP id d29-20020a056870961d00b001fb0d30c160mr11348821oaq.3.1702550756481; Thu, 14 Dec 2023 02:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702550756; cv=none; d=google.com; s=arc-20160816; b=dR9XK9fJXIaZO2oiAKFHEsyodmR/toyU0LjVtbrW9FDVbQy5gpXDL4KBGTR3kSsyaK 1c2R9LvIgjmeDAA70vnI1SQfreN9OVn7bFKHirjBRtONd8fDnd4cnivGB/G+WTngXOl1 gpetGf248ZDVSSMah5HyMMUOVLctOf1utXEuj6CUkbz+83D0zAw7G6TCB4WKV7zwCHCh 4f8sxnJCi8949sMkBSH6rDA1gDkf/9CkU/WrmhJ4FGty/nHW3DAI/qV1aFNc8CnWH2r/ ++FiM9kxzjXzTD3WSQ2nEJMoY6/oeH6JlUNwUYPhM0pPNHTacQuyJ6oDuZSE9Dqh/BId gN/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oHV+C1J8UsruoDTR7nG1zADpxUHw4Qp6O92cFvOX6jA=; fh=dHVnbFi5xMe0p5hNoGJclUQzy/pRG69Y6agFMeVxlN4=; b=KJ/HHolX57oBEbiEJs+hH4vsbcjt426rbQ77VQvfu6ChvlUCql9bVqWTFC5rCERo8k 2wMymhHdWlT536m7m/HElm4NFIxCJhMAYKmtAWkaCYI/W9BZtepIYHtBBal++IdgB1Fd /OlN6GeOBfwZ9RJNLG4xBcrvBRhq/32v880kPOurjR1cSekiVVe//vPgqKGmFWJOV6EC lzpx/b0t6yXE1GR9hnwDxESqr8dOQk+u4eR1PxfR9h8WuZSXEUNaxg9lxrvxfrYpuPav 8XzyhW6wFcw3Yfe8WIYNJiGtum4PtudL6vDKlYcHKnoAANvdzwx593J1FRwaHXrZ2hhW uUjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dPlxhpBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 13-20020a63124d000000b005c6e820b5e5si10836728pgs.781.2023.12.14.02.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 02:45:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dPlxhpBa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 34B54807FC1D; Thu, 14 Dec 2023 02:45:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443717AbjLNKo5 (ORCPT + 99 others); Thu, 14 Dec 2023 05:44:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443699AbjLNKo4 (ORCPT ); Thu, 14 Dec 2023 05:44:56 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2921098; Thu, 14 Dec 2023 02:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702550702; bh=8MCgKlYjlQs8HPb4sZJqU1bsku1l/knsZYkBzx7U5Fg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dPlxhpBaW7ElU672KHJklTLQuGm3qI83NTgMS1/f5JeIt6eKtjVFvaFZ7P0w8yKGw hRcHVnReHUclWo6Us016CB1TDKda3FVpql45MI8dMyul30+jlkFDXa8+BU6mNE9I/E +O9eFOVAUC+ii9qp7Hx/wglOhGvN2PouJ6AbLpmmKCew2aBdor2mVAk61u64XiNFnY ZbURT4XsbWC+LaIIKaKEuD0xqGyOYecryagUhj45gEAUyWCRDNES/iP9/oJOHq9Bp4 255la1tUig8oltvahsF3ahpNESGJikk21kjk0xtsE/ZEYeRR8vsM4BhHNq5TXHvhvX ihS00YZvxAQwA== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 64B5537814A4; Thu, 14 Dec 2023 10:45:01 +0000 (UTC) Message-ID: <23255060-5a75-4cbe-9fde-f185fa958a6a@collabora.com> Date: Thu, 14 Dec 2023 11:45:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] media: mediatek: vcodec: fix possible unbalanced PM counter Content-Language: en-US To: Eugen Hristev , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com References: <20231213122017.102100-1-eugen.hristev@collabora.com> <20231213122017.102100-2-eugen.hristev@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20231213122017.102100-2-eugen.hristev@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 02:45:14 -0800 (PST) Il 13/12/23 13:20, Eugen Hristev ha scritto: > It is possible that mtk_vcodec_enc_pw_on fails, and in that scenario > the PM counter is not incremented, and subsequent call to > mtk_vcodec_enc_pw_off decrements the counter, leading to a PM imbalance. > Fix by bailing out of venc_if_encode in the case when mtk_vcodec_enc_pw_on > fails. > > Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver") > Signed-off-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno