From patchwork Thu Jul 5 13:04:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 141127 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1919433ljj; Thu, 5 Jul 2018 06:06:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5y54p3qM78fsVWaZK+9/8+DIAo2QKT0JR494wCBgteBGN05pM9/IXrTiC4rk1dGvPj4+Z X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr6085686plk.217.1530795965083; Thu, 05 Jul 2018 06:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530795965; cv=none; d=google.com; s=arc-20160816; b=CQue2UMLPBPSk1xWIvwTuQldXdg34gCM3SvIi4ol8UXkx925bteuTchx0tqZ+mjGLn 657iMqghDwGxzMVPNZB0XMoXMqf6GsXWYvyZY26fmT3dzUWPtO5f8QWfSpj2wuiSiOeg xeaa2ay18VHtoinjA8qhYEAB/5evy8s5j2GNxKRk8CdTgzkYSrSLDDy9yJwV9yoIUgYF gFMhXinCmqMLJuZI9QzN6CB49ieJA3QSpfTYkpcJI1e6WrD7x7d9SmS8PQH2nbJHxfS9 +sTh/6wzasC5Bvj3lcccm/chxm9q/4BRgBsy0R6UpUDxoIzAOqiDR5v75VwvyqZKnW3S lLBA== 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=Io/09gDoT70vFPpgn/zYXwlreP8XgdhsI/K2w02870oORnLGmhitk3EGKUHlUS6XTG 2gjVgraHZKARKy3I1pXdS70BdXLet8MrUHiliSCE6+Hs5sWAiOpnBXPMwzBfdQvJXivH vlzzka9Vb3GvLADejeXMUQlFXrqH5YXSV6jxsoNeNf9i2anp8KYIDOLcJSH9iSSHe9dD BqJdv5vUHcESAmIyZdtz23U67sWGYBGKLZTex/UsMSqLmRljT5ydFIKS8oWUfjdxw7IW OqYgUXkHYeA+YkVHk1RwPOyjL0DzdQZ9SibEONfiUEioX4X6m5BQCmkyU6dNUG/i/OKD eNZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jgqxqkXd; 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 b3-v6si5297885pgq.387.2018.07.05.06.06.04; Thu, 05 Jul 2018 06:06:05 -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=jgqxqkXd; 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 S1754607AbeGENGE (ORCPT + 31 others); Thu, 5 Jul 2018 09:06:04 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43955 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754523AbeGENFh (ORCPT ); Thu, 5 Jul 2018 09:05:37 -0400 Received: by mail-wr1-f67.google.com with SMTP id b15-v6so1136256wrv.10 for ; Thu, 05 Jul 2018 06:05:36 -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=jgqxqkXdJU6dIeNwID5AYkTWa0npGfEEiYElQwgS3tx/Siu9P0xX2mWthp3kJ+TvH+ y1h4slnHe1fFV2igclZa/RitP51INZB6d6u9GpQFPV8PdG7X0WivGEzILLCwWi2cDstu N8GKlqqS9IDw/cvCBuLGmL+hkDQJHtSLsdUhM= 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=G3INeTgs4a2CL20VYcCFbKbOZEu5uTAHCCeSkwSElISSCXVVKcylgrUpALFwA6PTrv aoWIto42WDRdYqQ+agaUVYCHIHmZQFaUum3wM5upYX4qjURzuZanUQfHkGHnX98AT4GO DblfgyuplSTrCOcpC62RyHbYqTq8mYIYrTBppIt6nzxLIAZdyNfmk6xsfIi3OiyubBu+ s1oFRwXIQvfDn0aL+wdzQeyFRX4MHqRwolY1JcCt56W8EcjcnO6eKOD63rgz8JImg9ws WPxDq7jJI0WVQGSLBwzXrkvKSzUqVhrwsifroaUSbRvbn8k1kHoWm0+WgBEr9NEXR6iZ dYWA== X-Gm-Message-State: APt69E2dNrIO52V0qwuY6l2g+JgBdMyef2MHFr8ZxvcbVmtPEFUKChWO QBhzBd7R2YB+YdwbgVdeTm3j+Q== X-Received: by 2002:adf:874b:: with SMTP id 11-v6mr4227776wrz.117.1530795935999; Thu, 05 Jul 2018 06:05:35 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 11-v6sm2109102wrw.67.2018.07.05.06.05.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:05: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 , Tomasz Figa , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v5 26/27] venus: core: add sdm845 DT compatible and resource data Date: Thu, 5 Jul 2018 16:04:00 +0300 Message-Id: <20180705130401.24315-27-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180705130401.24315-1-stanimir.varbanov@linaro.org> References: <20180705130401.24315-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(+) -- 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);