From patchwork Wed Jan 23 10:39:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10776983 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 381EF14E5 for ; Wed, 23 Jan 2019 10:40:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23E762B86D for ; Wed, 23 Jan 2019 10:40:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16F442B594; Wed, 23 Jan 2019 10:40:44 +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 85ABA2B448 for ; Wed, 23 Jan 2019 10:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727434AbfAWKk0 (ORCPT ); Wed, 23 Jan 2019 05:40:26 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41514 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727423AbfAWKkZ (ORCPT ); Wed, 23 Jan 2019 05:40:25 -0500 Received: by mail-wr1-f68.google.com with SMTP id x10so1795963wrs.8 for ; Wed, 23 Jan 2019 02:40:23 -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=3zHqWWuy6QdexbPT1WjzShm6eV44aO+EPNO+slMK+F4=; b=U97/VS8BPPEXIvimWdZBzJb95FgDVep4KB90tpWx6CfjmRapHheIkX/OvvVmCJbSLY 7N8jE7t9ZVGN9z7rVoMnXPk/IT/RaudN/rvhuinP16iGjotwoKLItKyA3QEcI4ODqDUE heze4eIc0tO+64BuREn9eDtSZ4xBqctXgsUzQ= 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=3zHqWWuy6QdexbPT1WjzShm6eV44aO+EPNO+slMK+F4=; b=ErN/oJtpWyTKxaf82IPamippKeoMnEkvspM/RGY5fJkcWbHpIF3lbSDhXzA2bSDsac MLiBDkvkTL7dQr+iyByW771ErkfwAq0QznsnWTHNoBdTFZUUGeFRtXD5olcO7424Q1pu fPKi1Cj9tT8M/fyfrKIHVJw3t8tO6acskSfIC6R1KcY0J4GZy6uSfdQ9QVkci4yM2GBU AUaoLNSIjwlq6+b7XPRz01jGYQz+zvScXW8GZ2AyriWJ0WNUPIYO/GUel7M+5JmjG5NI cWR2D7YC1PtkAziE3mIn3Gt8PHCUo3DlfQSVB+c1/8zp8yaZPtwk9FjaFcp3I+TuZDh6 UZWA== X-Gm-Message-State: AJcUukfiXqhTsW8a6xHyn2bzxcmUpxXu2lDrbCBVPmphjbIQh4h1m/6m ++0XwDygyH0njldegM5HuQn8PXcZ1MQ= X-Google-Smtp-Source: ALg8bN7uNDmPxaoEJFigbkxCqBkDWQWarNv1EK53vSYSoGPuYbdMR0EtQnnT8fH44tLapEp3BdiCLQ== X-Received: by 2002:a5d:4d87:: with SMTP id b7mr1969997wru.316.1548240022510; Wed, 23 Jan 2019 02:40:22 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id b18sm84525211wrw.83.2019.01.23.02.40.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 02:40:22 -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 v2 1/4] venus: firmware: check fw size against DT memory region size Date: Wed, 23 Jan 2019 12:39:46 +0200 Message-Id: <20190123103949.13496-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190123103949.13496-1-stanimir.varbanov@linaro.org> References: <20190123103949.13496-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. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/firmware.c | 53 +++++++++++--------- 2 files changed, 31 insertions(+), 23 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..6cfa8021721e 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); @@ -150,6 +156,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) { + const size_t mapped = core->fw.mapped_mem_size; struct iommu_domain *iommu; size_t unmapped; u32 reg; @@ -166,8 +173,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 23 10:39:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10776989 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 A7B3E91E for ; Wed, 23 Jan 2019 10:40:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99E652BB31 for ; Wed, 23 Jan 2019 10:40:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 973352BB9C; Wed, 23 Jan 2019 10:40:50 +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 4A8F92BBB7 for ; Wed, 23 Jan 2019 10:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbfAWKkp (ORCPT ); Wed, 23 Jan 2019 05:40:45 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34977 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbfAWKk0 (ORCPT ); Wed, 23 Jan 2019 05:40:26 -0500 Received: by mail-wm1-f66.google.com with SMTP id t200so1473724wmt.0 for ; Wed, 23 Jan 2019 02:40:24 -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=LEvH43xu7H3IGM1c03kDUGjc4dAlpCaDkOPzDBfsxYc=; b=k2xCnkOgsNy4I95sYTzT7qLTncbBtKlqDx2NsIdTCosKO2OW6ni291XyQDUoEK6q6Q Chmal0crcMWyVnG+yV16hNll4MFKYl08bSwBE7x3iZ9Qc0qsLi6djhWld7iRO6mmZBzj xUnqmMhYViX0haKP0U8gUKvqYsIpPMRRnoXVQ= 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=LEvH43xu7H3IGM1c03kDUGjc4dAlpCaDkOPzDBfsxYc=; b=m9dn3R27qEG65q4v4Rez6a1rLflsdtJpAwweHhYeX2TA7h3LpKKPk271Bl6g4wjgsU AtMU/gSq9pt5Khmx0QPeCqIEKka3uE4cwYLQH+X4zoF2urpM1RvKxd6rJ1eCceXqBRP6 Cn1g8EvPIfIAbUcOLg1Obt9ULmmqpB0Ws+YTm/R8/k/a3qfzGFXmX303tR4AYrKnCEhE T10sfH1UHPkyiSL5mPqUfY/FWvA5l55BHFQVmHh6jCe48vlbECjD4TkkVl3UifIhKpPh CsJdyk+jn/HTH9HkyssRaOdxT619oMU7LTR8z5NvCFbJSjCk3+p4HomGMrglOoVr1ijc Ikqg== X-Gm-Message-State: AJcUukep9dNsR34kGlGON7IX2CCGuHATrn4jtYr6iqMMsIG+H1mPc/V5 C5whPVtpYX4WdQd76O2ellovaKGiVY4= X-Google-Smtp-Source: ALg8bN6fxo7EYptMsaZ6Ns1NnB5dDFeBR+wOu2j7/n510v6X8d3yGQD94tLRhUZbSMF8MWriD1IOzQ== X-Received: by 2002:a1c:4c10:: with SMTP id z16mr2266123wmf.117.1548240023984; Wed, 23 Jan 2019 02:40:23 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id b18sm84525211wrw.83.2019.01.23.02.40.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 02:40:23 -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 v2 2/4] venus: core: correct maximum hardware load for sdm845 Date: Wed, 23 Jan 2019 12:39:47 +0200 Message-Id: <20190123103949.13496-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190123103949.13496-1-stanimir.varbanov@linaro.org> References: <20190123103949.13496-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 correct maximum hardware load constant in per SoC resources for sdm845 aka Venus v4. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot 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 23 10:39:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10776981 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 B68CD14E5 for ; Wed, 23 Jan 2019 10:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A77F82B888 for ; Wed, 23 Jan 2019 10:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BECA2B9C5; Wed, 23 Jan 2019 10:40:42 +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 4CF0F2BAE6 for ; Wed, 23 Jan 2019 10:40:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727416AbfAWKkk (ORCPT ); Wed, 23 Jan 2019 05:40:40 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55100 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727439AbfAWKk1 (ORCPT ); Wed, 23 Jan 2019 05:40:27 -0500 Received: by mail-wm1-f68.google.com with SMTP id a62so1461065wmh.4 for ; Wed, 23 Jan 2019 02:40:26 -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=tLwvGwMa/nYthJwEagIIh9pYKQ7nxE//zSavTLSwxqs=; b=PgciD2XAnjoYAVFI0Ezfvd+lZ3hiJQlILmgi4f860imXajRKr5UvZnsojJ8Hhu7hG1 pDI/Bt1cYQb8VHiO5GP81jmUP7dsPpeQUiQO3SYpoGRceLBZNYxYlgc8+6rAcDGwcRat 03Rs7jwJiivf39ncCd/zSjlctWXHug5AsfVds= 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=tLwvGwMa/nYthJwEagIIh9pYKQ7nxE//zSavTLSwxqs=; b=GqJ+L2JYYPF1A6AyWDoSSIfasSK9BxDL507EtWiYBDE4JCSnz99frTNuke2eeMsOFf 8KdhODnduusBUsTmlk3cIxQHK/Ye7OdevXS+qPa9O3pAoBTOTLQw9vcg64FA4/y9Dv3s colAa9C9ZMYNJa6SdikG4wTK73c/bkiis3hotCxxGoNZX0amWvqODeOLn1vNqUuNmwg7 UINclMBed9+cBvUzTVCgk/I65w+gJSNPj+m1HF630NpjI6LpSRkp345JXZpdXXt9eyoe Z25L1NfoTBVvvYqJiBitBoMxZ8cwvhSOg8Oc7jzfHuLwvitaot6yiWHEtnnP+zKbSpoL 3zgg== X-Gm-Message-State: AJcUukeqMN0+Sm1FUJ7HGuTOQdDG6A9W1uI2dhw+fuOwb3TsZhD/1SoM aLhCL7HRwTwTkaM51HD2LQi6F3PBXGM= X-Google-Smtp-Source: ALg8bN7JTPs5KQOTuBroB323jZvj7ed1iOmVujqeuSg+GPsBvGzNQMovhpTdWqj37/cMpfVZYh9Qfg== X-Received: by 2002:a1c:2314:: with SMTP id j20mr2162162wmj.142.1548240025471; Wed, 23 Jan 2019 02:40:25 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id b18sm84525211wrw.83.2019.01.23.02.40.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 02:40:25 -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 v2 3/4] venus: core: correct frequency table for sdm845 Date: Wed, 23 Jan 2019 12:39:48 +0200 Message-Id: <20190123103949.13496-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190123103949.13496-1-stanimir.varbanov@linaro.org> References: <20190123103949.13496-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. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot 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 23 10:39: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: 10776975 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 70DBD1575 for ; Wed, 23 Jan 2019 10:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6155E2B822 for ; Wed, 23 Jan 2019 10:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55BEC2BA1B; Wed, 23 Jan 2019 10:40:31 +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 DE1F02B4C8 for ; Wed, 23 Jan 2019 10:40:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727483AbfAWKk3 (ORCPT ); Wed, 23 Jan 2019 05:40:29 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37835 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727464AbfAWKk3 (ORCPT ); Wed, 23 Jan 2019 05:40:29 -0500 Received: by mail-wm1-f65.google.com with SMTP id g67so1451186wmd.2 for ; Wed, 23 Jan 2019 02:40:27 -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=naLY3DB0fFEF8+rWJZdD/W2PWV9f5z/z6JViBOnJMqA=; b=AP0Ic7Dw6nbX4EKdi7eU2eD9LCpW+dpTatSpIiS2Q1A3NR7W3Q8/URmgmw0IHd2yeR C0qVa7293afRu1eo7qa0ibm4KzFdLuOUc8BMYSAkV26oC9duPuh9kGOni1aKensDY/RC XYhFo5GCXynz5jByS374zHWrLWMpNGtrYL4aU= 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=naLY3DB0fFEF8+rWJZdD/W2PWV9f5z/z6JViBOnJMqA=; b=ru4Q9D4pSDxLzXhJvrmO7sEp3gckhLRl0cftXwJ/W4q4PiUKzzoPe3AaJ5EZ2rhB7h i6KWXDjeBK85RSAA+Sx7GRV+93fky/Kl0udw8JzNEgLxMgnl2TF8Ocanh4TA8rcmhBlB lhDBNAF+uUn8K3l7ND7nFpb5n2rTVc4mnCmli7W8VhJx7G80XXsBINpEKCtUwAmDRaRa 6SyQysrqI806e7xZQbjKGxt4txCN1Gp/7/62vS4nx7E3nrMCPN6LmnO1Chyen+XFvN8r UztnMuvbsSQdzf2zgC8m+c6k/GezhrkjXenAv+nsLDWl50m50AAtMAsyk400xvfM5jVW 1tkQ== X-Gm-Message-State: AJcUukedtb/H/F+PMxC6kIcC2W3hIfTiVawUMHReTdZf+8GnMPXSwZUZ 8GpfVhd2trrvt9nS5XyB7Ngbqlq/5ys= X-Google-Smtp-Source: ALg8bN6Eu+1iHB3IH61SXRZhLMWr+urYzCcDTEH7aZ3k0QveqDjZcd49XYdOjBMBZ062rIrndu99tw== X-Received: by 2002:a1c:5604:: with SMTP id k4mr2098756wmb.107.1548240026882; Wed, 23 Jan 2019 02:40:26 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id b18sm84525211wrw.83.2019.01.23.02.40.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 02:40:26 -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 v2 4/4] venus: helpers: drop setting of timestamp invalid flag Date: Wed, 23 Jan 2019 12:39:49 +0200 Message-Id: <20190123103949.13496-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190123103949.13496-1-stanimir.varbanov@linaro.org> References: <20190123103949.13496-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 timestamp is really valid so fix that mistake by dropping the code which checks for zero timestamp. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot 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);