From patchwork Wed Jun 27 15:27:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 140335 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1025195ljj; Wed, 27 Jun 2018 08:28:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe1WW1M2vwiE2RbGiVHsbFXEr3q1mw18e5e3f/ejmgyWg1sCPm86O5IoHym9Gat6E5sgk1u X-Received: by 2002:a62:4715:: with SMTP id u21-v6mr6376444pfa.89.1530113336665; Wed, 27 Jun 2018 08:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530113336; cv=none; d=google.com; s=arc-20160816; b=sT995MyzdOwavAVRlI7Mr78RNzO5tlO9BtmGTvCrCUVkH3Iax6+6QydeLSxE9Cf34V Q4TXtnOWKlYqgKiOTjRXjqRUGmkefc3vJQ0R8eW6GdzRfP8SZWIjprZDuAhBTFYuP9r+ jVizxHjqziZ2y6LpTHamBfg/Td2yVg7qE0C73++z6MxFZ+5UXLGDHaqywFWhYyD70vtb MrAsf/1LebU4xdzTeUDZQ0Mfd+lWvRJrKZtFpuhUZtpjDIM0NmyKYGiU39Cjd176vaI9 qwE7iYGybmEqWREKwyjoT7tkMC7J0MOgT09UDAQ0YIMlF6PF5nLJHNQLE1HQ/sDPivGo 9P7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=/ThhxevIU3epv9lgxlCyqJq5OSMzAnmUAMY3rX7cEds=; b=qxitARgZJpYsdHIxMg/r/lmuENXpfaxrF8SFDH0GZov9wp+mpwz6U/HSmPFknqxoex aboBmhXp9J+Rnfru50DI0wFcE8xyRhZJkJUyF2k3LsnkhlkkA9fzIIuL3lDx1Q8jJcJD WBBeoMUoW3Jc4hczrhAiTPFLf18ESzw/pKulNzwGFxZRHofM8U//hhhX81TjdcXQCP23 xFQ2P4S00TFLJUr/36PH34izApxJi96Yye/9Sl6X1Tzsm4jNyG/K2yKNUAQp0VR5bTBU Z/gAwmSxXyAToe5v34ofQENRUR6TBbyxeIUYLf4Bs362CHwQTOBvsN3BLkVszwEcV4rV 0Mbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kqKttLXt; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj12-v6si4052316plb.137.2018.06.27.08.28.56; Wed, 27 Jun 2018 08:28:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=@linaro.org header.s=google header.b=kqKttLXt; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965451AbeF0P2z (ORCPT + 4 others); Wed, 27 Jun 2018 11:28:55 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:45631 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965307AbeF0P23 (ORCPT ); Wed, 27 Jun 2018 11:28:29 -0400 Received: by mail-wr0-f193.google.com with SMTP id u7-v6so2464556wrn.12 for ; Wed, 27 Jun 2018 08:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/ThhxevIU3epv9lgxlCyqJq5OSMzAnmUAMY3rX7cEds=; b=kqKttLXtWlwynBGpetiSwDEInrvnGlExomqQ0eXXLx75B7dByD8TUBFz9yH3AvtO6o Oa561AwyMYsTR+3nEkbz4X/yVdnwMF9wWcL4gomFwhKERK3dxebO72DRrljqYy4jRt6E k28iDwZEbrkbol3gjFIwuM0wpgJ61K377uZTo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/ThhxevIU3epv9lgxlCyqJq5OSMzAnmUAMY3rX7cEds=; b=QU9CFlDOxuY4HcxC1rcy4mFdCa70K5pOt0rB0pDDY/k+jCs4P7mhThJIhyJ61gYOV2 Jv48sT64sQOVAuetfWPfqW9B0NHxyakg0mvhFqhh53DJ9ZwA+A5VfI6KC+3g15bZVax9 0Jojbl4q2YXm2/Bx4qCisU+zFi3HyIEOi0B9bvXQZ4ewQkvwh3A9wj+L3nmMZX0ZkowD 1RQWUUfG1xpByV4FhXNDeLpdPoPuryKjwfn8pxb+lek6DKQUTCDnqg9a8QI9MMllGJ1u 5RVu0cVT2lb9/ksb71zEZqV2cbe1F/MB0V7yp58okhG08OF54AsNbZRM7/uMU6OZqv0g fa5g== X-Gm-Message-State: APt69E1uJaWshX1pS8Pkif3dR8Ek64kDgNEoLn/nEhcTLLjHREFTgsPA JbZMxWMKfnFafHpRdMQsjWLCwg== X-Received: by 2002:adf:83c5:: with SMTP id 63-v6mr5421441wre.220.1530113308623; Wed, 27 Jun 2018 08:28:28 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id o203-v6sm2916075wmd.30.2018.06.27.08.28.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 08:28:28 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Stanimir Varbanov Subject: [PATCH v4 26/27] venus: core: add sdm845 DT compatible and resource data Date: Wed, 27 Jun 2018 18:27:24 +0300 Message-Id: <20180627152725.9783-27-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180627152725.9783-1-stanimir.varbanov@linaro.org> References: <20180627152725.9783-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This adds sdm845 DT compatible string with it's resource data table. Signed-off-by: Stanimir Varbanov Reviewed-by: Rob Herring --- .../devicetree/bindings/media/qcom,venus.txt | 1 + drivers/media/platform/qcom/venus/core.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) -- 2.14.1 diff --git a/Documentation/devicetree/bindings/media/qcom,venus.txt b/Documentation/devicetree/bindings/media/qcom,venus.txt index 2693449daf73..00d0d1bf7647 100644 --- a/Documentation/devicetree/bindings/media/qcom,venus.txt +++ b/Documentation/devicetree/bindings/media/qcom,venus.txt @@ -6,6 +6,7 @@ Definition: Value should contain one of: - "qcom,msm8916-venus" - "qcom,msm8996-venus" + - "qcom,sdm845-venus" - reg: Usage: required Value type: diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 381bfdd688db..bb6add9d340e 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -450,9 +450,31 @@ static const struct venus_resources msm8996_res = { .fwname = "qcom/venus-4.2/venus.mdt", }; +static const struct freq_tbl sdm845_freq_table[] = { + { 1944000, 380000000 }, /* 4k UHD @ 60 */ + { 972000, 320000000 }, /* 4k UHD @ 30 */ + { 489600, 200000000 }, /* 1080p @ 60 */ + { 244800, 100000000 }, /* 1080p @ 30 */ +}; + +static const struct venus_resources sdm845_res = { + .freq_tbl = sdm845_freq_table, + .freq_tbl_size = ARRAY_SIZE(sdm845_freq_table), + .clks = {"core", "iface", "bus" }, + .clks_num = 3, + .max_load = 2563200, + .hfi_version = HFI_VERSION_4XX, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/venus-5.2/venus.mdt", +}; + static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, + { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match);