Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp882175pxb; Wed, 6 Apr 2022 03:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPx+MgIsccr0DV4nLtxiDMLeb+nG7L/BShSoKDUEFEOUNOlkox8fPntdtY2vEbkGfNPQ2W X-Received: by 2002:a17:902:6a8b:b0:156:612e:190e with SMTP id n11-20020a1709026a8b00b00156612e190emr8017389plk.132.1649239623537; Wed, 06 Apr 2022 03:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649239623; cv=none; d=google.com; s=arc-20160816; b=ksbg3vDfAD6E/w6DYx30ADUDezW6swXdXjqAXTLVl3zfmWzxN7Pa3cbSyf6En5H5wm HeIZmcsq6kSCKHNevqYfytlwShKQvsOQqMkN6TQxqUjadCpBGUVNUI2Cf46/L8sATSnL Ggo8lsYBoiQieDExoTtfIQnB71pMVmcdL/TSB3MxLtGzBSqjGhc0zTsosQ6SAHiL98oj T3gnF1LNpO9co1sob7ZSw05HBlchRzBVH8oA7mVcG+arRULM/OVdN/skw9IiGWeg3323 8F2HzLY2931wC6exCir8/BVLnhm6dWq+gp2l1S3XZm5p54cefFs065jhsYZotJCMGB61 3Qkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rHtSWnLYTRtHxSfM8x3hxR4SA6ZZdxng+dagCN9Crc0=; b=kRkEQdMgPOmK1sw4+p1cAJECgQ6OVIGbefhrFqsxnzUjPPwE0AewwltSJP/EInlFwt EI6O26VKH/EQ6R1rWlG+qR4VGxEJ1xNuJdSvJdF2bSg/KpeaLEJc8I2DC72nWzc9DYDd GZNhe43p9FYfITAMH8WynbmH9BUQ0mGLvcBMFZ2PmsFqMuxLVwXaLUfbcdlmHKPHqzMK tUFo+ZUBTXdAJuaa8RLwjpjtTnnixz0zGEYuIyjsUMGgD4yjIzwKk49NWl+PS73O8EJx v+jHc9elqAPSwaLDan5eJRrre7Wae+mZdXbPI9flbgHE0aE72VLVEWS1hMwp/1hfX/gN LHyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MTXu3z2S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a12-20020a056a000c8c00b004fa3a8dff62si16396684pfv.25.2022.04.06.03.07.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 03:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MTXu3z2S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F01EE57C0C2; Wed, 6 Apr 2022 01:28:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849300AbiDFCe2 (ORCPT + 99 others); Tue, 5 Apr 2022 22:34:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444238AbiDEWVB (ORCPT ); Tue, 5 Apr 2022 18:21:01 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1505199692; Tue, 5 Apr 2022 13:45:17 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id D871B1F448CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1649191516; bh=MTyE9QSy2RUy2J+DqczMQkzQ2U7CksfjNGFIrOd9SV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MTXu3z2Sz1/ihUk9LZChVIPAu71KKvYLI63WUFsq4V+t+dI6Wag5rJC/4VfrlWEAt SHCFbLtM0ElNJ6q/LTy8Fka4/R7QxDjtFb5b2ys/ylpAgiNd09Dthhs3i6RlAzF2+8 KkrLLA3Vc5wQaRElF9X6hTJ3mZagl5aRNxB+Pse30ELEthfHEuCEyA6Vtb81yvHYcB KDLbKeGdvxSwFIel+bibpclOtNwo47xv/L+eLMFcyCiaBxeUMKoYJUzLRZdnZQg2l2 QE35nAKfteTRgyw5P75CyRJkYNcCG2otWffSBriRi2X6QkJrsNNUQDZnl8v22Q8s6z aQ2K4uCfvjT+A== From: Nicolas Dufresne To: Ezequiel Garcia , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, Sebastian Fricke , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev Subject: [PATCH v3 20/24] media: rkvdec: Enable capture buffer holding for H264 Date: Tue, 5 Apr 2022 16:44:21 -0400 Message-Id: <20220405204426.259074-21-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220405204426.259074-1-nicolas.dufresne@collabora.com> References: <20220405204426.259074-1-nicolas.dufresne@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to support interlaced video decoding, the driver must allow holding the capture buffer so that the second field can be decoded into it. Signed-off-by: Nicolas Dufresne Reviewed-by: Sebastian Fricke --- drivers/staging/media/rkvdec/rkvdec.c | 4 ++++ drivers/staging/media/rkvdec/rkvdec.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 2bc4b1a40989..7bab7586918c 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -127,6 +127,7 @@ static const struct rkvdec_coded_fmt_desc rkvdec_coded_fmts[] = { .ops = &rkvdec_h264_fmt_ops, .num_decoded_fmts = ARRAY_SIZE(rkvdec_h264_vp9_decoded_fmts), .decoded_fmts = rkvdec_h264_vp9_decoded_fmts, + .subsystem_flags = VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF, }, { .fourcc = V4L2_PIX_FMT_VP9_FRAME, @@ -385,6 +386,9 @@ static int rkvdec_s_output_fmt(struct file *file, void *priv, cap_fmt->fmt.pix_mp.ycbcr_enc = f->fmt.pix_mp.ycbcr_enc; cap_fmt->fmt.pix_mp.quantization = f->fmt.pix_mp.quantization; + /* Enable format specific queue features */ + vq->subsystem_flags |= desc->subsystem_flags; + return 0; } diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h index 9df0fba799a4..633335ebb9c4 100644 --- a/drivers/staging/media/rkvdec/rkvdec.h +++ b/drivers/staging/media/rkvdec/rkvdec.h @@ -82,6 +82,7 @@ struct rkvdec_coded_fmt_desc { const struct rkvdec_coded_fmt_ops *ops; unsigned int num_decoded_fmts; const u32 *decoded_fmts; + u32 subsystem_flags; }; struct rkvdec_dev { -- 2.34.1