Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp832087imm; Fri, 27 Jul 2018 06:58:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcYmKRwsXPphbIsJWQ0vEI5kXTNcLTedGIslKVaa0P1fYoeteyMj/wkm2JLJBn6qkBHbpyx X-Received: by 2002:a17:902:4906:: with SMTP id u6-v6mr122300pld.44.1532699918963; Fri, 27 Jul 2018 06:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532699918; cv=none; d=google.com; s=arc-20160816; b=k6VnGJLGBBi49KBZP5zk10u5Z/flyB6N10Z+R0V5tTRtXOPtBvqFn4xR0aULfWEO3K VD8u+FuLnOANTAAtlx2adrWMkLfMYawoj5qIehYqbQ58yQKzgIGitCXSSfgijdrVrCNK bfuhS5jOofGYIvIf4Rep0ykG2ydwkYUwmRloAv0yk9VDijhZWwnjODacRb4ZZdBw/XPL SP6U26+gN2ezuZ1D24IjEPZxoTFx4bSlmnWzkWznIphPYHFCcRou1y8jXOmJweVeEYDz cS+dedx5G4vjiTiT7uBcn+K31swO5xv81ojUYStr9xHR2IXr2I5qoKfpiGaLyeRhEjnp 3m3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=WtmXFvHCfCSTUVfXxhi1oNLKdVB2987/eV8o6Ia8850=; b=tc4rTBxI/ufHzHQVhuDEsT73RhsrLH/ml6y5D80daezL8qpWlQiFXsKrjeqRpuPeOj 9M/6hJLjK93bFl+3Roh9cUnDbLtG3QlRaHcJYniWw3F7hp0fJM7OACA8vLU6qt0yTmqy ENTcsYJSXJOm5DGL5vG+lt2/GDxC+knpwrTyzmVE9TNq2twLhQ8d+p6mcSKVzWK7l6ze L8UiOW0NUUtnP0jLBjL8fB/fE96ie8re53yb7W8kaCdzMoOv7aG0OZAfyK6hmdE0NXfc DjFXbJJS4WLa2QkC5gLsOlHNAZCnCrtpFcAJV/jmteu89tS+tHms8cyWiJ5/x5l19ncJ 1Nkw== ARC-Authentication-Results: i=1; mx.google.com; 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 r14-v6si3866310pgl.490.2018.07.27.06.58.23; Fri, 27 Jul 2018 06:58:38 -0700 (PDT) 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; 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 S2388141AbeG0PTC (ORCPT + 99 others); Fri, 27 Jul 2018 11:19:02 -0400 Received: from mail.bootlin.com ([62.4.15.54]:37992 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730709AbeG0PTC (ORCPT ); Fri, 27 Jul 2018 11:19:02 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 3244220798; Fri, 27 Jul 2018 15:56:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from aptenodytes (AAubervilliers-681-1-89-120.w90-88.abo.wanadoo.fr [90.88.30.120]) by mail.bootlin.com (Postfix) with ESMTPSA id C87C820717; Fri, 27 Jul 2018 15:56:45 +0200 (CEST) Message-ID: <8c0b2fbec0302a15292d3629570ab1268fd306b8.camel@bootlin.com> Subject: Re: [PATCH 9/9] media: cedrus: Add H264 decoding support From: Paul Kocialkowski To: Maxime Ripard , hans.verkuil@cisco.com, acourbot@chromium.org, sakari.ailus@linux.intel.com, Laurent Pinchart Cc: tfiga@chromium.org, posciak@chromium.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, nicolas.dufresne@collabora.com, jenskuske@gmail.com, linux-sunxi@googlegroups.com, Thomas Petazzoni Date: Fri, 27 Jul 2018 15:56:45 +0200 In-Reply-To: <20180613140714.1686-10-maxime.ripard@bootlin.com> References: <20180613140714.1686-1-maxime.ripard@bootlin.com> <20180613140714.1686-10-maxime.ripard@bootlin.com> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-029qBFRxMV8wtDZl6vh5" X-Mailer: Evolution 3.28.4 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-029qBFRxMV8wtDZl6vh5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Wed, 2018-06-13 at 16:07 +0200, Maxime Ripard wrote: > Introduce some basic H264 decoding support in cedrus. So far, only the > baseline profile videos have been tested, and some more advanced features > used in higher profiles are not even implemented. Here are two specific comments about things I noticed when going through the h264 code. [...] > @@ -88,12 +101,37 @@ struct sunxi_cedrus_ctx { > struct work_struct run_work; > struct list_head src_list; > struct list_head dst_list; > + > + union { > + struct { > + void *mv_col_buf; > + dma_addr_t mv_col_buf_dma; > + ssize_t mv_col_buf_size; > + void *neighbor_info_buf; > + dma_addr_t neighbor_info_buf_dma; Should be "neighbour" instead of "neighbor" and the same applies to most variables related to this, as well as the register description. [...] > +static int sunxi_cedrus_h264_start(struct sunxi_cedrus_ctx *ctx) > +{ > + struct sunxi_cedrus_dev *dev =3D ctx->dev; > + int ret; > + > + ctx->codec.h264.pic_info_buf =3D > + dma_alloc_coherent(dev->dev, SUNXI_CEDRUS_PIC_INFO_BUF_SIZE, > + &ctx->codec.h264.pic_info_buf_dma, > + GFP_KERNEL); > + if (!ctx->codec.h264.pic_info_buf) > + return -ENOMEM; > + > + ctx->codec.h264.neighbor_info_buf =3D > + dma_alloc_coherent(dev->dev, SUNXI_CEDRUS_NEIGHBOR_INFO_BUF_SIZE, > + &ctx->codec.h264.neighbor_info_buf_dma, > + GFP_KERNEL); > + if (!ctx->codec.h264.neighbor_info_buf) { > + ret =3D -ENOMEM; > + goto err_pic_buf; > + } Although this buffer is allocated here, the resulting address is apparently never written to the appropriate VPU register (0x54). Perhaps a write to the aforementioned register was lost along the development process? Cheers, Paul --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-029qBFRxMV8wtDZl6vh5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAltbJJ4ACgkQ3cLmz3+f v9FPTQf5Afysfwywy00aVNkiI4TExiY02o8+LLqffUgPJMpLuI7q0Bia2cy7rnnK nEAmTBdNtCRAnKjkmr6o1lzsA4wrxbvq7SlZZebc8eBXDqU2/dR3p4CiNeCvAzy+ WmtwN1PiG6AhfwQMLoq56vmE7CCdwiRmjl7uWmsQz0Tj/ZERIt46c3MVj7OMlgmW aCO1Mcc7v9vaSlryWU8o5MPppWr8sQ3YfXtzTMTLcvE/iKmaPeJbs3KTZO3qs0w2 gCw4/bnK9FErjRgvB3ztsjwTOACcfhzaKAd/CdFVvTf7gEBVMFw7VzZb6lJuu/WR dzbhuPxMsVgwpgHcTtWs+Hs4w5LGPA== =SAHH -----END PGP SIGNATURE----- --=-029qBFRxMV8wtDZl6vh5--