Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3481848pxj; Tue, 15 Jun 2021 01:43:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo8ipmtBPRkl8yKZO2D87qTdnsFcROgv0uSavUj15L06gq4VcPXWulOkyQJX1czXGnHLWg X-Received: by 2002:aa7:de18:: with SMTP id h24mr21737426edv.23.1623746605683; Tue, 15 Jun 2021 01:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623746605; cv=none; d=google.com; s=arc-20160816; b=uGEGCEHcPs3DBPbsWju5s21ah52WGmbJi6nDxYE9LqrCqwc7kLwNkJFZvBSqK6if7T Jf9mufH1AnNDNBhtaMZyd6iAONtr5EIxHezm7+OFpzCE0kS52MCvw475uPrbNK3c/nM7 yam74PREX7iWCQrIyMiZSB5oEpgs0qQIx48aDnDwv9ogge3gN2Ia2lAJe1jewQOt4oPp L/NidxPdjyBHkn1kRrZDog//gJI7g2vFewoB6OgPFmT0R9UX++45D0B6dkfaW5Ks9VfX iuSEckFhr+4UXw7DHQm1U0UcZ0ugkqEKY/FU478X9ScJNeRWdHWndJsJQvBHqmKbWaGF I/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=P272GEMadL8ZFN1YvcW3dMHdgber4KEpXLxvk//n2Ys=; b=RyTA646zciHxAUAPFjMvpq7opi+3r52Yi1dio1pgjjP72dbGHqFt55w/hJw3dfZ2QY G0sK2CgY98J2MlEvd9NRHrlmnl5kh6jGIaODZiUfwtHDpIQ1Q2zaWGKx9PK7vL15gE/3 +/prqG8mKCQr6PKkux9FYhMjKtkXCm1be94qjQIeYpvmUzROGTk9OAEfY2dqNrjzTF19 CJxA8eYPdGjXMaH6jBUKoBuUqx/LazkjiXnR/6F2PED+NUM9QMEa8dlM3YZK5spa29LB 09aeBuc2bXR4Bdf+ysnzdndcesuAQ4vWlAaZNljIV6pbqaTkb+tPTGDsT1UaS1u4y0+1 KNEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=eICmrzWs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si1520372ejh.151.2021.06.15.01.43.03; Tue, 15 Jun 2021 01:43:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=eICmrzWs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231178AbhFOImC (ORCPT + 99 others); Tue, 15 Jun 2021 04:42:02 -0400 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:37363 "EHLO lb3-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230455AbhFOImB (ORCPT ); Tue, 15 Jun 2021 04:42:01 -0400 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id t4bwla9VIhg8Zt4bzlNaUe; Tue, 15 Jun 2021 10:39:55 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1623746395; bh=P272GEMadL8ZFN1YvcW3dMHdgber4KEpXLxvk//n2Ys=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=eICmrzWstZ7AN++H0c8Q/gITGcC0Xl09uqdVWcEQr3wJs5JdcQ8MZZYHWw1bqa0jd mB4XJjN2bWix+VzzOFobdXIhsuRV7//yqYHjmppUZoICT2YmEu36F+K4ECSS0hKa4z b0sgAd/9J9gTJ5PLZZi6tPz8a0M/QD/Ut9jAdyJhQMkumda9qdL69wnit/XyIoENtU ovXpYJVM6h1/Dosx0Ik0kAdbSnJ5R8UEEJ9dO7bJ34MbqbbJ5DoINtnrd2oe2UXvuC 8hBBXcxZXVa1TXMEyFu4UoP6iWWERzihA4Gggbne1b9hoUHE1b7FcnNY7NVniJmpPT obXpYYduipt5g== Subject: Re: [PATCH 7/9] media: v4l2-dv-timings: Add more CEA/CTA-861 video format timings To: Nelson Costa , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Cc: Mauro Carvalho Chehab , Laurent Pinchart , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Jose Abreu References: <6a0dcbd4f6dae00c664e5ef80cde3f1eb530c382.1622631488.git.nelson.costa@synopsys.com> From: Hans Verkuil Message-ID: Date: Tue, 15 Jun 2021 10:39:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.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: MS4xfL6NW/1ucZk6RvK/RGh8CVaFh54+iXNMlqxXjlwsZBIeh3ZfrQgmkhckOJAEgkCQdl9XEAmP4VtGW9Sx1loV8lsvjnFW0mPC6CfhxB6N21qu4NWNgG4/ eP2a4YSKhm0FphrbRrR5V+0gZG5zNxYPShxucWAfR+XxRb3j/kEtxm33UxARkfcGHgP7WvFCHgl9PIpppKxnmBCr1fH11Ox4A0MIg14axcf2v6JMwodlIqvD U6qWmCnve9B97KT/2Gn9gXdpUD4OK9mo0via65pPfuXYT6mnKucrXggIEAnZQ6MufL1lpRqtAWTW5lT3ub6v7fa2mEje39PFW8Uz3t+cBEevVcQKDk1oTt35 QNDf2xk5LqWPgw4035G2/nP0xDfMrco/FCezFO3m2b1KtPenkR/ZQ990ORr26RAW5R0C7G2mhhtoEQeXrru2xihTNgllr+IF4LBWNZFGLKu5Y3cwd/w/LcJF 4piFUojQj/OinvCHdGsBDPJYl6yd9kNmUBidP2i1Wfy7SxICY3yw6PNxZP4= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/06/2021 19:04, Nelson Costa wrote: > Hi Hans, > > Thanks for your comments! > > From: Hans Verkuil > Date: qua, jun 02, 2021 at 19:19:25 > >> On 02/06/2021 19:15, Nelson Costa wrote: >>> Hi Hans, >>> >>> Thanks for your comments and feedback! >>> >>> From: Hans Verkuil >>> Date: qua, jun 02, 2021 at 13:26:17 >>> >>>> Hi Nelson, >>>> >>>> On 02/06/2021 13:24, Nelson Costa wrote: >>>>> This extends the support for more video format timings based >>>>> on SPECs CEA-861-F and CTA-861-G. >>>>> >>>>> NOTE: For the newer SPECs the CEA was unified to the CTA. >>>>> The CTA-861-G then includes the CEA-861-F timings besides >>>>> the new timings that are specified. >>>>> >>>>> CEA-861-F: Specifies the Video timings for VICs 1-107. >>>>> CTA-861-G: Specifies the Video timings for VICs 1-107, 108-127, 193-219. >>>>> >>>>> With this patch, the array v4l2_dv_timings_presets has support for >>>>> all video timings specified in CTA-861-G. >>>>> >>>>> Signed-off-by: Nelson Costa >>>>> --- >>>>> drivers/media/v4l2-core/v4l2-dv-timings.c | 139 +++ >>>>> include/uapi/linux/v4l2-dv-timings.h | 1595 ++++++++++++++++++++++++++++- >>>> >>>> I prefer to split this up in two patches, one for each header. >>>> >>> >>> I agree! It will be addressed in the next patch series. >>> >>>> The v4l2-dv-timings.h changes look good (my compliments for all the >>>> work you put into that!). >>>> >>> >>> Thanks! >>> >>>> I am more concerned about adding all these timings to v4l2_dv_timings_presets. >>>> >>>> There are really two different things going on here: the v4l2_dv_timings_presets >>>> array is used both by v4l2_enum_dv_timings_cap() to list supported commonly used >>>> timings, or to match against timings parameters (v4l2_find_dv_timings_cap()), and >>>> as a lookup table when receiving a specific VIC code (v4l2_find_dv_timings_cea861_vic()). >>>> >>>> All the new timings you added are really only relevant in the last case when you >>>> have the vic code. >>>> >>>> I think it is better to create a second array v4l2_dv_timings_non_square_vics[] >>>> (or a better name!) that contains these timings. >>>> >>> >>> I understood. >>> >>> We can then create another array as you said. But when you say >>> "non_square" >>> you mean that the vics have "Pixel Aspect Ratio != 1:1"? >>> >>> Because the new vics added have both kind of vics with "Pixel Aspect >>> Ratio != 1:1" >>> and also "Pixel Aspect Ratio == 1:1". >> >> There are? It's confusing since for 1:1 pixel aspect ratios I expect that the >> picture aspect ratio is set to { 0, 0 }, instead they are all filled in. >> >> I think it will be clearer if I see a v2 where the picture aspect ratio and >> the V4L2_DV_FL_HAS_PICTURE_ASPECT flag are only set for the non-square pixel >> timings. Also, for the timings with 1:1 pixel aspect ratio you don't need to >> add the PA... suffix. That suffix only makes sense for non-square pixel aspect >> ratios. It's confusing otherwise. >> > > It makes sense! That way it will assure coherence with the current > implementation. > In the v2 patch series this will be addressed. > >>> >>> So, for the new vics should we create a second array with name >>> v4l2_dv_timings_extended_vics[]? >> >> The new vics with non-square pixel aspect ratios, or with pixel repetition. >> > > You mean the new vics added that are square should be kept in the > original array? > > And only the new vics that are non-square or with pixel repetition should > go to a second array? Correct. Regards, Hans