Received: by 10.192.165.156 with SMTP id m28csp812215imm; Thu, 19 Apr 2018 07:59:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx48gKmS94CpwEqjw+DKiWe11vTtjcltSOtzE42tM3INlxUuBDPqYd60urNfZobktnIMcddpi X-Received: by 2002:a17:902:bd8d:: with SMTP id q13-v6mr6545806pls.330.1524149960382; Thu, 19 Apr 2018 07:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524149960; cv=none; d=google.com; s=arc-20160816; b=w9kPADrx1nkO3goNYuPFrmMHoVHj37KoRhwcSTCkVt68jIo7+F3i1gmmtGYz9hzhOU 9tlYPVSjiLeZd4aUEKxB0qaggtGlfDs+vd8bC+FP55L7NPFPcex2ePdFHTl23wCKG+95 c3wClAMyP6QxBJBlfn36EGchMnfwdYhu5Z+nepma8627iPkTUyGo1QTi1+FH74GqnNVO 2qtXWnUHU7PDcWC0sKvQ5AfTkFud+pwyogrOpIS1HFQnDIk7n4ezgA3HGmi6vuKoBL5Y 3/onlrHSZQx5RC2DxjvZJL35j7h0YaTNsopTzF6jtyeej8iTSmpaGUreWbJ+n9rEwloC kqFg== 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=xJaQ33/kRfJMdNUHmkpeRKtZxDg7XX9uxUWBtSOJV0Q=; b=ruEoXyQcMRrCmZ/R1WYoqOs5Hxvko3mv5zWycJT1UcaMet7AlA62B55+qeIzvDZ83J dCZWuYKV1Z216iuH6e55YIFCBI6saWdlTbpIHzvmaUZjCAjSJjgGS1hmlm2L/LaRhL6p 2nJ0XKxKnSNYh0iWvErtPJtbKTRvIZ+Kc6SqPsUZHQB8Y6sj68zcvvLO/z76fc6WRuRK WlPC39rfVqJNgaD/Eh3a9nFfiPCcMV5uABO5YwtxKFByrUeJ5PpPawwb4ONZvd3s6aNB ltGZmWU/j+5Gi0tsIlOQOqXlv+fN7XKJL3ouDGmBcOwKRMwlEei8w3WFDzhCH5q58e1Y k5UA== 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 v40-v6si3646377plg.84.2018.04.19.07.59.06; Thu, 19 Apr 2018 07:59:20 -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 S1753741AbeDSO5p (ORCPT + 99 others); Thu, 19 Apr 2018 10:57:45 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40482 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753684AbeDSO5n (ORCPT ); Thu, 19 Apr 2018 10:57:43 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 367D520894; Thu, 19 Apr 2018 16:57:41 +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 (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id BDDE72072D; Thu, 19 Apr 2018 16:57:40 +0200 (CEST) Message-ID: <79645e203d414109f885a8fc032588c27a0b8af9.camel@bootlin.com> Subject: Re: [linux-sunxi] [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver From: Paul Kocialkowski To: Joonas =?ISO-8859-1?Q?Kylm=E4l=E4?= Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng , Florent Revest , Alexandre Courbot , Hans Verkuil , Laurent Pinchart , Sakari Ailus , Maxime Ripard , Thomas van Kleef , "Signed-off-by : Bob Ham" , Thomas Petazzoni , Chen-Yu Tsai Date: Thu, 19 Apr 2018 16:56:28 +0200 In-Reply-To: References: <20180309100933.15922-3-paul.kocialkowski@bootlin.com> <20180309101445.16190-3-paul.kocialkowski@bootlin.com> Organization: Bootlin Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-3Ks6QjVRPVo48BWtjOBC" X-Mailer: Evolution 3.28.1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-3Ks6QjVRPVo48BWtjOBC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, 2018-03-12 at 17:15 +0000, Joonas Kylm=C3=A4l=C3=A4 wrote: > Paul Kocialkowski: > > diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h= =20 > > b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > new file mode 100644 > > index 000000000000..7384daa94737 > > --- /dev/null > > +++ b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > @@ -0,0 +1,170 @@ > > +/* > > + * Sunxi Cedrus codec driver > > + * > > + * Copyright (C) 2016 Florent Revest > > + * Florent Revest > > + * > > + * Based on Cedrus > > + * > > + * Copyright (c) 2013 Jens Kuske > > + * > > + * This software is licensed under the terms of the GNU General > > Public > > + * License version 2, as published by the Free Software Foundation, > > and > > + * may be copied, distributed, and modified under those terms. > > + * > > + * This program is distributed in the hope that it will be useful, > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + * GNU General Public License for more details. > > + */ > > + > > +#ifndef SUNXI_CEDRUS_REGS_H > > +#define SUNXI_CEDRUS_REGS_H > > + > > +/* > > + * For more information consult http://linux-sunxi.org/VE_Register_ > > guide > > + */ > > + > > +/* Special registers values */ > > + > > +/* VE_CTRL: > > + * The first 3 bits indicate the engine (0 for MPEG, 1 for H264, b > > for AVC...) > > + * The 16th and 17th bits indicate the memory type (3 for DDR3 32 > > bits) > > + * The 20th bit is unknown but needed > > + */ > > +#define VE_CTRL_MPEG 0x130000 > > +#define VE_CTRL_H264 0x130001 > > +#define VE_CTRL_AVC 0x13000b > > +#define VE_CTRL_REINIT 0x130007 > > + > > +/* VE_MPEG_CTRL: > > + * The bit 3 (0x8) is used to enable IRQs > > + * The other bits are unknown but needed > > + */ > > +#define VE_MPEG_CTRL_MPEG2 0x800001b8 > > +#define VE_MPEG_CTRL_MPEG4 (0x80084118 | BIT(7)) > > +#define VE_MPEG_CTRL_MPEG4_P (VE_MPEG_CTRL_MPEG4 | BIT(12)) > > + > > +/* VE_MPEG_VLD_ADDR: > > + * The bits 27 to 4 are used for the address > > + * The bits 31 to 28 (0x7) are used to select the MPEG or JPEG > > engine > > + */ > > +#define VE_MPEG_VLD_ADDR_VAL(x) ((x & 0x0ffffff0) | (x >> > > 28) | (0x7 << 28)) > > + > > +/* VE_MPEG_TRIGGER: > > + * The first three bits are used to trigger the engine > > + * The bits 24 to 26 are used to select the input format (1 for > > MPEG1, 2 for=20 >=20 > Trailing whitespace. Will fix in v2, thanks! Cheers, --=20 Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com --=-3Ks6QjVRPVo48BWtjOBC 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+fv9EFAlrYrhwACgkQ3cLmz3+f v9FCaQf+KO0JZ4Nhrm6W+bvAQKNypYri/FApVT/a2YoVHywPIPbJMLEaUyFF9ZKj ToUqGkt5u+hPnPYc4neecl8ESr37bsfNIBaAwUStGu1TeZLQFt9EtQZ1SUnZ6Pn8 6V0FaswOINFkGehtOON6x96TQ0ujj2OdV+vtacTP6Jb3h59hYHp+bKOyyg6UBuPP ebaNpza4LIsxu3BejHF8LQFiufUuVWLqwxuJWF40c0K4j1GCBDXRR9EG2GTRZaqV wm2eNRTR7N2ybjjEK2oclUhp6Hl/m0Q43qvW2nyQgSc+0RGl0adb4C+sd8Gb9P0U ew5F5lX1p7e7yIGUyLWvBonqfDvCOg== =ZYR4 -----END PGP SIGNATURE----- --=-3Ks6QjVRPVo48BWtjOBC--