From patchwork Wed Nov 11 14:37:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 323478 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp444718ils; Wed, 11 Nov 2020 06:40:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJximguTZSWSHQT82azNRcgwbblcgIXkUgc1n3Lqb4py+5+S7Sg13f/ZqKMly56JJpVtckP2 X-Received: by 2002:a05:6402:94f:: with SMTP id h15mr5239545edz.177.1605105646492; Wed, 11 Nov 2020 06:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605105646; cv=none; d=google.com; s=arc-20160816; b=YiyWxp1hUwcJueDGHyvXP+/pyJIZA6lSih3XHPfwt2ZaKSwHC3Ji+y4LgI2bqhq/0q aQKCGwYMFNxehmCR1Q+KmuL2QHUUh8e7T1fkdQxlLRhBUMvCUJmLfqq7bC4p1kUvCzWq 5bDdDCPmdJHs2ao9Y51fCS9BxmjfX7dyzPY5AnvBqf1CeMlUooToaMs0mFLiJBYBAFwX IJHGpWO3BddwqwsNPctn7F16Ro0QleozmN0PNhoz+vkG5/qv9055YPyFXqhnmImkz5qd MG9f0zB/6HTw6GWGKMD5xDbK1DKQuVo8MeKbUR8hobvxoVkJqm0iwbP/4WMEPAMTes+O jfUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=HCKQOzFPpo+2K5yUahYtUtI8k6qp0+z3GG+IuN0ZApo=; b=EBnwDxSN5uebgEgpS9h/tNwtAeUuuIDjA7M9avYeZvOhJkpznb42pRM2erofEwgzPc +WpWMqUnZcZBlPJEUfmIWmgfFGCEmCF3lPN/ffPGbUZkto9L1e2yryYoYfI8OEAfdwAP TylYZijKWGOgujrouMZHxqiHj1JTw1lFAnLdCMEnKFaQK3raf/FVuoBGlbNHdpL+ZXCY ST1OPS3io/TBUeqSHyZmgSih+kszAdBwMnurSZMjAD7XUcZjtAjQe/msG4wIXKGcTzLm Fg/n3X55+O9hpIy5KkKAygEYjw6UG7HVZ/5eL7W+MMkyGsJMvAtr86v7Puyp0x19AdLD 0I+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gke4ieIS; 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 m11si1512282edl.523.2020.11.11.06.40.46; Wed, 11 Nov 2020 06:40:46 -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=Gke4ieIS; 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 S1727057AbgKKOkm (ORCPT + 15 others); Wed, 11 Nov 2020 09:40:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbgKKOiV (ORCPT ); Wed, 11 Nov 2020 09:38:21 -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 79127C0613D1 for ; Wed, 11 Nov 2020 06:38:20 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id h62so2538173wme.3 for ; Wed, 11 Nov 2020 06:38:20 -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; bh=HCKQOzFPpo+2K5yUahYtUtI8k6qp0+z3GG+IuN0ZApo=; b=Gke4ieISLM/XI8kVcqy+0mz4yf0ilnZLu5L14Ham+FjQ7rwpzqo52LbuyxGEB+6d5B UDpnhBJ0KU/otCehHd8K7SCm6O/Ehnx9Hkk40ZKbouSOo4fle/NTsagkA8DlNP+01pd0 DnnJeE2a6YL9Jqu4qUhdAsMV06K3YYxn62/6V1uj6cQhRTBMy4s4Nrp9ms/W0j3wtPoK r1rvv/ufdxrricb97N372OISa6T7tESS73k60FsZ/gfyGYLabadPIscSnwADP2leufuT fDhlTwPBMSlUzbMYLrc84v1CgetJfn7FUqRzDfloDuPeEyxlirDHoY7dPoS8TfX8Zail FEWw== 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; bh=HCKQOzFPpo+2K5yUahYtUtI8k6qp0+z3GG+IuN0ZApo=; b=PAJoEjYwARPRD8I+KQzY0hBE7OBeHi3G9cpUo2ku0a/8s4d19PJ5jSJ0qFI529YnTO sR4odqucM+P3TONkzhpKtzc7Q8/O4tMNpUstlpv40/Y6W1yZv3FFMXutircxOwVDBU+G DedhN9k+/yM9oAI7zrBVii8ro0Nia7xSqHrou9qO2HqKVwjuxsBaUlTBV36D34Smbur6 L29HDUSnNtTz0B+y12JjSIN/057VaSexj17GweN6iaYKkfhS5y7tPzQ12QQy5dtZqlLI a7MOVw7vhs+Y2a3sr0aAyX6btAP4wrJxjTSkPH2HKiAVGnCtv//Dp9OAT+3taNYWnSXX nwvg== X-Gm-Message-State: AOAM531ygDfR0DGwvGUC82DCFcbA33r2Ow9jiP69EKhV6SGxmrQWH0jk YCmhAJzPPiR68yAKkpbg5Uocj6dJt+UiZ0nG X-Received: by 2002:a1c:9a12:: with SMTP id c18mr4429807wme.22.1605105499188; Wed, 11 Nov 2020 06:38:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:38:18 -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 0/8] Venus stateful encoder compliance Date: Wed, 11 Nov 2020 16:37:47 +0200 Message-Id: <20201111143755.24541-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hello, Here is v2 of the subject patchset. The patchset starts with few small preparation and fix patches, 1/8 to 5/8. 6/8 is redesigned Dikshita's patch and 7/8 add Reset encoder state handling. The last 8/8 just delete not needed helper function. The major changes are: * An attempt to reuse m2m helpers for drain and reset state in 6/8 and 7/8. * Use null encoder buffer to signal end-of-stream in 6/8. Comments are welcome! regards, Stan Dikshita Agarwal (1): venus: venc: add handling for VIDIOC_ENCODER_CMD Stanimir Varbanov (7): venus: hfi: Use correct state in unload resources venus: helpers: Add a new helper for buffer processing venus: hfi_cmds: Allow null buffer address on encoder input venus: helpers: Calculate properly compressed buffer size venus: pm_helpers: Check instance state when calculate instance frequency venus: venc: Handle reset encoder state venus: helpers: Delete unused stop streaming helper drivers/media/platform/qcom/venus/helpers.c | 65 ++--- drivers/media/platform/qcom/venus/helpers.h | 2 +- drivers/media/platform/qcom/venus/hfi.c | 2 +- drivers/media/platform/qcom/venus/hfi.h | 1 - drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +- .../media/platform/qcom/venus/pm_helpers.c | 3 + drivers/media/platform/qcom/venus/venc.c | 232 +++++++++++++++--- 7 files changed, 226 insertions(+), 81 deletions(-) -- 2.17.1 Reviewed-by: Fritz Koenig Reviewed-by: Fritz Koenig Reviewed-by: Fritz Koenig