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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 4119EC43381 for ; Fri, 22 Feb 2019 01:28:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAC7F207E0 for ; Fri, 22 Feb 2019 01:28:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="prQgkmsO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbfBVB2T (ORCPT ); Thu, 21 Feb 2019 20:28:19 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40475 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfBVB2S (ORCPT ); Thu, 21 Feb 2019 20:28:18 -0500 Received: by mail-wr1-f68.google.com with SMTP id q1so578759wrp.7 for ; Thu, 21 Feb 2019 17:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=0nDj4yU4v9b2HljLBbyRCecwe3C0YUC/hMMHw0sho/4=; b=prQgkmsO6BTM3OO6Ds+NHGW0Q4N+mT+TZ1+gHPQIjwNJaOLm+wNsVDVnW7cW7Gf9ij 007B6Z2G9xTQbe9O8u36NYzP1zb/+D5b6xlYJIWfaPzNSVy/k0fygDZzlqZNtz7RyOpg UMCGOp5fsHJH3yMI4dZFRZYGJXF2+lz1ztSfJJlVC1NeabcI3rlYPHYIdj/jC9VqKJ29 9RXi1PW4UHKq3HbuEKvkCslZ7jE8YWVJfxOi5jB9OwEBPBKkaNg879HC88TVGY0d7anj ma7wwxdRW5vp27y9w8YnUVfvfa7a5K9wW9EYxSUnpV3q2bwZchOBZ14K3xuvNhUP2dl4 MR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=0nDj4yU4v9b2HljLBbyRCecwe3C0YUC/hMMHw0sho/4=; b=eULU6O9FQGY0ajjw5SfmjLIOuMK8kC7Nt9qHhoEKiYW+6HdfPodxMv9pkt//9KT9mz E0nFVbmcoMEK46tBGo6kghTV9TJcksjscIGCwKujwk++liRdG/9XZFqUqjkPotgrkv+s VfIEJzkuyVPAOBXy5bcAUkOvjSY3nuD8O8zesqmehkeghV3tx0PqfKSMyor+IIAsNvmc NvVGFLouy/2qo3g3D9rKBIUov0NLT8CFSuefuOfFMLX0WX1U+VWXQUPVxtQGG/6Svkd/ 8ng8Ts7Bkl1U5qDtUjbX0pFBBkBYA6lGljuANSypU3Fj1YXKVKBsdw9aOv6xIbCUM5T5 ymug== X-Gm-Message-State: AHQUAuZ6Q4f2PugCS9lUBriJQubx0YgymCQblHUCg9unL0jl3ycWeSqe IIzq2urB6VKnenlncYFLjMA= X-Google-Smtp-Source: AHgI3IZJTbvwwY0W9DOglCJ6Hcj5bVCAbHIZEayqzoXtpXR324Ey+pG8pmS8g4aXR9K2MiN0LWOS4w== X-Received: by 2002:adf:b687:: with SMTP id j7mr951321wre.81.1550798895663; Thu, 21 Feb 2019 17:28:15 -0800 (PST) Received: from [172.30.89.59] (sjewanfw1-nat.mentorg.com. [139.181.7.34]) by smtp.gmail.com with ESMTPSA id k6sm131852wrq.82.2019.02.21.17.28.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 17:28:15 -0800 (PST) Subject: Re: [PATCH] media: imx: vdic: add frame skipping support To: =?UTF-8?Q?Ga=c3=abl_PORTAY?= , linux-media@vger.kernel.org, Philipp Zabel Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , kernel@collabora.com References: <20190218151304.662-1-gael.portay@collabora.com> From: Steve Longerbeam Message-ID: <997b314f-3aa0-5fb1-f2ee-afd0bbe10e71@gmail.com> Date: Thu, 21 Feb 2019 17:28:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190218151304.662-1-gael.portay@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Gael, Some general comments before getting to specifics below. First, the frame skipping register interface in IPUv3 is very similar between CSI/SMFC, VDIC, IC PRPENC, and IC PRPVF. They all support the same register frame skipping interface, the only difference being the maximum skip set. CSI/SMFC max skip set size is 5 frames, IC PRPENC/VF is 4, and VDIC is 11. So It would be preferable to move the frame skipping API into imx-media-utils, to make this available to the CSI, PRPENC, PRPVF, and VDIC subdevices with less code duplication. Second, since there is no API change in IPUv3 (only the addition of a new exported function), it would be much preferred to split this patch up into at least 2 patches, one being pure IPUv3 patch, and the other(s) pure imx-media. On 2/18/19 7:13 AM, Gaël PORTAY wrote: > The VDIC can skip frames, allowing to reduce the frame rate at its > output pad by small fractions. > > With this commit, once can specify the frame interval with media-ctl. > > media-ctl -V "'ipu1_vdic':2 [fmt: UYVY8_2X8/720x576@1/30 field:interlaced-tb]" The VDIC source pad will only output motion-compensated de-interlaced output, so above should be written "field:none". > > The commit is an adaptation for VDIC of the commit fb30ee795576 ([media] > media: imx: csi: add frame skipping support). > > Signed-off-by: Gaël PORTAY > --- > drivers/gpu/ipu-v3/ipu-common.c | 28 +++++ > drivers/staging/media/imx/imx-media-vdic.c | 129 +++++++++++++++++++-- > include/video/imx-ipu-v3.h | 1 + > 3 files changed, 149 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c > index 474b00e19697..19e1e50dc469 100644 > --- a/drivers/gpu/ipu-v3/ipu-common.c > +++ b/drivers/gpu/ipu-v3/ipu-common.c > @@ -35,6 +35,12 @@ > #include