Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp525578rdb; Fri, 26 Jan 2024 03:03:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCJN7GvjiUxdpC+LuMRsJyAe39l1PuVkJuKiwi6M/9RXnFZRLTLcATtDV0njc/Z0I8kkXB X-Received: by 2002:a17:906:64d:b0:a34:ad70:a650 with SMTP id t13-20020a170906064d00b00a34ad70a650mr520302ejb.17.1706267036479; Fri, 26 Jan 2024 03:03:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706267036; cv=pass; d=google.com; s=arc-20160816; b=ftvI6hUlTX0SGW4VEha00BDV+UWm0BtpXdvfeN2Za8AnUWUlf3hp+Rznu0VR97AV69 whZ2hKcnFOncARyNSTvZRfKUn/7NIoyopXNEWp9T+WonfQQ+SD+CVKc7Y5uYFIbqDgXu 2VyQah2Uxa2qm9raN3kQi6Uenhl+FNwZVU6L6KsGxbKKUej/FyWMFJEo1He0yn79B0ry 78Ul9tzP9qZNLdx9YTmTYzuIugoxN90n2jM/2UUmqXhMKohCwgDsx8wIQ1B9nV1PbXrU dWNfLyitJ7eUjiKNmVAX46rQ3TM4/KeWS5ShlV/fF5FlTxUYdTNAp12oFoIyeia1cObb M1RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lrb6UbvFkmNPsJzp3gEWTGK1dhqzLPDb2viuFqFFXNg=; fh=kJFWdpgao/cSBC9hXz8xDSwlGqQgdrU0x08uvgLC+qU=; b=pv4/Z3XNNY0L6+/dTdyh1uQeb/Fui+1jMxq6LUhOWt7Qb6GrVQd7p+U7IRIc+JSPjL OvbL5mO5GNzGAIy4Do0uharle4ChtPcMIJRCLCd3iZXN3aWvTIQ8l89ogSOH/yPAiMct McHjDR8AhidnBn+lq1RCqPbBF3lF2rBCmZKO24ztGo1O3ZnrmHg4tpv2gpJn3QuEFNJB vRSMrNweMrkk1oJnDSuP20oPxToBMqxi2hNHsb9nJoAN4uzGHF9yKmp9onsbeE9YsZ/k bi+SYV5Haum9btlyMulLI03Mkjybo53QveC+vIjq1JAbmVENaXJxd/sPQN7gUxV6tCz6 oxNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dEstBjlc; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-40025-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cb19-20020a170906a45300b00a314870b103si471598ejb.879.2024.01.26.03.03.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 03:03:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40025-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dEstBjlc; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-40025-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40025-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A2CBC1F23E99 for ; Fri, 26 Jan 2024 11:03:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2E0C1BF35; Fri, 26 Jan 2024 11:01:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="dEstBjlc" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 396DE1A29C; Fri, 26 Jan 2024 11:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706266914; cv=none; b=PHFgcMUeDNFUrwR0f27/SEOI4UVnMWXUoVAhUqpjOLS15B0KJsswY1WHfYI4/YpLB352/k9yp5uRDx4HBUAapDA9r7J5TRNPFtevYTO4MyiWPqXtnf+WRVjsq/EegfZAHj13T/Mge40vzq4K8uAZPsZ9jMFeyib1zCMFCnqNoqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706266914; c=relaxed/simple; bh=pOBMf2guesXNH6vUwvSx6EUngxizNRYUxTMvSY6wvpo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DdpjXAH4pffCdbwxKGS2BjuYYH9m7QyLsN2zdt6ZwXFaYOlcjGaFvYt0R6+QjyjDuN8beY6ErUzOkFZm9HVO997o3g+SdIKFx8EKGc8FCZa+D/MgHMh/hFo62TZm1rNThBKzmEGmRk/ekYtsGdDH4L+V5z6tVSSZY9e7pOQiiSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=dEstBjlc; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706266911; bh=pOBMf2guesXNH6vUwvSx6EUngxizNRYUxTMvSY6wvpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dEstBjlcD3+4mFr9UIIOSCZBxaQSHrRK0bLFmQc87Bo2bORBINesLDySwXan+1Y1E AVyAjeVjHxoQCcOy10S6fQmOBTABMKYIHmOvHU6XzE/8YkAhei46KypJ+oqRjg42o0 mtUyH8IfM5Ztc5KbARJePofWZVRtjxWrWn67GOBKfNpSpr4W/vBQTjw8Khup7nFMoO otE0el+oMHpViQFTqx7zsl3/LlwmBlB8GEZCiPXm+NW1HKGJo7lFCQBFvA6dGsCkvs XRr1En/msHXymHqCZdsJWRai17zXhneKlwT+nRV5uPHJQj2KowTQEdoXK5EgNxgFhp 2SSEUXhQYpT9Q== Received: from benjamin-XPS-13-9310.. (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 4DA463782072; Fri, 26 Jan 2024 11:01:51 +0000 (UTC) From: Benjamin Gaignard To: hverkuil@xs4all.nl, mchehab@kernel.org Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v18 9/9] media: verisilicon: Support deleting buffers on capture queue Date: Fri, 26 Jan 2024 12:01:41 +0100 Message-Id: <20240126110141.135896-10-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240126110141.135896-1-benjamin.gaignard@collabora.com> References: <20240126110141.135896-1-benjamin.gaignard@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Allow to delete buffers on capture queue because it the one which own the decoded buffers. After a dynamic resolution change lot of them could remain allocated but won't be used anymore so deleting them save memory. Signed-off-by: Benjamin Gaignard --- drivers/media/platform/verisilicon/hantro_v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/verisilicon/hantro_v4l2.c b/drivers/media/platform/verisilicon/hantro_v4l2.c index 941fa23c211a..34eab90e8a42 100644 --- a/drivers/media/platform/verisilicon/hantro_v4l2.c +++ b/drivers/media/platform/verisilicon/hantro_v4l2.c @@ -756,6 +756,7 @@ const struct v4l2_ioctl_ops hantro_ioctl_ops = { .vidioc_dqbuf = v4l2_m2m_ioctl_dqbuf, .vidioc_prepare_buf = v4l2_m2m_ioctl_prepare_buf, .vidioc_create_bufs = v4l2_m2m_ioctl_create_bufs, + .vidioc_delete_bufs = v4l2_m2m_ioctl_delete_bufs, .vidioc_expbuf = v4l2_m2m_ioctl_expbuf, .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, -- 2.40.1