Message ID | 20220405204426.259074-13-nicolas.dufresne@collabora.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1nbsym-005D0f-UC; Tue, 05 Apr 2022 23:52:57 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573969AbiDEWxz (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 5 Apr 2022 18:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444153AbiDEWVA (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 5 Apr 2022 18:21:00 -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 EEF0189327; Tue, 5 Apr 2022 13:45:01 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id 6DE231F4483B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649191500; bh=8oDcE7AuYklwa6l0DYob/jQnR/CVHnofWCWQW3y5gNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DeZjdI7imYZZvg+kDC9pPL5dARx83mv65wa5gmDuf9DQMxc84BSLeXsvjKegBDTEG QxDtbC7egcV8QQKplljF4VoJ48UeaFvL6qeYM2UwGF4RtA9iybZkC1BvpSBDZdinR8 XxhklC8SPZdW0mJ8roUeqszepUv4NLbJAoyUtWfjfFP2x2WiV/DvXCmF5x8lkF+Mqi JGQtSRra6PkqVtB3wI/QaJsCcRCziJg+Z+MWX6gMs7O5Of5xgTwg6MakmbmtSRFRNv GqK7eR6CPoHbDtM8mPIih6JGxLihDTd0T+yEh5l0yphROBYovOiL0BUYmP696QUvoo MgKhyNr2bBJww== From: Nicolas Dufresne <nicolas.dufresne@collabora.com> To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>, Mauro Carvalho Chehab <mchehab@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Boris Brezillon <boris.brezillon@collabora.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, Sebastian Fricke <sebastian.fricke@collabora.com>, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev Subject: [PATCH v3 12/24] media: rkvdec: Stop overclocking the decoder Date: Tue, 5 Apr 2022 16:44:13 -0400 Message-Id: <20220405204426.259074-13-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220405204426.259074-1-nicolas.dufresne@collabora.com> References: <20220405204426.259074-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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no |
Series |
[v3,01/24] media: doc: Document dual use of H.264 pic_num/frame_num
|
|
Commit Message
Nicolas Dufresne
April 5, 2022, 8:44 p.m. UTC
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. Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> --- drivers/staging/media/rkvdec/rkvdec.c | 6 ------ 1 file changed, 6 deletions(-)
Comments
On 05/04/2022 22:44, Nicolas Dufresne wrote: > 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 frames -> frame Regards, Hans > this hack was simply compensating for their code being less > efficient. In my opinion, this hack should not have been included > upstream. > > Fixes: cd33c830448ba ("media: rkvdec: Add the rkvdec driver") > Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> > Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com> > Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> > --- > 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);
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);