From patchwork Thu Jan 16 23:17:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233719 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 0C6CDC33CAF for ; Thu, 16 Jan 2020 23:42:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB3C22072E for ; Thu, 16 Jan 2020 23:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579218171; bh=Zi6tO6mU0v33uTz5M1Fntb6V4rUxEWSn1hKg1MFqfl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TOe/YO13P8Ju10O90eZUjyU364qrsMbv6SlZunSxzDcbx5Xft/Pe1eWINie1Zjg8E 1q7AEx6YRNrJb4XS1/pUicE9RsxS+HDpL5TP593zzn0td0jn8XPyc6GR3pBU/MNqdU t13MpMtxkLLyOKP16P8Vud8gNQ31OWi1W83+rSm8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733300AbgAPX0J (ORCPT ); Thu, 16 Jan 2020 18:26:09 -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 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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);