From patchwork Wed Nov 11 14:37:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323474 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp444546ils; Wed, 11 Nov 2020 06:40:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzijKQlidM8zsgG1f3JH6ho5qylnahl7J65l6DktBaCGJySeARIdJoC1UsQoxryhe+NY20j X-Received: by 2002:a05:6402:216:: with SMTP id t22mr26402177edv.190.1605105633856; Wed, 11 Nov 2020 06:40:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105633; cv=none; d=google.com; s=arc-20160816; b=Xcn5Me9arW3VGlurZyk98AXbme5gIzXhm73LuSy8HDhVa/4w8KP6vFR9AnV5kXaN/S +gcsF+ZhJ7mYDtugMQRO6oggPD7uJXMI8MEE9lmWHuOmBv9X8l0cK4RDlgfvipxIaiZt MRX4gCsdAb4qrAjn28aq6Ooa7vnrc9U6DMVtE3oZbzZA7rilcuKW8WBAiSfHkp5LB00l bVu54DH6JfMXKPoDVSCNX5O0RZofuK3RUeZZYLb5PY6v5ZrdSmayj0ZyD0GmO6Brq6A1 xALEtXvNuxu9xHQVk0wZ+8x0oONZ1SrXIy2lk2wsTy36id9Ou+qCpD4ZR4Prw+fpu/zq nQow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=0wZVM3xTH0rIlT8FcnVb9p0qtohia4y51yWQ3iwO6GE=; b=Fxty2B+1dzH2tTRpGNUyIcG69mpFwVOWwQGDJv8Nu0PZI/YgdnXBvIwHy2Efak58vy YEvJTK5yaX0dl0CTwmIgP/wXvwFSVlDNIGXZUL/a/5sV04kjvnD2/AvoZa2wqWXEGtS5 jc6CHHcdz7g9okVEccGKozKJ5cieJzIFd4POhj72zyKI5rBQmPFkjNtmRXZfw/8lHu6+ EJFqFyNxRkIIvoSVoOT/w+/VJGD/GzSS4Shl0CC1iwwNngyKthDpC2IUvqtLtvi1cPNN LTowHhAPAGss5/o9Q2o01R3pOPSwXk7Z1zhm2gth1uaqm+/OtsN4bQVp/iZ3xilr0uFb cYmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RlEFTHP8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id p89si1633489edd.109.2020.11.11.06.40.33; Wed, 11 Nov 2020 06:40:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RlEFTHP8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727279AbgKKOkZ (ORCPT + 15 others); Wed, 11 Nov 2020 09:40:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbgKKOi0 (ORCPT ); Wed, 11 Nov 2020 09:38:26 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B51C0617A7 for ; Wed, 11 Nov 2020 06:38:25 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id l1so2738437wrb.9 for ; Wed, 11 Nov 2020 06:38:25 -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=0wZVM3xTH0rIlT8FcnVb9p0qtohia4y51yWQ3iwO6GE=; b=RlEFTHP8vmaXYUOiuFwsUx3f5yXYa4g1nViurvjIWCCsjb5FcrTms+0V4N/40jOC3e E8h2ZGscS5N5sLWUzfPCDdbCgfKIZ9uGbS+JMjA/ekvNSYu/77CAUSx+VtEJUnMm7l7+ 9hbZdB27+ZpQID+qEcIAaue0h5c5dL4cMa7PRLI0PWZ5waoq5xLOWsJmCc8weFbpMUXQ qwE2AIUHP3MVGb2a6Y8OhIg7alUEkSE2IdoZWwHsSx1Qk5Wbxjbu6zrK2vKV+46N8uv4 5v5gC4o9/Csshq31Znz4/i+Til1zX9EanBktZOG47gD8sSv7d7KD0NylmfrEkzKQO/ej gD9A== 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=0wZVM3xTH0rIlT8FcnVb9p0qtohia4y51yWQ3iwO6GE=; b=rYlg0Y0QFoYb/ErPKNU2w6JzAr+L5wyudE4KhMV3GTC+gV6394WKk02GL/J6jgAptZ yKksPtBgzK9DAN5YQ1Wi7KLWGfKrKKtTu7SJwthk643KwD9lGRW3jvEi+Lsx7ffLvNPW bqd+Ix5JfaOg6cIn1cyMPs74QXzdtTI99UctNTy6F70nIemO7N5T6ek0YfYreJQQebHi 9te6guuBP1NqsipWOICcoTvVZv17jok9wGcbjQZDlzhv5pLUW9N6Gkk9GCcv5u7XOx4X AvheAy+hnrwFhk7oKud4Zeaf0bVqQYUn0SKLouSdh9UsVX1uAp8f9+B5w6Vqcqakj5He 7x/Q== X-Gm-Message-State: AOAM532gojRFXZ0zAgzb8jfgFJvhomaQyErfqsKX8pMWmxAZDvRNlNVW QVHd+LO/RTMz2Ynphn2J/yZtq7FsrdnLS20Q X-Received: by 2002:a5d:42c9:: with SMTP id t9mr16483576wrr.13.1605105504516; Wed, 11 Nov 2020 06:38:24 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id b8sm2991405wrv.57.2020.11.11.06.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:23 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Alexandre Courbot , Fritz Koenig , Stanimir Varbanov Subject: [PATCH v2 1/8] venus: hfi: Use correct state in unload resources Date: Wed, 11 Nov 2020 16:37:48 +0200 Message-Id: <20201111143755.24541-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111143755.24541-1-stanimir.varbanov@linaro.org> References: <20201111143755.24541-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org INST_RELEASE_RESOURCES state is set but not used, correct this by enter into INIT state once the unload resources is done. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 2 +- drivers/media/platform/qcom/venus/hfi.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index 638ed5cfe05e..4c87228e8e1d 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -388,7 +388,7 @@ int hfi_session_unload_res(struct venus_inst *inst) if (ret) return ret; - inst->state = INST_RELEASE_RESOURCES; + inst->state = INST_INIT; return 0; } diff --git a/drivers/media/platform/qcom/venus/hfi.h b/drivers/media/platform/qcom/venus/hfi.h index f25d412d6553..e9c944271cc1 100644 --- a/drivers/media/platform/qcom/venus/hfi.h +++ b/drivers/media/platform/qcom/venus/hfi.h @@ -87,7 +87,6 @@ struct hfi_event_data { #define INST_LOAD_RESOURCES 4 #define INST_START 5 #define INST_STOP 6 -#define INST_RELEASE_RESOURCES 7 struct venus_core; struct venus_inst; From patchwork Wed Nov 11 14:37:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323471 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp444418ils; Wed, 11 Nov 2020 06:40:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+9yeuiFIARRmtUgJledkI/BPvxZwMg12TYqjdHa4Lg/BjNwU828WEtIS7x43BshHN4Tvf X-Received: by 2002:a17:906:6156:: with SMTP id p22mr24505272ejl.64.1605105622769; Wed, 11 Nov 2020 06:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105622; cv=none; d=google.com; s=arc-20160816; b=fu1Jhv11vi4CaD8peBxa2qujUPs46VcU/2OIHTPHyIDBxCTIo3PKWo9LglAAu1WWKr YLeVulT4ODyxkIS6volsXnrKqMszKF4tiGV0v2AxUFLEbKWWSRb8PnlYcrlamI51HxQi mjscEIvWpJMjt5hCk5tShvEvZNu5Ln1Y3LsZad+gx7/LC3cEu9mwVEbJKlP/abHVaH6t ClGKT6YIg54ex4WuuhUTfZn3mm/IkJ7Oy3AryJk2MJi76GqeG+WqOcjH4DJw1RiE6RV/ mwYkAlLjZ8rne2j8uHHmsnwsKSrbcRIlkZjrgIWvb7GWCnO+Fb2XNaopnW6HbgkAvp2i elCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=2CVxiw78RvuEwO3JJMPL80Z3ql7fTAJblZZgActuTxc=; b=UIcZ27BSSSDLKVplt+8FYgPbncJB/YnQ3z1dxuBLPvEv06THdPc1/HIqNF3/cev8b8 ELBpmOxK9CvroVegD8lCpN1r+6hhddN9xCy+NescO/J5OmKybwnNNW2qG2B5iLm0mfUo Jb2Q0vGH/WzcJqogrOrlIRufHBt2xGwQ6rn+9mVge2tOllN+9LvyL78WQ+zJP6T7jz91 Tf9SQmA71OZgGeLPNr88DmqVFEhTexE7Cvt/5C2PwpKjMxHpCPyZ8yZUTHE6HQqsItRW EztkBRkgOpNrtcR3frqoQArV/MMM1lnWVh5khyPg9Ms51GxerSsOIN5ivWutxv2wle34 fhwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GnjXvNlH; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id d12si1408986eje.365.2020.11.11.06.40.22; Wed, 11 Nov 2020 06:40:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GnjXvNlH; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727115AbgKKOkV (ORCPT + 15 others); Wed, 11 Nov 2020 09:40:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbgKKOid (ORCPT ); Wed, 11 Nov 2020 09:38:33 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED210C061A4A for ; Wed, 11 Nov 2020 06:38:28 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id r17so2779567wrw.1 for ; Wed, 11 Nov 2020 06:38:28 -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=2CVxiw78RvuEwO3JJMPL80Z3ql7fTAJblZZgActuTxc=; b=GnjXvNlHccEzofSPCStx3HQZTpOGU9JVteupoMiWdOT7dr0PNDBfdvXpyggaGk9Qmj xLs+EmoFXmagv5kyKvDL+eCltQJBGxRTSxKsqyjW51wE8GCj8Nqlmni7ziIgF+4uQHCo elNLwXhQJa/CrMhLSHNY+pJc3UINTByhv6tiU+81lrtzWbsyVolO8QbFQafwaPnlI7fp RXDAuV5tLxFog2a63wkAk4hgCQqDddb8Q2Dtj4ggKKu6diUbSRE/kpYV1IYd6ShmA86k QAO13s0JvSL58opvp7GVWl7xQIbRJ6zZ3g9cDuAkrL3W8apbqertuGQZUFwQERhvWSGU TCsg== 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=2CVxiw78RvuEwO3JJMPL80Z3ql7fTAJblZZgActuTxc=; b=QxBxE/mNiooa2SBmjEAqtyq2VaGVQsa6+g+EUYPRjT7HkCsedT/YH84EMNXhRBHtp3 j1sDlqER7uSelLw2/z1xRjUE3EuGLVRcLUN4wg/fHIEsIwbWCv7HBKkmcSJk6j0aM8k4 alqB/7a36bMKn5V3HJ7cF2j5QFEmsR2hWeWiCrqyAASKzH4YK6orLK11hGVe0VX/9Ogi 53g9SdK+SPRaTrZeiQTo7XZmFR72T6gD98MROCREtakeutEBcc0vCqptxl2pk7ItpYhO K8cpqEOaNxdKjZL2fT4pkGXpaAzZZfbJvme2fg6fVAFonWnky3F3eI7w7Fakz7P+lWra yOgg== X-Gm-Message-State: AOAM532LUUmnmrFI4J/sR6Y9ZyIlaIeO++pLFKQoneJMglpbnBAv4QI6 gGp6+h90CTG3fppQu7+/tE1u0Q== X-Received: by 2002:a5d:4883:: with SMTP id g3mr30509001wrq.19.1605105507679; Wed, 11 Nov 2020 06:38:27 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id b8sm2991405wrv.57.2020.11.11.06.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:27 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Alexandre Courbot , Fritz Koenig , Stanimir Varbanov Subject: [PATCH v2 3/8] venus: hfi_cmds: Allow null buffer address on encoder input Date: Wed, 11 Nov 2020 16:37:50 +0200 Message-Id: <20201111143755.24541-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111143755.24541-1-stanimir.varbanov@linaro.org> References: <20201111143755.24541-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Allow null buffer address for encoder input buffers. This will be used to send null input buffers to signal end-of-stream. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Fritz Koenig diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 4f7565834469..2affaa2ed70f 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -278,7 +278,7 @@ int pkt_session_etb_encoder( struct hfi_session_empty_buffer_uncompressed_plane0_pkt *pkt, void *cookie, struct hfi_frame_data *in_frame) { - if (!cookie || !in_frame->device_addr) + if (!cookie) return -EINVAL; pkt->shdr.hdr.size = sizeof(*pkt); From patchwork Wed Nov 11 14:37:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323472 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp444428ils; Wed, 11 Nov 2020 06:40:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIt50NYiXSbKQWqn3kYTKSdNnvSxluYGkmp+2FVwK0gOvWGEJ0eKCt+5Ndi38NGOF1OBQs X-Received: by 2002:aa7:dcd6:: with SMTP id w22mr26612134edu.19.1605105623312; Wed, 11 Nov 2020 06:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105623; cv=none; d=google.com; s=arc-20160816; b=vtBETtpJ7EfB4kYc7CQoh7frRK073R+HuTOjea0tqWKePCcJtWHSQZ+r49PFWpGl3q jdGrDtRf33ok7N0t62+up/zUHU1Ur6I73Y1sc6oI8ygvAqAl/f3PRVTJ0+UqdRlMGtXo G1Nt9vEmjQv5AttBTuKl9/Jk1LtjkltdeMY/O0ovGFH5f6Hv6F9NX/+6juviu7OIWE1x q+aH1jAwcb7rKBcWmS/NoPVuzYoyWhR4kt8mJ/q+g6eHlwG8k5m9M8WP5SSPTtj5q6Ty KAqNDrwvv3s9erwQRV7WYnwpxfonPV2Yn3sfX72tTTjgCFqWkevM1qXD6FZHAW0rkyNn hQnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=TWPvZ8Q5g6TI75wYwlmr663kYENsDmC3EDOVf4VZUws=; b=UkR1OACv4Czry/cLz7yC2Zs242/qqSdNhvDXK3Ei8Qv4fMkCKD8kszEMRYbnjinMIP +24uzjBGLSjUGDBo2Q+q+a8k5zIPsXkUnNz/AJTGiFb2BElghn+QSwH/ywiwg4gx7uc0 y9Ud7s0PmQZU1n5BAg5cPhMzKax64uDnoxr91dKDonHxEFjnuhBNow+8ZpJvH+rlp5eg 4tWEIL/VPuRuwjN6WHwz/0JiaxVXBtXcgD0oDz64XlqKSwmWshruDSQFpDNSh7kzuGjn mlu9kgckDy2V8sPKNcPMOB13HyOiPGqsJiWF9py9w7R9eqIWf32mC0JTOzml+bovL5N6 0oLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CBTrBBAS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id d12si1408986eje.365.2020.11.11.06.40.23; Wed, 11 Nov 2020 06:40:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CBTrBBAS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727103AbgKKOkV (ORCPT + 15 others); Wed, 11 Nov 2020 09:40:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727092AbgKKOic (ORCPT ); Wed, 11 Nov 2020 09:38:32 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC7B9C061A4D for ; Wed, 11 Nov 2020 06:38:30 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id a65so2555119wme.1 for ; Wed, 11 Nov 2020 06:38:30 -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=TWPvZ8Q5g6TI75wYwlmr663kYENsDmC3EDOVf4VZUws=; b=CBTrBBASaPzbM0zto16rBPP1OtKXcFcWsvhLYI02MALLIPA8DBtqGeNIIaBw2f+BYF LLSdWMMqLd1cSxXQEsUH2BDaLqw9CDkEnwrTTZW+IKADXbZYpeqKuc2AwrkRnbzBJvzQ RffPysPxe41v9IaY+NabRgB08ToFDJIM4T+iuCGZHbRfAx6f9YQYZ4FoGVyO19YkNfuh ayoF4L+aUqUl6J5nhl6ahgS90QBIiFDv2cj+q6JANh/QZ7oPo2hoe6gTHDLZws9wELu8 rylgwYhm1mNBQ9PCWEvkBrWzy1k0xYBYr5egz1ts4u7OvEe1TY4MEstnEl8C8eOmoNIa b/UQ== 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=TWPvZ8Q5g6TI75wYwlmr663kYENsDmC3EDOVf4VZUws=; b=cRbQBmmdlsY96tpelaBllEwJZhaZSTvC2F2eLbogM5wqxaqY7GlLco3vknlp99NqS5 IR15+k/BgAFemkXPbWD9b1bIX8FhCyH/e4U6wttH1ZyDoHPM/69TPrCAoQQFHae371Us wOngugWRpJZUCs4riVHcjOq5nUC63bnMSed5znCRJm7kGQKYQSrDNxuFZ43N4NJzoDcO 3x16RuBI/H+A6TCDqBC9qMqm6rkUuYCp4KgvWlcqaDeoTGEFFNd2ar30D6XFDXatiT4C deXyDcJ6NFB9RFirm7FtyLLFAt3xty5tZYI8788tJLyMdtfQpeO27wCJJb+UKi0Ki3ef mFrQ== X-Gm-Message-State: AOAM532Bd0TErXaOP22k4TXXYnCuEMvZyAakY8n3O7kdR+/8DhRZo3nD xUU69cmOCTc+RW9QhKVSGG2AiA== X-Received: by 2002:a7b:c4c3:: with SMTP id g3mr4427544wmk.65.1605105509436; Wed, 11 Nov 2020 06:38:29 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id b8sm2991405wrv.57.2020.11.11.06.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:29 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Alexandre Courbot , Fritz Koenig , Stanimir Varbanov Subject: [PATCH v2 4/8] venus: helpers: Calculate properly compressed buffer size Date: Wed, 11 Nov 2020 16:37:51 +0200 Message-Id: <20201111143755.24541-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111143755.24541-1-stanimir.varbanov@linaro.org> References: <20201111143755.24541-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org For resolutions below 720p the size of the compressed buffer must be bigger. Correct this by checking the resolution when calculating buffer size and multiply by four. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 688e3e3e8362..490c026b58a3 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -986,6 +986,8 @@ u32 venus_helper_get_framesz(u32 v4l2_fmt, u32 width, u32 height) if (compressed) { sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2 / 2; + if (width < 1280 || height < 720) + sz *= 8; return ALIGN(sz, SZ_4K); } From patchwork Wed Nov 11 14:37:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323141 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp443393ils; Wed, 11 Nov 2020 06:39:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsrPs/CNghjzakcFQ/gWNyr5WiFVEs7F8pRKvs2O64eUPYUIPQ+8aiinPHhk+fo9fJMzsS X-Received: by 2002:a17:906:6013:: with SMTP id o19mr24938626ejj.348.1605105545908; Wed, 11 Nov 2020 06:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105545; cv=none; d=google.com; s=arc-20160816; b=CudJ7FPzLaDyW4FkAEeWSg/bphO5SpRBY9VF1xP36grzmfWoN7azr7kb1xLa3wFBdF OfUZveJN4c3nRPcgxetC8IXXkEBIm0Clhd72riGZi2p/YhA1hRjn0lTDBgEekBclnqqy ffL5clzCyZoffKJtDiIKANt2Ad130HH9ItyuDtHXOP2H3saXJWeh9EthChupkt6vjW39 vMCZeRXLaeMbSpesTVisqBNRiJxjyNlAO2MTt3eERXUPOcqJ1T6tDYhXemWdKX2TcgIm nl9JKmfA6jbwtbZdNPA9GnhZgmYEiBAItYtMkiVMGiWHwo8GOR44J8xrlTuiRnHdDTO1 bO1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=v6PMbdcIaoeKpv1BZw7/QGsGTQk22a+f7y9ODfXyJpE=; b=fZM+HX9DcX1wKNmmlXRvOj6jy0rcIv3a6dw5yqSiQq4uDsCC06a/4QMrNMkU0CvslM 2TZht8NR3lc0TiulrANb+6ibt1bpTkJ9gunLVre2+hAGMsqo984og4cACrKNrLkodS+K sWdwu9DREB1BXapAwMcyFIGQWZ4hhtZr3BOWCAwBmUL7RvRJDHWfnOviIlKDo35Heqpa NQm0ODfiHGWCF901yCfZRo1/GHUWlpFve/u682/LA3bNr8ogdH+t46BH0eQVpLc2GUGX mSvE8kbMyEQII2Jfy7YKj3pz0lvsVu4eXWoxgndiA98+1UT5zk+jz+SUYKsdgLKoiP0o xh0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RFJWXOGA; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id ho36si1583425ejc.640.2020.11.11.06.39.04; Wed, 11 Nov 2020 06:39:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RFJWXOGA; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727217AbgKKOjC (ORCPT + 15 others); Wed, 11 Nov 2020 09:39:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727143AbgKKOik (ORCPT ); Wed, 11 Nov 2020 09:38:40 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7467BC061A52 for ; Wed, 11 Nov 2020 06:38:36 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id p22so2466476wmg.3 for ; Wed, 11 Nov 2020 06:38:36 -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=v6PMbdcIaoeKpv1BZw7/QGsGTQk22a+f7y9ODfXyJpE=; b=RFJWXOGAFWIA2m0DXMEeGx7fabcVR1mMGdq6TnQs1KjP24WoouQwbboYBzRcmp8jpB qi9Ny8SkABPKT9dqzlz26bVcCblnJUVm3OoDDfUZLpTjMg2LgEFlOiRSH4vMjpjZChEl vMu2jvUoBdokjDTEeM9ZhroBqIfQpJWpk2WEumL9qDGbn53+qYvWOKy6TlDbkHDARkBl UcnQGFPQTO+rI14M8It/CepOqeJFw/CpN2K2hf3jyZJGUEesPkpOAX84zNwOTE9wMJql l8iQpQFls1hnJOY9ixraUMmToUy9fCC+2LpceNKAGBwy11muuFWfBlupdTv84X/Mpp01 fpEA== 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=v6PMbdcIaoeKpv1BZw7/QGsGTQk22a+f7y9ODfXyJpE=; b=ELwyxEOFiheMzCSZJDyhXRFFY2hn8yn7UDRPYnl0u8q+AuWpuD4+LaJ5t5RXb+0W2m 4a3aAZn0m46sN21UK8Of8UJKIoTpR0Gx9Wsztanq5igbxespSZ5fxfCK5k1Wqf1uOBiK SJaQCUthdmzSF3TscdcEdAXBegFbFQgD6A5Yj4W4gw49zMbXeE6BVHi7xjMYwRXzOJGJ +tz+3+Xoax028gU4mOjbU1bj+W6YTO4H6SBmfBZOAgIqW6KTr556gJLQUdxUfmeRcdwi BvM8cKgLWYa/bGZ9sZt/N5eRabeJKHKw5UciMVXHeSL8GWVcWJiYnNKh6IPaeh/uSBNb yKQQ== X-Gm-Message-State: AOAM530X+B/aImaAc5JcVrOBzvXdwLjmoxn4s0p9bUmW7zG6gjZv/HUu zXWOC32/BtKwBtRU0+9T5SfpjA== X-Received: by 2002:a1c:c302:: with SMTP id t2mr4671828wmf.189.1605105515148; Wed, 11 Nov 2020 06:38:35 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id b8sm2991405wrv.57.2020.11.11.06.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:34 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Alexandre Courbot , Fritz Koenig , Stanimir Varbanov Subject: [PATCH v2 7/8] venus: venc: Handle reset encoder state Date: Wed, 11 Nov 2020 16:37:54 +0200 Message-Id: <20201111143755.24541-8-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111143755.24541-1-stanimir.varbanov@linaro.org> References: <20201111143755.24541-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Redesign the encoder driver to be compliant with stateful encoder spec - specifically adds handling of Reset state. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 155 ++++++++++++++++++----- 1 file changed, 122 insertions(+), 33 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 7512e4a16270..f1ae89d45a54 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -907,6 +907,54 @@ static int venc_queue_setup(struct vb2_queue *q, return ret; } +static void venc_release_session(struct venus_inst *inst) +{ + int ret, abort = 0; + + mutex_lock(&inst->lock); + + ret = hfi_session_deinit(inst); + abort = (ret && ret != -EINVAL) ? 1 : 0; + + if (inst->session_error) + abort = 1; + + if (abort) + hfi_session_abort(inst); + + venus_pm_load_scale(inst); + INIT_LIST_HEAD(&inst->registeredbufs); + mutex_unlock(&inst->lock); + + venus_pm_release_core(inst); +} + +static int venc_buf_init(struct vb2_buffer *vb) +{ + struct venus_inst *inst = vb2_get_drv_priv(vb->vb2_queue); + + inst->buf_count++; + + return venus_helper_vb2_buf_init(vb); +} + +static void venc_buf_cleanup(struct vb2_buffer *vb) +{ + struct venus_inst *inst = vb2_get_drv_priv(vb->vb2_queue); + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); + struct venus_buffer *buf = to_venus_buffer(vbuf); + + mutex_lock(&inst->lock); + if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) + if (!list_empty(&inst->registeredbufs)) + list_del_init(&buf->reg_list); + mutex_unlock(&inst->lock); + + inst->buf_count--; + if (!inst->buf_count) + venc_release_session(inst); +} + static int venc_verify_conf(struct venus_inst *inst) { enum hfi_version ver = inst->core->res->hfi_version; @@ -938,49 +986,57 @@ static int venc_verify_conf(struct venus_inst *inst) static int venc_start_streaming(struct vb2_queue *q, unsigned int count) { struct venus_inst *inst = vb2_get_drv_priv(q); + struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx; int ret; mutex_lock(&inst->lock); - if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) + v4l2_m2m_update_start_streaming_state(m2m_ctx, q); + + if (V4L2_TYPE_IS_OUTPUT(q->type)) inst->streamon_out = 1; else inst->streamon_cap = 1; - if (!(inst->streamon_out & inst->streamon_cap)) { - mutex_unlock(&inst->lock); - return 0; - } + if (inst->streamon_out && inst->streamon_cap && + inst->state == INST_UNINIT) { + venus_helper_init_instance(inst); - venus_helper_init_instance(inst); + inst->sequence_cap = 0; + inst->sequence_out = 0; - inst->sequence_cap = 0; - inst->sequence_out = 0; + ret = venc_init_session(inst); + if (ret) + goto bufs_done; - ret = venc_init_session(inst); - if (ret) - goto bufs_done; + ret = venus_pm_acquire_core(inst); + if (ret) + goto deinit_sess; - ret = venus_pm_acquire_core(inst); - if (ret) - goto deinit_sess; + ret = venc_verify_conf(inst); + if (ret) + goto deinit_sess; - ret = venc_set_properties(inst); - if (ret) - goto deinit_sess; + ret = venus_helper_set_num_bufs(inst, inst->num_input_bufs, + inst->num_output_bufs, 0); + if (ret) + goto deinit_sess; - ret = venc_verify_conf(inst); - if (ret) - goto deinit_sess; + ret = venus_helper_vb2_start_streaming(inst); + if (ret) + goto deinit_sess; - ret = venus_helper_set_num_bufs(inst, inst->num_input_bufs, - inst->num_output_bufs, 0); - if (ret) - goto deinit_sess; + venus_helper_process_initial_out_bufs(inst); + venus_helper_process_initial_cap_bufs(inst); + } else if (V4L2_TYPE_IS_CAPTURE(q->type) && inst->streamon_cap && + inst->streamon_out) { + ret = venus_helper_vb2_start_streaming(inst); + if (ret) + goto bufs_done; - ret = venus_helper_vb2_start_streaming(inst); - if (ret) - goto deinit_sess; + venus_helper_process_initial_out_bufs(inst); + venus_helper_process_initial_cap_bufs(inst); + } mutex_unlock(&inst->lock); @@ -990,15 +1046,43 @@ static int venc_start_streaming(struct vb2_queue *q, unsigned int count) hfi_session_deinit(inst); bufs_done: venus_helper_buffers_done(inst, q->type, VB2_BUF_STATE_QUEUED); - if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) + if (V4L2_TYPE_IS_OUTPUT(q->type)) inst->streamon_out = 0; else inst->streamon_cap = 0; + mutex_unlock(&inst->lock); return ret; } -static void venc_vb2_buf_queue(struct vb2_buffer *vb) +static void venc_stop_streaming(struct vb2_queue *q) +{ + struct venus_inst *inst = vb2_get_drv_priv(q); + struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx; + int ret = -EINVAL; + + mutex_lock(&inst->lock); + + v4l2_m2m_clear_state(m2m_ctx); + + if (V4L2_TYPE_IS_CAPTURE(q->type)) { + ret = hfi_session_stop(inst); + ret |= hfi_session_unload_res(inst); + ret |= venus_helper_unregister_bufs(inst); + ret |= venus_helper_intbufs_free(inst); + } + + venus_helper_buffers_done(inst, q->type, VB2_BUF_STATE_ERROR); + + if (V4L2_TYPE_IS_OUTPUT(q->type)) + inst->streamon_out = 0; + else + inst->streamon_cap = 0; + + mutex_unlock(&inst->lock); +} + +static void venc_buf_queue(struct vb2_buffer *vb) { struct venus_inst *inst = vb2_get_drv_priv(vb->vb2_queue); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); @@ -1022,11 +1106,12 @@ static void venc_vb2_buf_queue(struct vb2_buffer *vb) static const struct vb2_ops venc_vb2_ops = { .queue_setup = venc_queue_setup, - .buf_init = venus_helper_vb2_buf_init, + .buf_init = venc_buf_init, + .buf_cleanup = venc_buf_cleanup, .buf_prepare = venus_helper_vb2_buf_prepare, .start_streaming = venc_start_streaming, - .stop_streaming = venus_helper_vb2_stop_streaming, - .buf_queue = venc_vb2_buf_queue, + .stop_streaming = venc_stop_streaming, + .buf_queue = venc_buf_queue, }; static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type, @@ -1084,8 +1169,12 @@ static const struct hfi_inst_ops venc_hfi_ops = { .event_notify = venc_event_notify, }; +static void venc_m2m_device_run(void *priv) +{ +} + static const struct v4l2_m2m_ops venc_m2m_ops = { - .device_run = venus_helper_m2m_device_run, + .device_run = venc_m2m_device_run, .job_abort = venus_helper_m2m_job_abort, }; From patchwork Wed Nov 11 14:37:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323140 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp443358ils; Wed, 11 Nov 2020 06:39:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVVVhmaxNh9al9ejsKRXwJZ7HqSU8MsRqNiRAga+guCqeQbfykrxj8R8BsUSsHdc/sOz8P X-Received: by 2002:a17:906:a250:: with SMTP id bi16mr24169188ejb.265.1605105543456; Wed, 11 Nov 2020 06:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105543; cv=none; d=google.com; s=arc-20160816; b=PT8OSDeqIwqRELeLeZNimLPY63C1Rxv3HjeblPsnBW5GB8p24RDAA54Y+YOZ2Zl2Do Hc7pP1hkIYrqPOvqg4of9F7vzt1jSYJ4xT1hvQlhL4oA1LQfjc5qxnAnAABTX4SKvl7k Vj4pDsiGirswLsQt/BTEkIbG2qAkrvMlbYHaIjyUddI3BAdkESMnSTGiE+a1qADohLRv rflCtXKg4sRqs8k9nrhidBa9tEfW9jtbPZJ5ws+2UPJBUGb2dUEWiv8YCRR/rCadaiQq Qh0MTLDo91A9yT8oxWSXYJ3b8faRKXMuuXSmrZaGk2L58KiLyDs7q9R102WKFpv/CX6s pzPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=DzUjnsp2X4OnTCyXgn/JbY+DNy5G4LB8TIDONuAc8II=; b=usmDBym6/wrwUbazZ5061AeTR7v2AMzag8aix2uZoj7+3h3AgCYRF7gYCYhXYgTkUd UYxFzCPvKkw+0XWZQnNi6ioSS5NRIpp9SQjqqPwJ3+ykUPO4l46G1B57wlCjRNJBA81Q sRNrJyZIGrnvAL+uLL7nDAdDTqqCCUCI4lPssLauK3I1JfE6hZ7K33fhPNhgX1AeArrL VMMXDn37qzmHn6vzZn0Q+xAm1Yym19GsPN38XBBKdYODwVuHGOYN8+YEcnbkkP2QkG7K CTXHhaK3zCUROFd+Ph8mQIU97ZHSOdPBofDwVjt0oJgrw0dULt95+3RkE300aQSYFFzT RAMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qzf64FhV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [23.128.96.18]) by mx.google.com with ESMTP id ho36si1583425ejc.640.2020.11.11.06.39.03; Wed, 11 Nov 2020 06:39:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qzf64FhV; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727126AbgKKOjC (ORCPT + 15 others); Wed, 11 Nov 2020 09:39:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727150AbgKKOik (ORCPT ); Wed, 11 Nov 2020 09:38:40 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03C91C061A55 for ; Wed, 11 Nov 2020 06:38:38 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id o15so2763886wru.6 for ; Wed, 11 Nov 2020 06:38:37 -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=DzUjnsp2X4OnTCyXgn/JbY+DNy5G4LB8TIDONuAc8II=; b=Qzf64FhVyFPIfQD1gu6EoyuhzvYG1X3bVXltED54Gqv32hegCwzWHi3W3muW0j04+T jgF9K5kF2vVLRSanLBmu7r32YPYE4t+qTKbOE2uDoby4tKP1z9dD3DLPJK14KCXR4QTc eFR+8+lixZGzRPhGBRbEoXFm55q7HJat3WH2EW0cgpvQUM5ZTEWWbJPYycrVX/3rIesY k90QNUFB4yXAlAxx7o6lA8seBS45akDOwgrR3E4Khpm4kNnL/ecBUeAhHuUvzNhUjx28 QtYZy+mt6U7R+CB10xXZKxvKyabezUpyRU4G2CSa/OUYhKoobPe0APxaBd5zoFnxf/1p x6zA== 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=DzUjnsp2X4OnTCyXgn/JbY+DNy5G4LB8TIDONuAc8II=; b=djMLKAc6jusSCLzJ0ooaPfbc/XlIaN8+YR7sXLrOyowxFhK/4LWBGG663JLFJ0MLhy 8Qn9kriUqHl5187jeTBTFSx9RXv00Xv3T3YitG+D095Xi2sQVj6V1HoKVaAZhtqTGIYf ATGP5Xrac7MDsYxAOO9dCYpf2rVPvYjb/4VB3tFDzxgZRKocPn3taV+fpjnf3cMeF9Ks L+mBfTAGIpxFFXYsNlj356rDgPBvdf7JGlX93hWsYw3Nfap49X0vbq1vxN8MEmG9A5bP F1/F2xBjioGaMfoYuK3EExt8d4Z+W/6NvnLVayYGKJS30hZGLnqSTHSEEopiLA8cIzk6 cTTA== X-Gm-Message-State: AOAM530PQ8eNUWWtaElmFsqpD8MgwqHBHHn0QCuF7yNGpcolsTnrRSgn gILx228zrgsE1wDuC8Sp3f201A== X-Received: by 2002:adf:f304:: with SMTP id i4mr17619843wro.268.1605105516778; Wed, 11 Nov 2020 06:38:36 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id b8sm2991405wrv.57.2020.11.11.06.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:36 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Alexandre Courbot , Fritz Koenig , Stanimir Varbanov Subject: [PATCH v2 8/8] venus: helpers: Delete unused stop streaming helper Date: Wed, 11 Nov 2020 16:37:55 +0200 Message-Id: <20201111143755.24541-9-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111143755.24541-1-stanimir.varbanov@linaro.org> References: <20201111143755.24541-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org After re-design of encoder driver this helper is not needed anymore. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 43 --------------------- drivers/media/platform/qcom/venus/helpers.h | 1 - 2 files changed, 44 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 490c026b58a3..51c80417f361 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -1406,49 +1406,6 @@ void venus_helper_buffers_done(struct venus_inst *inst, unsigned int type, } EXPORT_SYMBOL_GPL(venus_helper_buffers_done); -void venus_helper_vb2_stop_streaming(struct vb2_queue *q) -{ - struct venus_inst *inst = vb2_get_drv_priv(q); - struct venus_core *core = inst->core; - int ret; - - mutex_lock(&inst->lock); - - if (inst->streamon_out & inst->streamon_cap) { - ret = hfi_session_stop(inst); - ret |= hfi_session_unload_res(inst); - ret |= venus_helper_unregister_bufs(inst); - ret |= venus_helper_intbufs_free(inst); - ret |= hfi_session_deinit(inst); - - if (inst->session_error || core->sys_error) - ret = -EIO; - - if (ret) - hfi_session_abort(inst); - - venus_helper_free_dpb_bufs(inst); - - venus_pm_load_scale(inst); - INIT_LIST_HEAD(&inst->registeredbufs); - } - - venus_helper_buffers_done(inst, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, - VB2_BUF_STATE_ERROR); - venus_helper_buffers_done(inst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, - VB2_BUF_STATE_ERROR); - - if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) - inst->streamon_out = 0; - else - inst->streamon_cap = 0; - - venus_pm_release_core(inst); - - mutex_unlock(&inst->lock); -} -EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming); - int venus_helper_process_initial_cap_bufs(struct venus_inst *inst) { struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx; diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index 231af29667e7..3eae2acbcc8e 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -20,7 +20,6 @@ int venus_helper_vb2_buf_init(struct vb2_buffer *vb); int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb); void venus_helper_vb2_buf_queue(struct vb2_buffer *vb); void venus_helper_process_buf(struct vb2_buffer *vb); -void venus_helper_vb2_stop_streaming(struct vb2_queue *q); int venus_helper_vb2_start_streaming(struct venus_inst *inst); void venus_helper_m2m_device_run(void *priv); void venus_helper_m2m_job_abort(void *priv);