From patchwork Wed Dec 18 13:22:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182008 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp647122ile; Wed, 18 Dec 2019 05:24:28 -0800 (PST) X-Google-Smtp-Source: APXvYqy1yWWgvS1jo46pmnqZW9nnfodomFG5Mp/XZWq8iuPVe75cLbleOLFwnsF/JUFaJt02xQnr X-Received: by 2002:a05:6830:1b71:: with SMTP id d17mr2524314ote.42.1576675467952; Wed, 18 Dec 2019 05:24:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576675467; cv=none; d=google.com; s=arc-20160816; b=K010klrYLSL5v3h8UpdUxA3L94Vf7+7Hr8BF+JGspWzvOxEwdXzujI2z1bckWXzFUU yWq4/gxnA7Qa13KB2xFdCUEr0q2vz/e5PuJU5w1+od0Xz9R+I1ftoPSnlTslKRJ86+aX QABM3QI2SLZBNlnGmlqG1ZlH6Y2ThCD8bUvwDDDq8KMe0koeGPn5rYYb5RRI173tAcJD QK4x/AZepSk1PIoe045upGKzqA4MGjH/47yB224x2CzPGkjRh64766YMIRmPsGnXvzqQ V5Paj91wZiqT7K+xFC5VGattSMhl0efTe6Xz0NQrZi2iJ5Zoc9WJJYe1BqT2ovxyQSPs 9Dhg== 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; bh=BGNJV+T/A2yMDmvoIRAZ3Ql5cKw3jiqTHheiep1uASM=; b=RqAz14XbNkVssbHY2mvXiTJqjqXZvo0o3cMDVhqARSXF3JW8YMKnUga7pepfXpJK/d QaB9UWGYIbmfGY+Y6TQR7NgQkHxS+NJ4p85sCE0R1Km9rHCi2iyH7sb4tjsjbrP2vfhM ctUu+VWO1lyThfEI8mIkJHVWg0PQg+RV5TRWPwHwIhK6uE7uo2/xLxK9o96x19v93vLu 9K0salAyXStaaV8IrZ6pRbfU+RDHa9eCUf+QaWalVGN9CqfBH931d0a5YpA3AHq+ca3C IQwjPQVka4hnBDfP0B8xZzFtHXOMXFdXMCFwFrPIfN+Ia3QogaaM9668ZFIBMIa5H3UD uDVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J38NAh8c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a29si965558otd.268.2019.12.18.05.24.22; Wed, 18 Dec 2019 05:24:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=J38NAh8c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727441AbfLRNYV (ORCPT + 27 others); Wed, 18 Dec 2019 08:24:21 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39843 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727398AbfLRNYS (ORCPT ); Wed, 18 Dec 2019 08:24:18 -0500 Received: by mail-lj1-f193.google.com with SMTP id l2so2123948lja.6 for ; Wed, 18 Dec 2019 05:24:16 -0800 (PST) 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=BGNJV+T/A2yMDmvoIRAZ3Ql5cKw3jiqTHheiep1uASM=; b=J38NAh8cLjcopCFZceQKVt6FktIHUfe2ZgUof7WZnrMfuI60kCOnjz3yElmRclfKZG vZgYh6wiz+yZ9ftGZJ7D8xag4F0Al6nVr7ypbuG2BvMkAZhayhLv2wozZDTY2CLXN+FR xLduJlNN93xj8AlmVAc+xMaPFNtnSUBmNHX3Rv1+ah+QFSfe42AG41hV8leAWSoBpbQf 1ZWhDgy412o8AOIDXNlQkpHsLa9CgvIM9YVjTieApipdS0+fimKwzfyNS6vn6hgCaJHx AwXXjctUO7QuMh91fgZYWsSgsvju4nD+ReOdZ9iNjaud/vuVzchkpuDY9sz6dh4HveeR eMBw== 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=BGNJV+T/A2yMDmvoIRAZ3Ql5cKw3jiqTHheiep1uASM=; b=fmeER6C9Ic/HVfcubJdQyqJqwS1+BBFBFGIJQ81ZS12ziQFSEn7JWePRjaY2Hfr2QA Wb4RrENA3BXoYqfEkvaiCKMeSso3rWKtKgxjqvGcYaYHXpzv0C54J8Pa+JgwCW7UEPh2 Hfvfxpw2AbldVuksv4entw6zLdK4ZA0xLajJ2Nudu3/kVftwqz/x8CefYffrKsplUtNy YM8gFuQ5vRqMAAsBuSrwLfyrJk032bu1Ls8Zw9DrNZJlaXRmUBKRYcBeusRwqGjbnZ65 LK0HtwUXvSeVKEwjgYmItw83s3uYMIHXi17JHx7AtmbWdHOWefwToyQLcunMwrwr/Vun 7i1Q== X-Gm-Message-State: APjAAAXL51R8of0eF6mGGb1dmGArC6Chbj+xwu1jSuaXqIn7L09QBIZl aBJpXkW0CPnFB1G8IxCli2h9Xw== X-Received: by 2002:a2e:800b:: with SMTP id j11mr1613563ljg.126.1576675455853; Wed, 18 Dec 2019 05:24:15 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id z7sm1440667lfa.81.2019.12.18.05.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 05:24:15 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v2 10/12] venus: core: add sdm845-v2 DT compatible and resource struct Date: Wed, 18 Dec 2019 15:22:49 +0200 Message-Id: <20191218132251.24161-11-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191218132251.24161-1-stanimir.varbanov@linaro.org> References: <20191218132251.24161-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to use dynamic video codec assignment add a new sdm845-v2 DT compatible and new venus_resource structure to cover the binding where all pmdomains and clocks are under the venus_core control. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index a20ab00a8068..c7525d951e92 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -495,10 +495,37 @@ static const struct venus_resources sdm845_res = { .fwname = "qcom/venus-5.2/venus.mdt", }; +static const struct venus_resources sdm845_res_v2 = { + .freq_tbl = sdm845_freq_table, + .freq_tbl_size = ARRAY_SIZE(sdm845_freq_table), + .bw_tbl_enc = sdm845_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sdm845_bw_table_enc), + .bw_tbl_dec = sdm845_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sdm845_bw_table_dec), + .codec_freq_data = sdm845_codec_freq_data, + .codec_freq_data_size = ARRAY_SIZE(sdm845_codec_freq_data), + .clks = {"core", "iface", "bus" }, + .clks_num = 3, + .vcodec0_clks = { "vcodec0_core", "vcodec0_bus" }, + .vcodec1_clks = { "vcodec1_core", "vcodec1_bus" }, + .vcodec_clks_num = 2, + .vcodec_pmdomains = { "venus", "vcodec0", "vcodec1" }, + .vcodec_pmdomains_num = 3, + .vcodec_num = 2, + .max_load = 3110400, /* 4096x2160@90 */ + .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, }, + { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match);