Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8471565ybl; Thu, 16 Jan 2020 17:31:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy2cDg/wRkphGzQTSZF15yGp+TL1+WfuVUhOZrtaMBQ0IVbVBmeNYUXMNkOH1jVFk2gBFUA X-Received: by 2002:a05:6808:486:: with SMTP id z6mr1701744oid.117.1579224688989; Thu, 16 Jan 2020 17:31:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579224688; cv=none; d=google.com; s=arc-20160816; b=sgR5Gzlz7qkcy6GDE/3bFcmc+RVzft+Psq372GPWcdbIltUvf6XLOkJA1ge60SatZz fKMU792y11NTDhK1nUwbYa3NNdYlwm0hYuVSEwgQAyEQxYhIEO9mAJamLHcDPgxezEpJ IGmnQ4a3PKYKrYwUqouXgTtKkWKRcx3nVT/NZiPmicP8dDXZcCGEyinNhZoFJKDGBK5L GO1IJMUAhV4Owm6VgSPATDFVupz0aq016HUjP6LN//ZF7rbdYydcToGD1CHry6Cg+ySH rfvGxWvRqVU6AG+1mkrLj+hxuttDrm/ZmWwQbj1FtQZu/nlSa7Lja7XidfHxSQ45vmWW Byxw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ghsn0at8BhocwQOZMEv288iKTDjIH+wQwCEkY6d3oK4=; b=uOVEhXmxuANXL5GAoSJgzBKOwnFv7OkurTwJSyBf0p/FTUmJjWc7udDhoDIgJDSfBp 2MA94ERDAfA/z5nVh1Fop0+fhUfYtLKjqpwPgsetsgZZWvpTZ5a0Up2pCqTWA9u/Lmft plZlKYTcHR06TDdNCWj82JXDX6KPqyGBgAzckCF6ziXpAMmWwbIn13XRsvaE1F5AF4ch 7SZcxUqa0V81fxo+3jsNd6uQZV3pSP4V5aTb9S3yT778LKPuknSYC34AHxfA3EoMzMrf Hoj3zJg6KewlZY33vXR3reGZw1rfCHrzE8/6XzMT+KOgRssBPxw7ff/navlrwmT7admD Qv+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tlF1HcMN; 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 c21si14744024oto.176.2020.01.16.17.31.16; Thu, 16 Jan 2020 17:31:28 -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=@kernel.org header.s=default header.b=tlF1HcMN; 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 S1731354AbgAPX0a (ORCPT + 99 others); Thu, 16 Jan 2020 18:26:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:56424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387878AbgAPX0J (ORCPT ); Thu, 16 Jan 2020 18:26:09 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20DEE2072E; Thu, 16 Jan 2020 23:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579217168; bh=Zi6tO6mU0v33uTz5M1Fntb6V4rUxEWSn1hKg1MFqfl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tlF1HcMNn+6evalcj6HlgpfQOuTTLrVxef9i9FLC/KOHFJOHbKcHeptQ/tSuoYHYn ZujUk61GKfSsC/WQp4HnZkKWVyM7gWe03Un/hYiW9lsbsZkgLIP6kx3XkRWzvkUYhd oJqRzuw4/DENyCMNeUhTWkDtoEI54xvUnN4sq0VM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonas Karlman , Boris Brezillon , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.4 158/203] media: hantro: Set H264 FIELDPIC_FLAG_E flag correctly Date: Fri, 17 Jan 2020 00:17:55 +0100 Message-Id: <20200116231758.591113128@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200116231745.218684830@linuxfoundation.org> References: <20200116231745.218684830@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonas Karlman commit a2cbf80a842add9663522bf898cf13cb2ac4e423 upstream. The FIELDPIC_FLAG_E bit should be set when field_pic_flag exists in stream, it is currently set based on field_pic_flag of current frame. The PIC_FIELDMODE_E bit is correctly set based on the field_pic_flag. Fix this by setting the FIELDPIC_FLAG_E bit when frame_mbs_only is not set. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Jonas Karlman Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/hantro/hantro_g1_h264_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/media/hantro/hantro_g1_h264_dec.c +++ b/drivers/staging/media/hantro/hantro_g1_h264_dec.c @@ -63,7 +63,7 @@ static void set_params(struct hantro_ctx /* always use the matrix sent from userspace */ reg |= G1_REG_DEC_CTRL2_TYPE1_QUANT_E; - if (slices[0].flags & V4L2_H264_SLICE_FLAG_FIELD_PIC) + if (!(sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)) reg |= G1_REG_DEC_CTRL2_FIELDPIC_FLAG_E; vdpu_write_relaxed(vpu, reg, G1_REG_DEC_CTRL2);