From patchwork Wed Jan 9 08:46:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10753645 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2578013B4 for ; Wed, 9 Jan 2019 08:47:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 148EE28FB8 for ; Wed, 9 Jan 2019 08:47:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08DE528FC3; Wed, 9 Jan 2019 08:47:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8037528FB8 for ; Wed, 9 Jan 2019 08:47:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729934AbfAIIql (ORCPT ); Wed, 9 Jan 2019 03:46:41 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53111 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729942AbfAIIqk (ORCPT ); Wed, 9 Jan 2019 03:46:40 -0500 Received: by mail-wm1-f66.google.com with SMTP id m1so6720081wml.2 for ; Wed, 09 Jan 2019 00:46:40 -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=p1aYYfe1Sbab/wTQ6/YLONvNDQbV1Er7aklVEWsbHqk=; b=ZK8nXvpAcgp/j15jB2W2ghuu0K+Z22ZSigBYJpOMqJjWm+N+YDQi+SbINhaXpRbhjl +fGHLlrM1NcR8/dBpQ7EGZtwxKMoc5+lH3ianAvG7aRIL+E5ePjuj8Iv91AtFgjCUxUl +lAccnywHODSJ5Omiak+1B2JbrY4jJjuwzWqo= 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=p1aYYfe1Sbab/wTQ6/YLONvNDQbV1Er7aklVEWsbHqk=; b=fQCH3yrfio2nKS7VueL1klsDFIWAxjIkmtY7Rr4zlNcx2WSuQ+dgm4mPbOqIoxNFDl jzR/XGazzRh9olCw128pzXo7xqo876yry/nk4dSXiPZbORGsW1fKtE4ux6Z9tAsrdTiM UzbJyq8sEzTg7ReKZxUjJpTer0uaoZjFtUvoJe6GyWayX+qejCoL5MkT+KSFCUGTBhIs 7VO157AnH22J2DVZH7/VbdcHMe5WczkS/gfbNE5kMunAzYUyrXXrw9TOUQcigZQJU10i uT+0Y2ifWBXcW/wM70aJxt20lteFTcAXrCZ2h9JtSL+JdOp3oRVv3iE6RgZNSG73xxPf zw4Q== X-Gm-Message-State: AJcUukcjArzhUPgzZMT/DEb9svAccNJNDfydPj5OynkSTEoF0tPovfYM 2S1NyetXekR9LUh6PgJCJ4ut2llSuKA= X-Google-Smtp-Source: ALg8bN4W1B73tashNKgY76/h07KOpUe/E6xznk7cd4wn/voopUxlMq3TOeJTXUk9eoMD/sx3nG9fvQ== X-Received: by 2002:a1c:4807:: with SMTP id v7mr4770489wma.53.1547023599117; Wed, 09 Jan 2019 00:46:39 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n82sm12776455wma.42.2019.01.09.00.46.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 00:46:38 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Malathi Gottam , Stanimir Varbanov Subject: [PATCH 1/4] venus: firmware: check fw size against DT memory region size Date: Wed, 9 Jan 2019 10:46:13 +0200 Message-Id: <20190109084616.17162-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190109084616.17162-1-stanimir.varbanov@linaro.org> References: <20190109084616.17162-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP By historical reasons we defined firmware memory size to be 6MB even that the firmware size for all supported Venus versions is 5MBs. Correct that by compare the required firmware size returned from mdt loader and the one provided by DT reserved memory region. We proceed further if the required firmware size is smaller than provided by DT memory region. Signed-off-by: Stanimir Varbanov Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/firmware.c | 54 +++++++++++--------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 6382cea29185..79c7e816c706 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -134,6 +134,7 @@ struct venus_core { struct video_firmware { struct device *dev; struct iommu_domain *iommu_domain; + size_t mapped_mem_size; } fw; struct mutex lock; struct list_head instances; diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c index c29acfd70c1b..6b509ffd022a 100644 --- a/drivers/media/platform/qcom/venus/firmware.c +++ b/drivers/media/platform/qcom/venus/firmware.c @@ -35,14 +35,15 @@ static void venus_reset_cpu(struct venus_core *core) { + u32 fw_size = core->fw.mapped_mem_size; void __iomem *base = core->base; writel(0, base + WRAPPER_FW_START_ADDR); - writel(VENUS_FW_MEM_SIZE, base + WRAPPER_FW_END_ADDR); + writel(fw_size, base + WRAPPER_FW_END_ADDR); writel(0, base + WRAPPER_CPA_START_ADDR); - writel(VENUS_FW_MEM_SIZE, base + WRAPPER_CPA_END_ADDR); - writel(VENUS_FW_MEM_SIZE, base + WRAPPER_NONPIX_START_ADDR); - writel(VENUS_FW_MEM_SIZE, base + WRAPPER_NONPIX_END_ADDR); + writel(fw_size, base + WRAPPER_CPA_END_ADDR); + writel(fw_size, base + WRAPPER_NONPIX_START_ADDR); + writel(fw_size, base + WRAPPER_NONPIX_END_ADDR); writel(0x0, base + WRAPPER_CPU_CGC_DIS); writel(0x0, base + WRAPPER_CPU_CLOCK_CONFIG); @@ -74,6 +75,9 @@ static int venus_load_fw(struct venus_core *core, const char *fwname, void *mem_va; int ret; + *mem_phys = 0; + *mem_size = 0; + dev = core->dev; node = of_parse_phandle(dev->of_node, "memory-region", 0); if (!node) { @@ -85,28 +89,30 @@ static int venus_load_fw(struct venus_core *core, const char *fwname, if (ret) return ret; + ret = request_firmware(&mdt, fwname, dev); + if (ret < 0) + return ret; + + fw_size = qcom_mdt_get_size(mdt); + if (fw_size < 0) { + ret = fw_size; + goto err_release_fw; + } + *mem_phys = r.start; *mem_size = resource_size(&r); - if (*mem_size < VENUS_FW_MEM_SIZE) - return -EINVAL; + if (*mem_size < fw_size || fw_size > VENUS_FW_MEM_SIZE) { + ret = -EINVAL; + goto err_release_fw; + } mem_va = memremap(r.start, *mem_size, MEMREMAP_WC); if (!mem_va) { dev_err(dev, "unable to map memory region: %pa+%zx\n", &r.start, *mem_size); - return -ENOMEM; - } - - ret = request_firmware(&mdt, fwname, dev); - if (ret < 0) - goto err_unmap; - - fw_size = qcom_mdt_get_size(mdt); - if (fw_size < 0) { - ret = fw_size; - release_firmware(mdt); - goto err_unmap; + ret = -ENOMEM; + goto err_release_fw; } if (core->use_tz) @@ -116,10 +122,9 @@ static int venus_load_fw(struct venus_core *core, const char *fwname, ret = qcom_mdt_load_no_init(dev, mdt, fwname, VENUS_PAS_ID, mem_va, *mem_phys, *mem_size, NULL); - release_firmware(mdt); - -err_unmap: memunmap(mem_va); +err_release_fw: + release_firmware(mdt); return ret; } @@ -135,6 +140,7 @@ static int venus_boot_no_tz(struct venus_core *core, phys_addr_t mem_phys, return -EPROBE_DEFER; iommu = core->fw.iommu_domain; + core->fw.mapped_mem_size = mem_size; ret = iommu_map(iommu, VENUS_FW_START_ADDR, mem_phys, mem_size, IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV); @@ -151,7 +157,7 @@ static int venus_boot_no_tz(struct venus_core *core, phys_addr_t mem_phys, static int venus_shutdown_no_tz(struct venus_core *core) { struct iommu_domain *iommu; - size_t unmapped; + size_t unmapped, mapped = core->fw.mapped_mem_size; u32 reg; struct device *dev = core->fw.dev; void __iomem *base = core->base; @@ -166,8 +172,8 @@ static int venus_shutdown_no_tz(struct venus_core *core) iommu = core->fw.iommu_domain; - unmapped = iommu_unmap(iommu, VENUS_FW_START_ADDR, VENUS_FW_MEM_SIZE); - if (unmapped != VENUS_FW_MEM_SIZE) + unmapped = iommu_unmap(iommu, VENUS_FW_START_ADDR, mapped); + if (unmapped != mapped) dev_err(dev, "failed to unmap firmware\n"); return 0; From patchwork Wed Jan 9 08:46:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10753635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0D07513B4 for ; Wed, 9 Jan 2019 08:46:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1F5628FBA for ; Wed, 9 Jan 2019 08:46:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E564D28FC3; Wed, 9 Jan 2019 08:46:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A526D28FBA for ; Wed, 9 Jan 2019 08:46:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730011AbfAIIqo (ORCPT ); Wed, 9 Jan 2019 03:46:44 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35990 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729965AbfAIIqn (ORCPT ); Wed, 9 Jan 2019 03:46:43 -0500 Received: by mail-wm1-f66.google.com with SMTP id p6so7205765wmc.1 for ; Wed, 09 Jan 2019 00:46:42 -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=k4RL04dCWBEEiRneWm+s6fPFvXmhyEUAvF7ZZsTQAKI=; b=E2Ze6TIfo+LPyuH/G0b3V4EeUGV5UuYUgXTsoeZm8TvnFXgxyTeptTjCc3KBQ/2LqZ 2EAVEQu8R8zishLal8B0Tbg7rzvra2CaRYpGEpEP3bDTdYPaRowC8VYj6AgnaJnlk0z3 s7ZrrP5fNutXS9bgAcxfovIqBa/Dpsl6vPnAc= 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=k4RL04dCWBEEiRneWm+s6fPFvXmhyEUAvF7ZZsTQAKI=; b=TxU0pi+3gO4/qFwTFhqXoUTmG9ZtG1fDlKWFgIDIRPPXfRa1PG7d52ca0ye07EILuJ hJpU29fvdDxTNmlvNuVMiC/wIL1oDGQnK7Fzx7D5zTQOfeLwMEQFDzlSltpUEIMVtVC6 gAo6kFZifIfPl0EClQCYnL9A/qeB5Nnyegc2dVe+Ro20yFVrHwH23FUdqD/ofxhf0bVh 7KXiukWFlaTM6VZ5MROl1yZg8nmo/AapdUnMKW+4HumdteybJ5FgmrppIHDKadJ7nQ8g 2WKjm+uyU04N8Q9xKYc1E2o86GKbschj8s42OzYUQ97cQWc+20kBmCqfg7+2+AjrPD6z kVrw== X-Gm-Message-State: AJcUukeUUzGUs0ZtcByx5eYwN3AFjaSseOHYThgj7bWxsGthdzBH6C6w AY/Deajuy0ia8lWyIm2x4CUd2Cp9OlY= X-Google-Smtp-Source: ALg8bN7jwiJwbPyAYcxqnoLwTzP+P5GY6RlYE4niBN5d5Yd13yjCudvy7f9Ab1EaUTd7vN5pAQ2oCA== X-Received: by 2002:a1c:4046:: with SMTP id n67mr4387280wma.123.1547023601122; Wed, 09 Jan 2019 00:46:41 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n82sm12776455wma.42.2019.01.09.00.46.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 00:46:40 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Malathi Gottam , Stanimir Varbanov Subject: [PATCH 2/4] venus: core: corect maximum hardware load for sdm845 Date: Wed, 9 Jan 2019 10:46:14 +0200 Message-Id: <20190109084616.17162-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190109084616.17162-1-stanimir.varbanov@linaro.org> References: <20190109084616.17162-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This corects maximum hardware load constant in per SoC resources for sdm845 aka Venus v4. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index cb411eb85ee4..d95185ea32c3 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -455,7 +455,7 @@ static const struct venus_resources msm8996_res = { .reg_tbl_size = ARRAY_SIZE(msm8996_reg_preset), .clks = {"core", "iface", "bus", "mbus" }, .clks_num = 4, - .max_load = 2563200, + .max_load = 3110400, /* 4096x2160@90 */ .hfi_version = HFI_VERSION_3XX, .vmem_id = VIDC_RESOURCE_NONE, .vmem_size = 0, From patchwork Wed Jan 9 08:46:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10753643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2169B13B4 for ; Wed, 9 Jan 2019 08:47:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1256528FB8 for ; Wed, 9 Jan 2019 08:47:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03D0A28FBE; Wed, 9 Jan 2019 08:47:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A81C128FB8 for ; Wed, 9 Jan 2019 08:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729826AbfAIIrA (ORCPT ); Wed, 9 Jan 2019 03:47:00 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:40616 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730006AbfAIIqo (ORCPT ); Wed, 9 Jan 2019 03:46:44 -0500 Received: by mail-wm1-f67.google.com with SMTP id f188so7190754wmf.5 for ; Wed, 09 Jan 2019 00:46:43 -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=JVy9rLJK1wH8GJo67NVVXAN3d7xcFte20Fp4Qnn85fo=; b=MPiWS2MBeHIODDV+uJsBa3wrD2tUVziY2qsazfgicITBD9HIAvvn1jfwHgpM92yl2R 5Kvm66vuGRNm03lPXXvs1U7f+pqt0T9SG0w7QSX5XrkKt/fi5zCo2hZRs7O8R04V38TB cJhMqeulyFiRL4QuPfy7aC2T3Q6P2IvEcXKq0= 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=JVy9rLJK1wH8GJo67NVVXAN3d7xcFte20Fp4Qnn85fo=; b=l2TW6H5lSlN7ZtP0EjFJH22PUlUU1tV9ejmIJDu8qxXND0sjPEyo15C+b1DeqcFAQk ltq3na+JkK1jqB/iqY2wwQA7sGCgfZELxItywk4P2Qtg/rZLMkAHex2yz49HnGcQ8z/T jafpfnJyN1aIwi/jq9nNHfxFCseg7/EEF3K9vJ58VlYG6e4REnyWRu6BL5joCMEC6+i7 0zl5xGckPkrpj4OfXm3+rHaZINMnHKrv/73wkGc2MQeLWeZ4kJ8YbMkw3XYbc5oygKzk eg9pxUHVeCdR/QE7aLRkO9/CeJXGnlvsJ1+z/c3D0HpcbDlD22t2ihr+xjlf//ywED8z Y2Jw== X-Gm-Message-State: AJcUukfHrH973iZwKwQXVq5PXvu13X95nVTxuU0JzJO4hPfjYZSBJ+61 PfSYRi81Qwy7rJ/mhB2nUrb5iHPnOSs= X-Google-Smtp-Source: ALg8bN6MIuM7WcHY1reYDYS60QyEhkRMZpK/jQ1Ae7MSSl86lFtX8sBDN3qFYcjDEXcPbSIIbhc47A== X-Received: by 2002:a1c:8c13:: with SMTP id o19mr4432885wmd.56.1547023602995; Wed, 09 Jan 2019 00:46:42 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n82sm12776455wma.42.2019.01.09.00.46.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 00:46:42 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Malathi Gottam , Stanimir Varbanov Subject: [PATCH 3/4] venus: core: correct frequency table for sdm845 Date: Wed, 9 Jan 2019 10:46:15 +0200 Message-Id: <20190109084616.17162-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190109084616.17162-1-stanimir.varbanov@linaro.org> References: <20190109084616.17162-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This corrects clock frequency table rates to be in sync with video clock controller frequency table. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index d95185ea32c3..739366744e0f 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -465,10 +465,12 @@ static const struct venus_resources msm8996_res = { }; 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 */ + { 3110400, 533000000 }, /* 4096x2160@90 */ + { 2073600, 444000000 }, /* 4096x2160@60 */ + { 1944000, 404000000 }, /* 3840x2160@60 */ + { 972000, 330000000 }, /* 3840x2160@30 */ + { 489600, 200000000 }, /* 1920x1080@60 */ + { 244800, 100000000 }, /* 1920x1080@30 */ }; static const struct venus_resources sdm845_res = { From patchwork Wed Jan 9 08:46:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10753641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B951F91E for ; Wed, 9 Jan 2019 08:46:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB0CA28FB8 for ; Wed, 9 Jan 2019 08:46:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E34028FBE; Wed, 9 Jan 2019 08:46:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59CBC28FB8 for ; Wed, 9 Jan 2019 08:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729729AbfAIIqz (ORCPT ); Wed, 9 Jan 2019 03:46:55 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42119 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730061AbfAIIqr (ORCPT ); Wed, 9 Jan 2019 03:46:47 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so6746424wrx.9 for ; Wed, 09 Jan 2019 00:46:46 -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=QhVYgwj7yl7MmrsTxcuTj32eYDDbC109TInYY9lJ7N0=; b=KzLn6sB5gXyDiESLuXVHb8RSBZdS3Z+JGMfZ7rjtrCXazereVFyE6KzxRKqp1ReyF0 bOOkU6dJSOmE0O5YjnDybR816ROyzy4/FPr9ildnJSUuCVJllCDVQuk0r36XlptvTelG Ql9ffvZBNu3zkyIIxajgs4XqFK+JHE16rdbq8= 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=QhVYgwj7yl7MmrsTxcuTj32eYDDbC109TInYY9lJ7N0=; b=MSLonNsj+VYsPs5I3DI6KGHzqItlLe3jPUa3tSIR8WIpgyyUpHKKdECvTnhB7+zmO+ ZXiGPh9Asfun5OwHUA9h41z6vSq2K4zMgnCFNcJT1xHMkrEZvJNPfrP7T7uaywiPvPLE G+4z0jiUf7oIv0w7ukcuEMDtAEzpz9As/OKGBkTWPritvU53xVqK6cSz0paHX6bvOc6z Z9XVjnh1mjCGwtStEo4JB7/BzntXdmqfv0hI//nj0RibOsVBoUdaKK0VzjQqNioHnN+r xN8QUvfyYKMP+ZG/vbIQhWNADphQ4VozbOm32mHlodWRgECVyrGQ6jt5NonkgT9Ptb2u XkRA== X-Gm-Message-State: AJcUukdA/79zbfD0I6uSCYsHceRZDAoyjE/pOvHSueQAzZivWaM7jsm+ JQd+8mdzTFMLXbb6MBLhK0LDxSPrWoM= X-Google-Smtp-Source: ALg8bN5uJio6uuBP8RtKt2F0rjR7xDtzJIx6UmStkfDwSqGSC9QxbvF7g6y9LsvkKrpA8bsUF80Ayg== X-Received: by 2002:adf:c452:: with SMTP id a18mr4262717wrg.145.1547023605976; Wed, 09 Jan 2019 00:46:45 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n82sm12776455wma.42.2019.01.09.00.46.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 00:46:45 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Malathi Gottam , Stanimir Varbanov Subject: [PATCH 4/4] venus: helpers: drop setting of timestap invalid flag Date: Wed, 9 Jan 2019 10:46:16 +0200 Message-Id: <20190109084616.17162-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190109084616.17162-1-stanimir.varbanov@linaro.org> References: <20190109084616.17162-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The zero timestap is really a valid so not sure why I discarded it. Fix that mistake by drop the code which checks for zero timestamp. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index e436385bc5ab..5cad601d4c57 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -439,9 +439,6 @@ session_process_buf(struct venus_inst *inst, struct vb2_v4l2_buffer *vbuf) fdata.flags = 0; fdata.clnt_data = vbuf->vb2_buf.index; - if (!fdata.timestamp) - fdata.flags |= HFI_BUFFERFLAG_TIMESTAMPINVALID; - if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) { fdata.buffer_type = HFI_BUFFER_INPUT; fdata.filled_len = vb2_get_plane_payload(vb, 0);