Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp968476ybl; Fri, 24 Jan 2020 12:54:37 -0800 (PST) X-Google-Smtp-Source: APXvYqypi6tee2tTOWX6EpbFL+92uoWgFWozGAFJ25nIXA3iNi3jzEtXfpLcb4Pt76at8zTj8Jvw X-Received: by 2002:aca:45c1:: with SMTP id s184mr520225oia.158.1579899277274; Fri, 24 Jan 2020 12:54:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579899277; cv=none; d=google.com; s=arc-20160816; b=RfmLPNDp9UOG41m6dPEAB74n86v6P/DQlNr/7IhyfBQzjDfNySBOBwoJbOVR0Mq2us 75tyV0X1wjhhX+C4oymtP6ovvuH0CP4FLzRxzZulht4p0AhVlOAkm1g50mPAlhHM+LN+ V7WCKgCbg1mByODaAmGQtyz8INQnVUCyffcgrJ0i49feZ7Dujl2TrBkSt4XoJjtarz7U TEyrJSCASX4VIpA3JjAyGbjoJMi9ZmHkLojPbjH8rdhUfLKu7SQm3jN2a0clzPvhysJH 3EnVIvb3EXUp/stvnjnhaZsKxVB2cPw6hX/B59W74Fa+OTD/u/JwE1NZTPjMekYP6mAj Iu9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=V49eDPK1RxI7emBI+6HyeraP6a4Pl1g4ihe19+WEXsY=; b=TPl9azrUKe/5rkphRngW8916eIJP/a1EeSRrf13qnmHZgKX+x5lWVGh96eJnjfePTg NUJo059Wbjyc8GAj47CMOqgeV7vGtN6nxi3RljJC53zIDw/vc/qnN6XjORGuu7v+8RA1 LVgt4DvjAWxysN1Zxo+pjR92zEo7dhAgYzcnuykAqQuUNZw3ZpdWoc7R5uLFN/ec70ea QQf5i2CcHLZgEbFNoRFs+60hokqC3+S2yX7thwtaiMprfW6uEfTAtDcZxboAlA7xF7qm HQFPRQNevjTT1fNGYYNdgE+Dunlbqh4iekEZQjW8DY8GFA5A0j4XDyo4RVw+OXQw/OZB /Nyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=f5s52TMq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si3616368otn.100.2020.01.24.12.54.24; Fri, 24 Jan 2020 12:54:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=f5s52TMq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389588AbgAXP4f (ORCPT + 99 others); Fri, 24 Jan 2020 10:56:35 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50696 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389209AbgAXP4f (ORCPT ); Fri, 24 Jan 2020 10:56:35 -0500 Received: by mail-wm1-f66.google.com with SMTP id a5so2117000wmb.0 for ; Fri, 24 Jan 2020 07:56:33 -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=E1P6iBh7SZlraTQDzGqkPSVcsuQuEDtOW4ukDA4ggJYSzZ4QvSQTr3zbE5M4o1jtRg +UPzsRTtrMdgI304dtYvzEgLUvhQN/Wam2YWflKpyq06UB9Ps1RcNOuyM/7u7uADq37h dHXNJthMYJ39S4dprlGELriJZm3JHlf59kuHrrg7sZ4fyPac6znC7mWIartTZ8aapZzj R20qJ7diSdwYHn7WocPjGK2NxJFpLXhJBCJpQnlBYVGYoexueIkwZz/pDDyRHxG9DpqS 7nfHW2Y26zvkXoxq4vBkH5BSZaxNw1pJYM0CmcNB3DjFy5ARJIVArVgYggeoSisgP+A/ Z2IQ== X-Gm-Message-State: APjAAAVbJx1OudruT5YGW7zsZJRd+y5FVRCS/sdg9Z2SuCbyJUtdRtC0 pJz7SprfNqwBWCArGMV+EE4G7A== 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 Cc: Maxime Jourdan , Neil Armstrong , linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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