Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6598711imm; Wed, 27 Jun 2018 10:04:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJh8hKbYB407HIVYFqFPcuOZBhYxxndwM8J/++8KOp0d7owFf1cWLelZEgm1197HwUZxLRH X-Received: by 2002:a63:8749:: with SMTP id i70-v6mr6007845pge.325.1530119062630; Wed, 27 Jun 2018 10:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530119062; cv=none; d=google.com; s=arc-20160816; b=SIqhUb++qu3om6GYMBl9JzxtNYBs+hAizVtpxRvvOVJ2y6O3nEgtKZ7Fak6G53MDHF 3gebGU6Sa0Gu93iFvIDlM4f1KC3nmAf7gVB8SLknKXXaNG5bGEXeyC1IjA+qTYiUG0Fb xmX+RNQtM59AnLAIY9V7RL9s98Hgy8xEm3n71tljs6xkDhNblmqqiYRFvxEvsYXwvrLQ USlyHImvWqujiJzpqeywCCu/+p7T4q/BPZ03hl5iNACo265EiFzq8AnIlbHga9xdzQGF 7gnxFWSmgvsgRto7214aavQPuVIF+4nZQnXFMDYjqLApkZohC3xmQZJbBOXSyy6cOUlU bKCw== 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=0N+9eHeY55PYoTpwOluuX5DKswRuyqkYKawJ8oRB2wCwEqfIgD7BsemXof8tQInujb JyUKXsYZwIgykIbHAAHOYMHhodyLkayF3AOroOxLMJECIuWtvS6u3WVxzZNaLaTGn3Z/ /4qNiuuscc0mgWWhgRiQJKqNCp/Aieb905nhU+wPAKQxfLqpwz6mip5OFgJz+JXZLsjh pTA3L/zVa9zcRe4TO0dujTjwMRB6VM9q8mNmeluzhx+NUDHoXqGZswG63TdEJ3D3rGQq xWeSF1ii0pBd2UVRGJWFApFAid3s5BNKFv/xvUyJHzacJOM+dIF0Z3UQTbr4drAAB7mH kvhQ== 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-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 n26-v6si442539pfh.210.2018.06.27.10.04.07; Wed, 27 Jun 2018 10:04:22 -0700 (PDT) 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=kqKttLXt; 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 S965512AbeF0P24 (ORCPT + 99 others); Wed, 27 Jun 2018 11:28:56 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:46865 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965301AbeF0P23 (ORCPT ); Wed, 27 Jun 2018 11:28:29 -0400 Received: by mail-wr0-f193.google.com with SMTP id t6-v6so2461982wrq.13 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=oHEy+Upl/Dths/b2oj4a+HazPAgHp7UJ2UIF9uZYWJ3E+Woxx6odGzXyAgsLTKTyPe ACXqe9lYs5CiBYqK0nBGo/EOO8Iz6/wUkT5T1tTFoHn8ooooIZsiGRihy3GFwnrtW7tk zevXKIrcDaaBw0nX1gAux3APJ6dZyEJh7l8fZ+k1J6T3eSj3kkpcy4VhvhcFtUdcDN+S p9ogUdE/P1dfjao/g1ah8WSGMct3ULgQ+6LKgKtv8hf6CONeXIdb/UEZDlTXOACneUYq UrgdvMuV+ZD5TAm93JRYkRJXO4gVNeLqb9XpHLG113BCu04fleB1HuFviSsuAAhILnzW CJew== X-Gm-Message-State: APt69E0hcbo0OeQSS8iSi4n8fXN+kvLe714/wXcambadDQ/e0a8B7m5X 0pBzhcKTIu3YGPix0VaSvdYPXg== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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); -- 2.14.1