From patchwork Tue Apr 24 12:44:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 134086 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2191485lji; Tue, 24 Apr 2018 05:46:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx49fbegyaGRW3Y4J7fV2qalKw8cduWLlA+0kevZ6DVeK5/vHbxYjeH3hX2CKek+0t7YUHIX6 X-Received: by 10.99.125.78 with SMTP id m14mr19961603pgn.190.1524573994508; Tue, 24 Apr 2018 05:46:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524573994; cv=none; d=google.com; s=arc-20160816; b=IcCPYXzTMH6LTkknriFKo4utTgms78CrwrdJsKsjsDJGihSotHCo18yK9Q3y/kNbyO fj3p/8G1BQWRI9fWJcHMlO4f75tkoBgfk2pZbeiwPTDa1T6AQ+wkfYd75HsTNtmJQawl G0UxyvVbH0abqCy4HMLT4GVTZwCWmm2ySC5ShITZWFPNC3s7Z7BSPHrj9mbPPEXjq8XX ivk+OI0lHw0+laQUE8R0FzrA6B5cBb8Voq8cU30qx0VprSgExXzjCdO7dPMuxMcgG+mZ 5mTh0OpOAPRmolBsDuB3LomxeYciNZ9SLxNZHf+JzPaq2DrKEuLDf3vGJ/K069qjO7fH Iw2Q== 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=bTF2OiKC7mtZj9utchDu2BO+NqH6q62bN2biZidxM0k=; b=pOx27/igpJmMX2dODGyZs0wlZxyE12tGJXiTVViyqsMewu0i0rHfKwFFvQ0pIha0hO NIfa2Tudw/Yq97qpQMVnbqEUab4sJn01BJaXFD+t0mtBwN9nRmbsRUq5ckv2UIU66NqP gRQFIsnQJ0wza/0vqoOipndwYXERSMYdZDfGfMVy/26NSUbBPx387v5xrmFIBYzevTFs zaplO2ooE931QyHfLMr93/oyW2PEoMluYIIRrV4KBBRxD/IurYZcGNqpPrD5JyVnZFxL 4YPkE9EAIhvzsHJyURtzFwd5vU4NvV4sDbIYWnC1pumVowR/PI1uf3s8JZw/gX0HrHnj koCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bZkPHP76; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 j2-v6si12816673pli.501.2018.04.24.05.46.34; Tue, 24 Apr 2018 05:46:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=bZkPHP76; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757909AbeDXMqb (ORCPT + 6 others); Tue, 24 Apr 2018 08:46:31 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51249 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757891AbeDXMph (ORCPT ); Tue, 24 Apr 2018 08:45:37 -0400 Received: by mail-wm0-f67.google.com with SMTP id j4so694485wme.1 for ; Tue, 24 Apr 2018 05:45:37 -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=m6lX1s5vNufLRUVw4i8W8TlqSIcTNx2wfblL4y+a22U=; b=bZkPHP76594NDRV3lyjtjft7WUIQ31hV36L2BjjdN0LL4NOS03k+pnpep+v2sPTxp8 D0616Xfw73cyWK0UVxfxOgWkUX4+NsqPomWJ/9u44wXhXFiz2DwbnCqgCMBGfAf0+EQo jfEgrMn5d74AQkySecaF6pko/0mfFiQqNJAEY= 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=m6lX1s5vNufLRUVw4i8W8TlqSIcTNx2wfblL4y+a22U=; b=Y+Whbk8mUK/dHCjCU+XASyM6wIZ8A0Q3Mf7z5ugCfGFdQfOZPBNxYvESsQIjqP8clG NAwBjrHB8rsRgTflMIvC4qPUVqqD7d/+oEzQLEJttQLjYPa+wp6XTCRe1F20M1gz2gJA KxBDT/E0qrd2Vyr7XT6KL1aMd0A9ZCImQAFGOnQW1b4I37BRtwkF8IPI0V6n2UhlDuoi 9FJy1BSukPvjMqczAQd/L0CWEnTooHmQ5pHX8T0HwCV6vcffA0hw+VQYmcJFra4L1Gsl PVKb4kRzazVoU+37jTM3B2UBqt6/GgIguFlFhDHmKRaKdfPtJ3/mpqsBG3VyCkjCbf/p z79A== X-Gm-Message-State: ALQs6tCuD+L8DHKFPBeZ5qw4t/YOthHvdHGzS5HnE3pD+l+8bDh3pg9D cuY4ei39uAN4/7o4AkPAqObIZjwFMqU= X-Received: by 10.28.174.81 with SMTP id x78mr13085505wme.41.1524573936435; Tue, 24 Apr 2018 05:45:36 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:35 -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 , Stanimir Varbanov , devicetree@vger.kernel.org Subject: [PATCH 27/28] venus: add sdm845 compatible and resource data Date: Tue, 24 Apr 2018 15:44:35 +0300 Message-Id: <20180424124436.26955-28-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds sdm845 DT compatible string with it's resource data table. Cc: devicetree@vger.kernel.org Signed-off-by: Stanimir Varbanov --- .../devicetree/bindings/media/qcom,venus.txt | 1 + drivers/media/platform/qcom/venus/core.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 1b72bfbb6297..13084880cc42 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -445,9 +445,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);