Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1131519pxb; Fri, 1 Apr 2022 05:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxb6mDMNXcaQ7DQAF6ThHEfFpuUUpPg19mQQ2T8ZvR7ye5zMfsOimidBRSio414TJwFhsA5 X-Received: by 2002:a17:90a:628b:b0:1c6:a410:d73f with SMTP id d11-20020a17090a628b00b001c6a410d73fmr11872187pjj.96.1648816407126; Fri, 01 Apr 2022 05:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648816407; cv=none; d=google.com; s=arc-20160816; b=Nt3gsQnsQ4uUIljzWELVsF4FWZ/A15nhdc1zpEVm5ssGvlYXEEUD9iagrzFc8Z0Leo tVjcmd7EI1Vv+79IjJAidi5+De+1nqdGg4U/RfAN5j/QGYa9TKg/kdtmXtOUp62B6s1D DFUOi2dAoc2NM0sdpTuWdoVC7xg3jA6Qjii9gXzQ81WU9lHDjXmUg/6ZcH/k3abeVdQW 0CzGdwQOqbrrhbj/U4OnDK7RFilq8TTccrsz4xkYFK54j2sa0T+ijMNRAJTVrc0rZCO+ yqiCFhsmhK++bCVSMJ0AK6yo+wYn6qqaYiK0TiArbU6BmBfQf3+xdqog1rTXvbLlIi0y 6eSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2ErgzNra6BfJZwr3SB2KxYJdIPTR9CYOJ1arl2tMTiA=; b=Gh6PmmMo9wj+VL7d8eygMeEtQ6wWgyf9Xq6UqfUlC4UgTiFpq9r6u6L5fopvszsHyq RyyzpUCksAWas0fPVjxO76d1LaXbtR2mUeWZJEO3OpiSLskjhhtLEFQIpPviB4fkUHni T239Tjv3jkgY3L+lNrjeTDklTDNqRs2jn6uB7a0fe636caGuCoXwvRvPhnV/qLSyX1gC fS/ThUnmkobdyr2uw0tBKEReakJMCCHJeVVfoxqTry+exp9cHh/Rw+cB2VJhHx7iTWoB Usd5rx7IVyPXvPEJaeOzWD3X+WhTpcRHg+RkaCpy6F8CzeuE+X9MUAl3HXAEnEd28T09 YG0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RwGxqDjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020aa7914c000000b004faa59148b8si2289755pfi.211.2022.04.01.05.33.13; Fri, 01 Apr 2022 05:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RwGxqDjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237181AbiCaTkR (ORCPT + 99 others); Thu, 31 Mar 2022 15:40:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240905AbiCaTjw (ORCPT ); Thu, 31 Mar 2022 15:39:52 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4859223DE96; Thu, 31 Mar 2022 12:37:54 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id E968B1F47255 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648755473; bh=jjxmbWJ+OUjcuFBbFVuZBkezVddHPzPh9O3QIqvsczU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RwGxqDjb0z4nPRaKXOOXYxg8RTqfoEsVbLNoGTKoOzPLv3hNGVnc6HLxlP8mSG/at AG+QmqMCODgEoABnKum4nYnaByGjFVNYW9dBw7IJgMjmfBhD0NhgMaJ8pAlPcT82zP Lz6kwWHhO7YdLQTjpqVWuhsRwi8Rr6Kjs+wCzmoD0UcTv4MHn5PhDy+oDM6nGn0+V/ 7OmMUW8v0byfOjG9iiJxlykixdc7+5gDkU7MslxNYsodoOqffxM6OlJAO1R0yAIqbt jSXOE3Vpj9rhLG/RDjJMIHnxY/W5m2zWng9BLDkBqpkfSBD3ZApYKpfDusZaPnYtcs hjn1fjNYR0I2A== From: Nicolas Dufresne To: Ezequiel Garcia , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: kernel@collabora.com, Sebastian Fricke , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/23] media: rkvdec: Stop overclocking the decoder Date: Thu, 31 Mar 2022 15:37:14 -0400 Message-Id: <20220331193726.289559-13-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220331193726.289559-1-nicolas.dufresne@collabora.com> References: <20220331193726.289559-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While this overclock hack seems to work on some implementations (some ChromeBooks, RockPi4) it also causes instability on other implementations (notably LibreComputer Renegade, but there were more reports in the LibreELEC project, where this has been removed). While performance is indeed affected (tested with GStreamer), 4K playback still works as long as you don't operate in lock step and keep at least 1 frame ahead of time in the decode queue. After discussion with ChromeOS members, it would seem that their implementation indeed used to synchronously decode each frames, so this hack was simply compensating for their code being less efficient. In my opinion, this hack should not have been included upstream. Signed-off-by: Nicolas Dufresne Reviewed-by: Sebastian Fricke --- drivers/staging/media/rkvdec/rkvdec.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index c0cf3488f970..2df8cf4883e2 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -1027,12 +1027,6 @@ static int rkvdec_probe(struct platform_device *pdev) if (ret) return ret; - /* - * Bump ACLK to max. possible freq. (500 MHz) to improve performance - * When 4k video playback. - */ - clk_set_rate(rkvdec->clocks[0].clk, 500 * 1000 * 1000); - rkvdec->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rkvdec->regs)) return PTR_ERR(rkvdec->regs); -- 2.34.1