From patchwork Wed Jun 13 15:07:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138481 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp847483lji; Wed, 13 Jun 2018 08:09:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkfVS8W5sG6ffYDOEzePEMQp3QzK4Y5er1s/6EO/Kj4Y8EtKdu5MtKBkwNh8C0EFhGFEu7 X-Received: by 2002:a62:50d6:: with SMTP id g83-v6mr5278669pfj.31.1528902558126; Wed, 13 Jun 2018 08:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902558; cv=none; d=google.com; s=arc-20160816; b=Sh+AiNy7iEK0N2C1FFaCq0OSgXyyDlhal3Z3PSk/34JqYuvzxUTaKMgxccHDa/pegh 0tafoiWc3U+xoPk0OvmniZKgS0KvDS74EVO8Gu1CDS9V+mFM5J6TFIjc25XFZy/Lo1Hu RewMJaAi/xdkZSuXD+FRGE/GKfhPR/x/52lYjKxFQHxR11nJkfJpQryCzCMUJDBwUB5i 5JueDwn61Jo7fgmMxXk3wU5dQwYiOFjQ5RtR+7/dJLfSPDRxdjk6iY1waDB3CDrN/Cps yg+3N9Vfh9rWB1pFqBI/MOfjqUw35mR6TyIjVNeq6iNAzvEopx2wxqBlX0e4Ba/v7oLE so6g== 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=zcA1bMzMKszM/ZqPgSXw+wRPd+0JBjNguhSfmeGv3BM=; b=Sdcqr0SoZYbWB2YzH2Z/3Jnon1kyaVhtiToPpQ/+ilo/5q162Ka+G/NjUgxIExV5Ks kqLQpXCmG/rhDTBpEuQ0f1wU7hn26jwzAOBZuGs6jNGKQX0IHVazDjEkkUwTHBqy9C47 89xs2n0XgSJveS/fCCUmk+qaJ/jqq/WfWMME7+U48HhkpLta/dGW/mBDGaF7g3oCR/9B Df3phB3fZ01tO59mZVXK3esUNNrlC+jI3uNxyEwxOSXIEfqaAVcXNqcnq9I4aOuTGDmZ fCUCaVZ5C6lgoQxvIq8ZImgzsVFP2DoQQK0oomf0UnTgdfVnHNhbCE2m0qXTnEjtS2SZ UKvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TF0Mqgh5; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 z3-v6si3041981plb.228.2018.06.13.08.09.17; Wed, 13 Jun 2018 08:09:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=TF0Mqgh5; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S935980AbeFMPJP (ORCPT + 4 others); Wed, 13 Jun 2018 11:09:15 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:42168 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935956AbeFMPJM (ORCPT ); Wed, 13 Jun 2018 11:09:12 -0400 Received: by mail-wr0-f196.google.com with SMTP id w10-v6so3138321wrk.9 for ; Wed, 13 Jun 2018 08:09:11 -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=zcA1bMzMKszM/ZqPgSXw+wRPd+0JBjNguhSfmeGv3BM=; b=TF0Mqgh5bSpxgUlwke8em8VV7DVKMQYAGM/9iY6iqAKHrgmi44xTqcbM4iiN7kJtgA n26bilFX6CLEoRNFMdGUlYOgX8u9AmOh3QRRckv6rXx2sr5g4Toj6W9ctFVWQKCdBWe8 vuoWZC11ETuVtPGDilc/g5wkrlyaeDKoLj5ao= 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=zcA1bMzMKszM/ZqPgSXw+wRPd+0JBjNguhSfmeGv3BM=; b=UfrxWCtXOg6KCKougj1NvyE+lvQrZZAaUV0wpwI9048qKetuJrxLuWSgBHhfegIM1M DuU/Kv6LtoEhMCT3hWalh1TovMOsRSEBffb13JIbZPWeJAA/XZ5fzp5RE5FjqbBsdFOP XnR4Rm4vI+LH3+NddSpihqaTEMEH13PYGzPgGlRoK7QRdh24ExTDNrVpv7rDa44UpEHs PsLG6/DEXTzdxZEOtZ74KY4FVSQjNFkKtkuF9TmdhFiRMoG3o96a5fhBQfAhYekJMWAK bftKGVutYIue/7wr7B9EIHnwgCvl/pXXKJyEUPn6sK7tbiIB00gIET9Ba9uEO5H1B7GZ JpVw== X-Gm-Message-State: APt69E0sBG4IBlsvgyWIMm+oaE2+KvLVd9R5OhYqPVRq8hTlRO8yr9OC AhuiJiWenJPqzq6IFiQZljsCxQ== X-Received: by 2002:adf:c00b:: with SMTP id z11-v6mr4284465wre.268.1528902551308; Wed, 13 Jun 2018 08:09:11 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:10 -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 v3 05/27] venus: hfi: support session continue for 4xx version Date: Wed, 13 Jun 2018 18:07:39 +0300 Message-Id: <20180613150801.11702-6-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This makes possible to handle session_continue for 4xx as well. Signed-off-by: Stanimir Varbanov Reviewed-by: Tomasz Figa --- drivers/media/platform/qcom/venus/hfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index bca894a00c07..cbc6fad05e47 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -312,7 +312,7 @@ int hfi_session_continue(struct venus_inst *inst) { struct venus_core *core = inst->core; - if (core->res->hfi_version != HFI_VERSION_3XX) + if (core->res->hfi_version == HFI_VERSION_1XX) return 0; return core->ops->session_continue(inst); From patchwork Wed Jun 13 15:07:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138503 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp855372lji; Wed, 13 Jun 2018 08:15:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJjqAuO92tycuTPBEbh478rRvNy4hhMygA12kUWbo5cx6chV+rGlsDlP7xzYS/huLu88l7l X-Received: by 2002:a62:c45a:: with SMTP id y87-v6mr5393461pff.190.1528902910001; Wed, 13 Jun 2018 08:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902909; cv=none; d=google.com; s=arc-20160816; b=FGSgc0rFujumPYfDKGXYTvjv18Pg7teTWRjsS+WXTORM1vd/UJdl8+FpZVzCkXbMHc lYoiqKrQq5LFwKqZwK+Yt4Emk1hRRGp9HXxATmSP1EJROrMXe2E86scPLaaCnmQ1GwDD Sy2r2t5IFtL+xmrc4es6euEEkmnOaHNbF5Ub33asv76xmTZxTZwsc2hnmvvrj39Zmn3c +VhiIIvl8YIiEcGTuJQikSUMdkIGELrcJfGxEEt0RsdE84hI8vOvTwW5//4y2lASwJCk NWsBiuWNBB8xMZ/0dMtdUM+hfqBjseUbSh27WqXABACCJ0Us54mPZvSa0b46r5t0DN0Y FMMg== 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=uzFPQjolv+jdPi2Rzia1jtwxKrkKgXp+JYTymg81g5w=; b=Cy/HDysir2FFHtxN9vKRyaLp8y32qoq+nHZx9dn3m2pHhXGW3WJP+30F8UeLB85lKU Oti76J+SCd0yOJmy1B3phNG8H3T2d16iwJA3xo7JCJ7YbzmALnAHffhlTJ0x68GEAqCJ weM7OAtxtlQ7RFgaclpLh41jEX9pnRHcd+EG0UT1QEdmAi7wJ6XajV81jWTVJ1Min0ZB icaipDX4yu1wZox9y8DRF0iATEglHJXnbbO7l9jbvSW+0kAc1yfWiN8SARwyBdaeCAYF Be2qKDOqfwudosih2jtG0F/lpozkc6oaAjeKrVAFT2qyEXN2s0+cXL0lCh8LjAanp9Rz 3UVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYahaee9; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 l190-v6si2654716pgl.198.2018.06.13.08.15.09; Wed, 13 Jun 2018 08:15:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=WYahaee9; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S935815AbeFMPPI (ORCPT + 4 others); Wed, 13 Jun 2018 11:15:08 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:40535 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936010AbeFMPJV (ORCPT ); Wed, 13 Jun 2018 11:09:21 -0400 Received: by mail-wr0-f194.google.com with SMTP id l41-v6so3135452wre.7 for ; Wed, 13 Jun 2018 08:09:21 -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=uzFPQjolv+jdPi2Rzia1jtwxKrkKgXp+JYTymg81g5w=; b=WYahaee9FKtN9RHnrOnFKlknZvB2h0rYgwo/5nedys4o7g2YZYgQRAdBQ2GhGH/712 JsC0sFJRZLEZM+P8FYfehiho8g9UjKvTg3m1t8NoMTie3nZ5Kz2U+bpbPBW2U3FNpQ6o Z0PSeSnIQKuROVwvjRr07jbLFfEibnFT3BXNk= 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=uzFPQjolv+jdPi2Rzia1jtwxKrkKgXp+JYTymg81g5w=; b=jYbMB3hPTUiEtBDOWy91t4Xn8oP281L9RfoBAEU1lX5QW8t9cfGMKSnjG4eEhWDjoA v0LloNRxDxzvlnBI2xfLOOhUiJxMLnoikxnJfu3ISc+GxzNriHEEuhRJmig6AmX2DWmP OpSXWi43oR6+mXiHJU8NavGMYnvdTY9qr4PFH19LJq4n+x2/IEjwfqBpyig6wySR2NlE H/+Q7XITIVyesX8RFuJKJgV98dSSJFGW4CG/WSLg1jzMqkPzGPnLPvTqmx2dDIbmXrLu VkhjJWF1W6v1poPV1jxbzd8tm0Xb0EjVYbQ7/GfJ6mpXMUXUz+0j8ezRqzjE+LrFi8y5 a0Mg== X-Gm-Message-State: APt69E32aNEmG//QeLrMDy5528uvk7ny8cd6noaoLS4eGhW6r7XLmaaq BFxm42B7Awf2Z8Ns5k0iffbg6w== X-Received: by 2002:adf:c00b:: with SMTP id z11-v6mr4284919wre.268.1528902560453; Wed, 13 Jun 2018 08:09:20 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:20 -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 v3 10/27] venus: hfi_venus: add suspend functionality for Venus 4xx Date: Wed, 13 Jun 2018 18:07:44 +0300 Message-Id: <20180613150801.11702-11-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This adds suspend (power collapse) functionality by reusing the suspend function for Venus 3xx and also enables idle indicator property for Venus 4xx (where it is disabled by default). Signed-off-by: Stanimir Varbanov Reviewed-by: Tomasz Figa --- drivers/media/platform/qcom/venus/hfi_venus.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 7a83e967a8ea..9366dae16b0a 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -879,6 +879,14 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev) if (ret) dev_warn(dev, "setting fw debug msg ON failed (%d)\n", ret); + /* + * Idle indicator is disabled by default on some 4xx firmware versions, + * enable it explicitly in order to make suspend functional by checking + * WFI (wait-for-interrupt) bit. + */ + if (IS_V4(hdev->core)) + venus_sys_idle_indicator = true; + ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator); if (ret) dev_warn(dev, "setting idle response ON failed (%d)\n", ret); @@ -1533,7 +1541,8 @@ static int venus_suspend_3xx(struct venus_core *core) static int venus_suspend(struct venus_core *core) { - if (core->res->hfi_version == HFI_VERSION_3XX) + if (core->res->hfi_version == HFI_VERSION_3XX || + core->res->hfi_version == HFI_VERSION_4XX) return venus_suspend_3xx(core); return venus_suspend_1xx(core); From patchwork Wed Jun 13 15:07:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138492 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp850920lji; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL6wk2qKAtAY04BHD2awt4rrG3o+Sdhxw6/QSzPTh8xbY6SljOe6pWWGmIb5aw6LMjBBA2i X-Received: by 2002:a63:6d0:: with SMTP id 199-v6mr4368550pgg.338.1528902695810; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902695; cv=none; d=google.com; s=arc-20160816; b=IXRTz+C7A6+DS1Zq4e7IIj6zgn5oTdzLBc15WQQ9uq5Hriecya/7vb6SUSpIn5EPZ8 XerwdIg65peQ38snZMBYTcSU57SlegcZdmCLP36jH4q2erDlJEBMxkgcyBIEJPMMNMuK J3uJaJ0DvBbzjTMx3ZIbHwfn11iiV9VdvyS+g/sQGEEmiao/LIUQXdyM5sX0aYL2SJlA WkJ7HT0lH3g6cOMQMwI0LbwfIvJvJZ7WHREi8wpjUzA1Dk9r4Ia29SNYlyL0Z88pwAnv 30DuM8ABeRd/kpoLm9y/ZBeL5TxxHiQ4/B16M3q5LdysCCvM55dCfFabGjJ4S5jp5wZT a8jQ== 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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=tqSwkNC4HRdZoZOXIqk+wqCgYWNI1sIO8FyhNiByr2QmacdRTLjeveUNTgXVFzq1C3 0/dh85/y+dzoPGUYseiGC+CLJjvBoxzep4iTPiGFvvsdtFxNUMDwfJQlqdMhKwmVySBZ QzAcDO7YYDiDEyiiX8P/H+gBce6Ynek8zGoykiNzTAGSSV7zgeG5SGNyb7ol8Oc3Q2FB ds6pbtZ8NweI3pr55gCBHT1EhRW3m0sBXrX0HzEb5050V0qZyG7hQgMHfBfRo4gwaC1f M3PirM/BZ1De9lqeCPe3I/NCSY8CVk9/9chHySjlXD10SMp79cugGzuIq4vP+7h1keYQ ZarQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bc6Vc+K7; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 g7-v6si3003690plt.149.2018.06.13.08.11.35; Wed, 13 Jun 2018 08:11:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=bc6Vc+K7; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S936022AbeFMPLc (ORCPT + 4 others); Wed, 13 Jun 2018 11:11:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35942 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936051AbeFMPJk (ORCPT ); Wed, 13 Jun 2018 11:09:40 -0400 Received: by mail-wm0-f65.google.com with SMTP id v131-v6so6114436wma.1 for ; Wed, 13 Jun 2018 08:09:40 -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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=bc6Vc+K7NDABYOCuuC83CwKHPsRdm0cY2lubJEApqZ+FlP8y/peI/zqnmZfbumzopI zPjEr5wMsZX+ujKbvJB81zM+e5xfLvpLxYtcG1ItT+Xhks7RAfacxUft5bVadL1IccW4 P3Ii0F7YINxGg3IGc+3kc0dwY5oQBI23spfhU= 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=0nhKxdCOw37kKVgSprpQsFMGs84elFtpX09ZZT6Wn24=; b=gJtdHvMlKCE1rzRkhPC6ueZ98noWS05Z4f2N/IY2cDfjLtCHdX5e7iGWitbUHQHxdw CW8PZvOqTqYf6XqiaujzBPvqLLjrxQNhAJs6a2Mns9Fami5zAf2dv9jex7xsks1t8qQX +HJYdf4BU219RsEHs+CL2qGhhMn3EcQIwdaxYa5W9TYpIWXUA/AXuksJwKY5GG4sZ+Wg ti2CEvYCp54h2nedcO2+DKNDPjU4PX0RMKVQ0VuejJ9Wlrf5uHgjx8ks8ngvi1nI9UAu edJsbMfwOYPnwA3q5m8E7/8AGSe2iUVBP4p7ynNhmraLNjVRM9U6YXCyrNyK8ECBXjSb 84hw== X-Gm-Message-State: APt69E1tkQJm4kM6LW0kM75m8/Omi5huUJ8OCJF95JkRQIVwORR+pnf6 2Ap5LgDV/B3HZH5ChnHTm1spdaFpIOE= X-Received: by 2002:a1c:9c4c:: with SMTP id f73-v6mr3633958wme.141.1528902579372; Wed, 13 Jun 2018 08:09:39 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:38 -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 v3 23/27] venus: vdec: a new function for output configuration Date: Wed, 13 Jun 2018 18:07:57 +0300 Message-Id: <20180613150801.11702-24-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Make a new function vdec_output_conf() for decoder output configuration. vdec_output_conf() will set properties via HFI interface related to the output configuration, and keep vdec_set_properties() which will set properties related to decoding parameters. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 55213a8d55a3..4d3f1cd7ed1d 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -545,6 +545,22 @@ static const struct v4l2_ioctl_ops vdec_ioctl_ops = { static int vdec_set_properties(struct venus_inst *inst) { struct vdec_controls *ctr = &inst->controls.dec; + struct hfi_enable en = { .enable = 1 }; + u32 ptype; + int ret; + + if (ctr->post_loop_deb_mode) { + ptype = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER; + ret = hfi_session_set_property(inst, ptype, &en); + if (ret) + return ret; + } + + return 0; +} + +static int vdec_output_conf(struct venus_inst *inst) +{ struct venus_core *core = inst->core; struct hfi_enable en = { .enable = 1 }; u32 ptype; @@ -569,14 +585,6 @@ static int vdec_set_properties(struct venus_inst *inst) if (ret) return ret; - if (ctr->post_loop_deb_mode) { - ptype = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER; - en.enable = 1; - ret = hfi_session_set_property(inst, ptype, &en); - if (ret) - return ret; - } - return 0; } @@ -724,7 +732,6 @@ static int vdec_verify_conf(struct venus_inst *inst) static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) { struct venus_inst *inst = vb2_get_drv_priv(q); - struct venus_core *core = inst->core; int ret; mutex_lock(&inst->lock); @@ -753,12 +760,9 @@ static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) if (ret) goto deinit_sess; - if (core->res->hfi_version == HFI_VERSION_3XX) { - ret = venus_helper_set_bufsize(inst, inst->output_buf_size, - HFI_BUFFER_OUTPUT); - if (ret) - goto deinit_sess; - } + ret = vdec_output_conf(inst); + if (ret) + goto deinit_sess; ret = vdec_verify_conf(inst); if (ret)