From patchwork Sun Dec 29 17:17:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 182539 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5446844ild; Sun, 29 Dec 2019 09:30:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxBHF8WppP9U/1bs7EYRclhp4kDKBBOl/dmjbcGzr3XHXBos7TauDedCRcNbDDUFsM44eBU X-Received: by 2002:a05:6830:20c6:: with SMTP id z6mr65916567otq.272.1577640610059; Sun, 29 Dec 2019 09:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577640610; cv=none; d=google.com; s=arc-20160816; b=B8inI63RmwaAqo7TCHqq5lmTNiNhpMkXgUEeJnElWlI+XNBay1G53gpFXqHtU0vM2y ymNOLi9/kLcOrP6oekslfRwtt4d9I8Ml+fLR8H7uc1u6iKMHNxcXcYShDrsCcxB020YU Z4+21MGGrCrqxG5Z7e2bvqTqinZ8CaSKAOef/nMTjuXKbBSP+wvUH7zZhgHpcsh0/fD7 7tCKIHpyjehiYg8Kj8y2ZXIN3jFl7/DPqppjvuuJzrkxzsQTGTh9t9TvksfryVGzzoQs D7NhM3WrWeP8c8gNltOaiTIS0r80hEMaC+cDsAml5V9pKHoszFv4Eo59g3Er6KFbp3n3 Kn8A== 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=8nM4oPzBznc/E/NatSLtX8SMBKOgI+GfAqdaRe1xOeA=; b=UToJEXKdKdW+SCjw5Hk7AkwNwBoSIfXJ5Sw2LQ6uhk8SUxi6OpE+jXSG2l1iTdBsQh ESXBftEWl/URXv/ymaRjdPtUIgZvMHSK/rw9mIFNPSTRIC21J2pyveOddTXS9bOrUjLn xHymEsDzbuISVogwsBSIWQ1J+NxhoHdEg/mcij7gNEjqHCCWPzfd7BE9udFSfrptFmPa vaeAk9IIygbjgLKdhdkwQxZFw7eXeVe52GeVgt8bRqulHb4p0HGNun+VqqeuxIv0FCdO tDQ9SymGaqugHRBeRhFiEmJetFnBhlsFPDmKPcPClWLn+femU6rd7c2tjbMXUhdLM5Gw GqjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jZeUldcF; 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 h9si459222oie.74.2019.12.29.09.30.09; Sun, 29 Dec 2019 09:30:10 -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=jZeUldcF; 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 S1728913AbfL2RaJ (ORCPT + 14 others); Sun, 29 Dec 2019 12:30:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:55554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728843AbfL2RaE (ORCPT ); Sun, 29 Dec 2019 12:30:04 -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 0821A20722; Sun, 29 Dec 2019 17:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640603; bh=2mELMA7+IYIye6ehOomFskH1dETTtE40+RJWTuQmDBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jZeUldcFHKiU12FPzu7N4yNWvwTqZ9ZJZMoXe7cKWycypChz8HsLc5oZhFbXGN0AD b5oCC5zzCgenkI7fG3ZowLkcUpM8EpxJ4Igg/V69D0gn5Kc9h2ve17BA6Fso2Y8gvz Onp9wVW6HwYyssStEhwK+eHMQSqNCjVJXzMNl2O8= 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 4.19 046/219] media: venus: core: Fix msm8996 frequency table Date: Sun, 29 Dec 2019 18:17:28 +0100 Message-Id: <20191229162514.740141876@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162508.458551679@linuxfoundation.org> References: <20191229162508.458551679@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 5b8350e87e75..60069869596c 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -430,10 +430,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[] = {