From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC45AC2D0DB for ; Fri, 24 Jan 2020 15:56:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 755072072C for ; Fri, 24 Jan 2020 15:56:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iO9qVGr9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="f5s52TMq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 755072072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PPJXj0Pb0f9VcfL8Qn4bTfyIONPjE5ijtcPkCCsNzoA=; b=iO9qVGr9W1JlZz tJVFCsIOeld9f8zzHLY89kZ2SOR5pEr7cux5/LbSZCy1T2mqlvd3J2tUB1R2Pv8o4Gq+7mWF93q7x HEaW/ZxdQWXzuMTX3y9XG3FglevIGzSXms1I/uNsYPtsQLFLBLGEZgzGc9vleUaHL/jYwZXKbDm6d XfGGUgv+GYzu9hKuFb1/6lj0QKdkrtRUfQidirOuOM9jlM4L+lBVUR6X2a4mhtiGayRVQqixqFeVJ FhXte/m70mx1CpzfRsNoOQx1nDZgCmhR/ejjHUaYPJiiEPCt3Ev5bgsqq7FBeLlUz85uDLNYxMGOb MMU4BgDP1Zgpbz0LyC8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iv1K2-0006uM-Ne; Fri, 24 Jan 2020 15:56:38 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iv1Jy-0006qj-Pn for linux-amlogic@lists.infradead.org; Fri, 24 Jan 2020 15:56:36 +0000 Received: by mail-wm1-x342.google.com with SMTP id p17so2181917wmb.0 for ; Fri, 24 Jan 2020 07:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V49eDPK1RxI7emBI+6HyeraP6a4Pl1g4ihe19+WEXsY=; b=f5s52TMqkN1hbJ3m5ijqyd1gugwRwZpdSNUp1MQSSmlD8acxtb8qMPMqY+YlkeZbRe rqIiRm+1Ir+uDuyTpH03cKGdd0/IOmev1vdc8WzOY+NXUHUk64po6g7kBQM+P+/5jx5n t9TJcXt/1N1buCmKdGcx3wDMxosIQbuobG7Qa94dLuaBLkCNRePhNzbt+QXiWlVvCE++ yIZib1d7pLRcX+LoRtLoqAEJyDTzK3mBLzUR6asIZ6NxZYwlqK51ANAYOlQnYoHD35s6 jVXqktOIgMSmu0UY4PfLbRjE7AfCZALcdJg+g0K8SbQgS7ikMPSUAXOPg7tBAqg1qrYv /yfA== 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:mime-version :content-transfer-encoding; bh=V49eDPK1RxI7emBI+6HyeraP6a4Pl1g4ihe19+WEXsY=; b=Byh8EGkb299b1lxKa5wCQt05JB+BEyonLeCRxOa1ZOV44wmp42at8SKkA9AONMImy8 aTOYOsJtpqYhzkeY3KrsziWSxKz2JELHBTW/8KvhJBm4mS0vrxipVWbMfsfMehsYHSh9 QZX11b+gW2FgGo5C0ge0ab4/uOB/I2fK67AAjMM4vwhKcdiCr3evJF9rLkW6/AYfRAV8 mxXjODTFzOsJP0AM55ZGQB8QE7JfrFwbtpCgM3dTxEVeQHD6Xm+Xz0+DQlg+Ao53YwEi XzKeO5frySfWSc8uHZMZ+ZiB8y4FjbAyqG7dr7s+Ef7PG20QfLo/cYyULXms1Fn9Judb L4VQ== X-Gm-Message-State: APjAAAUQeMSMnG+I98YlNJkb8g2BIyc2kmYpNQFbr5BNfBDHNsveCnIn VoWoVZXdKCngrbmhEc+l3SuSQQ== X-Google-Smtp-Source: APXvYqx+CLEXqR1mcb4MPoapn3ds/D4SG19ISlv2DzH7K9vKhU+RbFsjo7t3xTGQRetT6MTAJtYeSA== X-Received: by 2002:a1c:a9c3:: with SMTP id s186mr1938216wme.64.1579881393333; Fri, 24 Jan 2020 07:56:33 -0800 (PST) Received: from mjourdan-ThinkPad-T480.baylibre.local (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id i204sm6121979wma.44.2020.01.24.07.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2020 07:56:32 -0800 (PST) From: Maxime Jourdan To: mchehab@kernel.org, hans.verkuil@cisco.com Subject: [PATCH] media: meson: vdec: don't resume instantly if not streaming capture Date: Fri, 24 Jan 2020 16:56:31 +0100 Message-Id: <20200124155631.7063-1-mjourdan@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200124_075634_983823_974ADD2E X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Jourdan , Neil Armstrong , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org In case userspace configured the capture queue before the source change event, do not resume decoding instantly if it wasn't streamed on yet. Signed-off-by: Maxime Jourdan --- Note: this patch is based off Neil's series: [v4,0/4] media: meson: vdec: Add compliant H264 support drivers/staging/media/meson/vdec/vdec_helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c index ff4333074197..a4970ec1bf2e 100644 --- a/drivers/staging/media/meson/vdec/vdec_helpers.c +++ b/drivers/staging/media/meson/vdec/vdec_helpers.c @@ -417,7 +417,8 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width, * Check if the capture queue is already configured well for our * usecase. If so, keep decoding with it and do not send the event */ - if (sess->width == width && + if (sess->streamon_cap && + sess->width == width && sess->height == height && dpb_size <= sess->num_dst_bufs) { sess->fmt_out->codec_ops->resume(sess); -- 2.20.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic