From patchwork Sun Dec 29 17:22:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182552 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5458964ild; Sun, 29 Dec 2019 09:44:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyVfULox3UQw/UYea0u7mXYvRiH36P7FV17cV9HlVaGDNiWqCtbZyI5EM9Uv/jYaNqZT5DN X-Received: by 2002:a9d:68cb:: with SMTP id i11mr65454191oto.210.1577641492370; Sun, 29 Dec 2019 09:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577641492; cv=none; d=google.com; s=arc-20160816; b=T8BNJiMoGOMvzBwqAB5y1am5xpdPkLyKh8BD8BZLUqFFSAl9ozxhtINQcYwo2zarSJ WVqttqBtLAzRlYc82KplkUcXlaNj2Ao09in0nidZdLVKK4ZM4E86PwsHfcuXypIt0OJ7 //Vc6Au0cw8zicTZIhilzxsm4P391FRPD5N4zFIgdXOLIsnoYcdxSr+UCYH685vKwHlQ RGMZ0gx0u2iJ0FEgOZT28jR7Ifqif0ftKuPnpYCIIN1vL+am8ysJsG5SdgkhcnMo26IZ pVYkrm5hBficRtDQEhPLOfoEkj4HAq7sIcX1lqNME5wusoMfC4thIfk0sTD0Q5hhwrNY L70Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T4M4SJc5pDswSuKJ6wHeBaBrAJiwcNhKFlF71XuZuhk=; b=CIkebHoZY1ver83CYpQFoedOb037RL8wurWE1NSKZyutK95C4b4fDl7FX9oiOv/sZj G8CqHMUaGXcyeUGdyKyR9YLejdzGkqwSlRAM13Avzy0abwmBaPa4QTkFuhHUIqp7zdMB ge7dbhJvrdcPZr0FAGE7ISYkzMbpuAoHTemHdUhpDHdJe45pR4gSUuQDkONHTfWh7v9k l4eIx75UkAP6pU9RfbgMuwwaIySgqWlXSAS+xJMzjo58bVTI/mpCF8kBec3GNKVtIunu /4V3yE/WWKQL5SqxASsXMM67Xa+ZAFFTV8Nv6abrhmv6PtMlcUBGcd0DFq/fG8u/Ia3R 4T+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lO0CEVPU; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si22944922otn.180.2019.12.29.09.44.52; Sun, 29 Dec 2019 09:44:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lO0CEVPU; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730369AbfL2Rou (ORCPT + 14 others); Sun, 29 Dec 2019 12:44:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:53290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730790AbfL2Rou (ORCPT ); Sun, 29 Dec 2019 12:44:50 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CCFC206DB; Sun, 29 Dec 2019 17:44:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641489; bh=LniEfBpbtRahalkZJtD5PFh1Q7cv0pt9RRnylEHr1hY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lO0CEVPUsKGz515yrBz1D5D+RfgDtzbgNpqElbD787NeBhidKnRIsUvhh2NjK483K X2v/SOrNAiKVEu35ACuxV4t8ltQMn8RXpxwCG/kvi/7Gh6EmK2JgAZkfNvp7oEH8Sw CLkknTouxbHnnnpgzTPIobRvu6ullqG1V7gON4OE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loic Poulain , Stanimir Varbanov , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.4 087/434] media: venus: core: Fix msm8996 frequency table Date: Sun, 29 Dec 2019 18:22:20 +0100 Message-Id: <20191229172707.326729999@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Loic Poulain [ 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 Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/qcom/venus/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index e6eff512a8a1..84e982f259a0 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[] = {