Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2887519rdb; Tue, 6 Feb 2024 00:08:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyQgWAy8q6Pcd4ZXIY5gI3TQFWT7yUu/fXfSGIEWoiGFhgj7tfoSWJXFCn4gcacXD1V8J/ X-Received: by 2002:a05:6a20:4310:b0:19c:9c27:bbfb with SMTP id h16-20020a056a20431000b0019c9c27bbfbmr1001529pzk.46.1707206891474; Tue, 06 Feb 2024 00:08:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707206891; cv=pass; d=google.com; s=arc-20160816; b=uCL835QZzA4MJg1cIqY7jqJ/m0QTpd/DO5c1MgLHlXGgc3uIGm0I2x7YHNiz3Tewe9 G85neNOQqqiov7IJWS8n6l67mfkqZzWFXkvEk3m3ST6CLq5o9XYsl6Xo/YX2AIz96lvT FzKorRvo7tSmOrBfjki3LGbaKdA1uPcpWW+6xQcEBrghMMZTAX6LUFvHqH5JzeXXn89B lLw0nDXWTf19NLmbKY8FPr9HNqkzUah1nYpZXogRHFJ+drDcQajmEj6koBdseAHhX271 aNAK05h0V2dj24aRQZhWE9rCMSue4snzC8Hiw1/jw9fhec9kj6OlDUd4HMmDDBfmQix9 4EKg== 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=21i1GYzQXIMC0Csqe7D2wqexY5aj5nbTSpX/GRy3ncw=; b=L8GXjQ1It6nYuM9khWJa8UjKgY/GLsk/ubflUkCGm2R0aB4k8j+omfXjPqTqiQQglj G/3djqYvYItNgDKN3LCaUwTWaPEtfXxtsW5k8Ma3WRjx/n2hDxzE21cSnP8/BwMtviz8 i9JLEODxB8lFdxd1mL8kIF8u0n14sykGvt8StSYkRvFLAjs5odn+ectHZIje9t6Qghth 6bkhg96hR6mRh7PPqQmTFBw5fqy1Jg80gtX+fdxprJDkUNgov2xFGTuBUzknIu4E10Kv 72aEzUemmr2RVZKoTQch3kZcuUxt/HAhloNXaZAFKzDRhTyEKg/ZFjJHbzhX0SYcQKrM atKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MiTtNqiC; 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-54466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com X-Forwarded-Encrypted: i=1; AJvYcCVAh2UJydYY+5LwxyxCG18FHj6pnP3FYvrroDSYNVwwvtwelITvtyH7iM1sPIK11BiXOFQ1fxLwb3mVqtyvdubE78Q2TYq8LXsoxXp8SQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u21-20020a632355000000b005ced4fbeb75si1282784pgm.581.2024.02.06.00.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:08:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MiTtNqiC; 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-54466-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54466-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EFF5DB245DD for ; Tue, 6 Feb 2024 08:05:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94A7412AACF; Tue, 6 Feb 2024 08:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="MiTtNqiC" 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 908B712BF0F; Tue, 6 Feb 2024 08:02:37 +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=1707206559; cv=none; b=Ave1eBM5hHrwzVskrNXcpA0I7JKX0veRXC/kKPSHEzWukq8tD+PNF73y5cjRIL4TD1UlDXp7CnlAQw0sXxj7NeYfHEjhIBx9KNTb7hJHv05WEnpLZl3/xynBN4FBfZOTGqYA0RjM5X8SSYXGc0ov5WP4TbW7eB9X6BsmKwEZ8jw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707206559; c=relaxed/simple; bh=pOBMf2guesXNH6vUwvSx6EUngxizNRYUxTMvSY6wvpo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jy7hd0ozjBlfq2uOeQ2AA3DSDHKJomEILqwDeGIJerOrGZe5D7SpGMwKoAV4sO72kYZovba63oxjPoY1c8IqKyeAb2Ll8vPL6V17TRUIawrUOXLw/I4eyW6TTLginqZX1AUcD2wvuTy/cltuPMVFe3EtFBaKReQhZIb6/1Zixwg= 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=MiTtNqiC; 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=1707206550; bh=pOBMf2guesXNH6vUwvSx6EUngxizNRYUxTMvSY6wvpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MiTtNqiCnj+U3nL1lb1MjjqENAAaLb0WsV+insn8X4ytfD87AIMGuN4ilGjz4KKAE zTefrPCciNk8aHAAwuHTBQAo9f/3AR2j4vsjnZf88TD9LbLxdrGJlArjRA2xn1Hje/ ASqDDgqqvynzYAkVFLdXj/HPaxj9EWCVmIJ/irjcrqt/8/eO9QpCzevJ2fczvhYt8I +UAEZlRABsk3LzFI68c3NZit377ANirkCu69oyu3oqZl4Z0Md2IIc5jYfIDwlUpxlZ WTxgWZV+m3QsrkF9r9rtU6jfPqHVD8RpmmNOqZwDqsgd0+xnNJGLSS3VfQsfgNd0uh Tl6Vl6R4UII/g== 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 3861D3782087; Tue, 6 Feb 2024 08:02:30 +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 v19 9/9] media: verisilicon: Support deleting buffers on capture queue Date: Tue, 6 Feb 2024 09:02:19 +0100 Message-Id: <20240206080219.11951-10-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240206080219.11951-1-benjamin.gaignard@collabora.com> References: <20240206080219.11951-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