From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 547F8C433E1 for ; Tue, 2 Jun 2020 10:44:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30E7820679 for ; Tue, 2 Jun 2020 10:44:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=xs4all.nl header.i=@xs4all.nl header.b="Z4VUDVFH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbgFBKog (ORCPT ); Tue, 2 Jun 2020 06:44:36 -0400 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:59537 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgFBKoe (ORCPT ); Tue, 2 Jun 2020 06:44:34 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id g4P6jXBaDCKzeg4PAjJ3Qt; Tue, 02 Jun 2020 12:44:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1591094672; bh=1WzPUPBIE0Uaz6t74C5WQPm2crJOnZO/Fn4WuxbrM0s=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=Z4VUDVFHsqJqWJs8+DlWcTaWPdwdnw8gko60VMLYOilDzsUb3W8+durQUBUvL5+oP Sthoq+4c1YJQUssMAIP8WtDOkOEttFDeVrrD6AZGYw8oYA+2yI2TQnBF2X6kmgWGV4 Zk0/NJHVeACTXGcWwimmntqZ3nYTeN+VDhP8Oa1q4nKJBQxh02kYO2Xza7ByPTIxqK rLUZh0fwu14Db/HnVXJhj/fnwO+XXzH/c0reY9pENHv9o0NymHsHrKZSeL5ijvifZS eqGQmISUDPh3UywOeyL0vtdLYH+uo/HdMuJoKr4p6EfTB7byOgX4OUYfl4MiXNISuo 6mq+X5GqEFaGg== Subject: Re: [PATCH v2 2/2] media: v4l: xilinx: Add Xilinx UHD-SDI Rx Subsystem driver To: Vishal Sagar , Hyun Kwon , "laurent.pinchart@ideasonboard.com" , "mchehab@kernel.org" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , Michal Simek , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , "hans.verkuil@cisco.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Dinesh Kumar , Sandip Kothari , Joe Perches References: <20200429141705.18755-1-vishal.sagar@xilinx.com> <20200429141705.18755-3-vishal.sagar@xilinx.com> <368b7efb-3faf-bb71-2bd0-826f2ab031e6@xs4all.nl> From: Hans Verkuil Message-ID: Date: Tue, 2 Jun 2020 12:44:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfJcogKHJH5sedMLRm7iDVY5GJFXG6YtbvUoqEh55LOJH4zg6u1HF2mt9uivno374New6GAHucz89E7ee6JkqmobSD9+UdFIcUjJTBhrXxr5AdnMfRE74 IMdRhfoZKwXJPM8ECuNkEsezBa6X1mvtV4C6MBu0ZomrW+4QlMaMTpqpLWO/6EYrP/2ckZFtKcBLQW5Ddzy88Wa35QCRf/48b9AMvCXQr8TW5ZgAEEJRKM3h bwY7Daae8yl4w/g8npNRVCkNpqSPm01e0HLBVkYDFnCWHqaD7LFxubGvdWsFmTpE/72ELPTClNJNNBt6Q5kBdPfNbiivna8seASaVVRG8sfFICbSJU3wqKrq pDYUz/72ubcrJrgkEB9hsNIN8Li4IpUqOhIZU44mmxGeX+GKtOz+SkXsD65pKw25YJXttlyij3MnBQoeDn1BNNeZrvieDrRfAlHbxAjyxro5a2xiEuMiQC7Y gart/4mzMjX0unDnfGYGtXhZIcbp3CWs+spCpm8pWVMkeTqok8tXkkWltkChM5/1Z3ocRSInar4we11HmjVoZi4S4+puW3Y74ROVUyvtZYeJM7rxIquIDwoK 4OBxnALO+J5qqW91BP7C5Bqz3Z13dtgsPoZLco6VYfTcWRIRuxe706YwxEytmsV1lK8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/06/2020 16:59, Vishal Sagar wrote: > Hi Hans, > > Thanks for reviewing! > >>> + case V4L2_CID_XILINX_SDIRX_TS_IS_INTERLACED: >>> + if (!xsdirxss->vidlocked) { >>> + dev_err(dev, "Can't get values when video not >> locked!\n"); >>> + return -EINVAL; >>> + } >>> + ctrl->val = xsdirxss->ts_is_interlaced; >> >> This control makes no sense: the v4l2_dv_timings struct will already tell you >> if it is an interlaced format or not. Same for v4l2_mbus_framefmt. >> > > The SDI has a concept of supporting progressive, interlaced (both as we know normally) and a progressive segmented frames(psf). > The progressive segmented frames have their video content in progressive format but the transport stream is interlaced. > This is distinguished using the bit 6 and 7 of Byte 2 in the 4 byte ST352 payload. > Refer to sec 5.3 in SMPTE ST 352:2010. > > This control can be used by the application to distinguish normal interlaced and progressive segmented frames. Ah, interesting. So this relies on the receiver to reconstruct the progressive frame by combining the top and bottom field, right? I think this deserves a new v4l2_field value: V4L2_FIELD_ALTERNATE_PROG Basically this is identical to V4L2_FIELD_ALTERNATE, except that the two fields combine to a single progressive frame. Regards, Hans PS: I'll look at your other comments separately