Linux Media Controller development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Loic Poulain <loic.poulain@linaro.org>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 047/350] media: venus: core: Fix msm8996 frequency table
Date: Tue, 10 Dec 2019 16:02:32 -0500	[thread overview]
Message-ID: <20191210210735.9077-8-sashal@kernel.org> (raw)
In-Reply-To: <20191210210735.9077-1-sashal@kernel.org>

From: Loic Poulain <loic.poulain@linaro.org>

[ Upstream commit c690435ed07901737e5c007a65ec59f53b33eb71 ]

In downstream driver, there are two frequency tables defined,
one for the encoder and one for the decoder:

/* Encoders /
<972000 490000000 0x55555555>, / 4k UHD @ 30 /
<489600 320000000 0x55555555>, / 1080p @ 60 /
<244800 150000000 0x55555555>, / 1080p @ 30 /
<108000 75000000 0x55555555>, / 720p @ 30 */

/* Decoders /
<1944000 490000000 0xffffffff>, / 4k UHD @ 60 /
< 972000 320000000 0xffffffff>, / 4k UHD @ 30 /
< 489600 150000000 0xffffffff>, / 1080p @ 60 /
< 244800 75000000 0xffffffff>; / 1080p @ 30 */

It shows that encoder always needs a higher clock than decoder.

In current venus driver, the unified frequency table is aligned
with the downstream decoder table which causes performance issues
in encoding scenarios. Fix that by aligning frequency table on
worst case (encoding).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/platform/qcom/venus/core.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index e6eff512a8a14..84e982f259a06 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -427,10 +427,11 @@ static const struct venus_resources msm8916_res = {
 };
 
 static const struct freq_tbl msm8996_freq_table[] = {
-	{ 1944000, 490000000 },	/* 4k UHD @ 60 */
-	{  972000, 320000000 },	/* 4k UHD @ 30 */
-	{  489600, 150000000 },	/* 1080p @ 60 */
-	{  244800,  75000000 },	/* 1080p @ 30 */
+	{ 1944000, 520000000 },	/* 4k UHD @ 60 (decode only) */
+	{  972000, 520000000 },	/* 4k UHD @ 30 */
+	{  489600, 346666667 },	/* 1080p @ 60 */
+	{  244800, 150000000 },	/* 1080p @ 30 */
+	{  108000,  75000000 },	/* 720p @ 30 */
 };
 
 static const struct reg_val msm8996_reg_preset[] = {
-- 
2.20.1


  parent reply	other threads:[~2019-12-10 21:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 21:02 [PATCH AUTOSEL 5.4 040/350] media: ov6650: Fix control handler not freed on init error Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 041/350] media: i2c: ov2659: fix s_stream return value Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 042/350] media: ov6650: Fix crop rectangle alignment not passed back Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 043/350] media: i2c: ov2659: Fix missing 720p register config Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 044/350] media: ov6650: Fix stored frame format not in sync with hardware Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 045/350] media: ov6650: Fix stored crop rectangle " Sasha Levin
2019-12-10 21:02 ` Sasha Levin [this message]
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 049/350] media: vimc: Fix gpf in rmmod path when stream is active Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 058/350] media: venus: Fix occasionally failures to suspend Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 066/350] media: flexcop-usb: fix NULL-ptr deref in flexcop_usb_transfer_init() Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 067/350] media: cec-funcs.h: add status_req checks Sasha Levin
2019-12-10 21:02 ` [PATCH AUTOSEL 5.4 068/350] media: meson/ao-cec: move cec_notifier_cec_adap_register after hw setup Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 084/350] media: cx88: Fix some error handling path in 'cx8800_initdev()' Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 089/350] media: ti-vpe: vpe: Fix Motion Vector vpdma stride Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 090/350] media: ti-vpe: vpe: fix a v4l2-compliance warning about invalid pixel format Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 091/350] media: ti-vpe: vpe: fix a v4l2-compliance failure about frame sequence number Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 092/350] media: ti-vpe: vpe: Make sure YUYV is set as default format Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 093/350] media: ti-vpe: vpe: fix a v4l2-compliance failure causing a kernel panic Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 094/350] media: ti-vpe: vpe: ensure buffers are cleaned up properly in abort cases Sasha Levin
2019-12-10 21:03 ` [PATCH AUTOSEL 5.4 097/350] media: ti-vpe: vpe: fix a v4l2-compliance failure about invalid sizeimage Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 144/350] media: cedrus: Fix undefined shift with a SHIFT_AND_MASK_BITS macro Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 145/350] media: aspeed: set hsync and vsync polarities to normal before starting mode detection Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 147/350] media: ov6650: Fix stored frame interval not in sync with hardware Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 148/350] media: ad5820: Define entity function Sasha Levin
2019-12-12 12:19   ` Pavel Machek
2019-12-12 12:24     ` Greg KH
2019-12-12 13:48       ` Pavel Machek
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 149/350] media: ov5640: Make 2592x1944 mode only available at 15 fps Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 150/350] media: st-mipid02: add a check for devm_gpiod_get_optional Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 151/350] media: imx7-mipi-csis: Add a check for devm_regulator_get Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 152/350] media: aspeed: clear garbage interrupts Sasha Levin
2019-12-10 21:04 ` [PATCH AUTOSEL 5.4 153/350] media: smiapp: Register sensor after enabling runtime PM on the device Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 202/350] media: rcar_drif: fix a memory disclosure Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 203/350] media: v4l2-core: fix touch support in v4l_g_fmt Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 205/350] media: staging/imx: Use a shorter name for driver Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 209/350] media: vivid: media_device_cleanup was called too early Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 247/350] media: exynos4-is: fix wrong mdev and v4l2 dev order in error path Sasha Levin
2019-12-10 21:05 ` [PATCH AUTOSEL 5.4 252/350] media: pvrusb2: Fix oops on tear-down when radio support is not present Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 257/350] media: si470x-i2c: add missed operations in remove Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 258/350] media: cedrus: Use helpers to access capture queue Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 259/350] media: v4l2-ctrl: Lock main_hdl on operations of requests_queued Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 262/350] media: vicodec: media_device_cleanup was called too early Sasha Levin
2019-12-10 21:06 ` [PATCH AUTOSEL 5.4 263/350] media: vim2m: " Sasha Levin

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=20191210210735.9077-8-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    /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