Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1291781ybj; Tue, 5 May 2020 17:20:50 -0700 (PDT) X-Google-Smtp-Source: APiQypKabilwTYSgyPTKnW4ZQbLVCeAb26K0WYaE6q32dhzRZ3SDqEBwc2wWeVW1js/y1QEqGoqy X-Received: by 2002:a17:906:7204:: with SMTP id m4mr5269716ejk.48.1588724450750; Tue, 05 May 2020 17:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588724450; cv=none; d=google.com; s=arc-20160816; b=gCaOkzRBZ2//qayTJPbIBqmiKzu+JJMzdIHOEAMVqrxuhSEAjpsySFSVOpMLTSmM6+ xtqBIPkEw+fV8hc3imguWLvvN1HLf/fg/nRtA5DVZni45524cFcIOGMAkELV8QOrlP3/ 4lrwGkUrexPXfDlNgLLx6REmvMJRbvDUNoUr3Fzw/otdtHifb+bykOhu1+nugMq5n1l1 1dhtf9A0jWl13MQlWi84Yfnz5B+BVznDnmj3fosXH9mawtir0Md6fNDyr4ENKMi6gFaV jxcxP0N81MS8XJVsuhqlm557XX8NeLLk6O2W+OF2bDmzD55Ja5rEPoWLmNqyWsOriODh RBUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uxf7PIfuQA1AmzwbgiAc6qi52bK5LTEy5mM67o299pg=; b=ttQfMpD6CvCf0JWo5OG1C2Z7LvdBJO5enopLbNAJbY6n9jtB439tvfdWq1Gf/oofkY yJeYjlBZfeY9xMSXD9rFIDqqgiTCj+OG83NSMq6IyzW/g4X7DVwqP8z/ILGNAhDPAc61 r0qhSiJnVC/EZGltsSirvKcNtFiyHMireTvdZw/GHqNSynJxaP3A0/JMCvmlW46zIAa8 0klEqXGyC8B4k+PuixJUOmUO4OjFLrF1lUOARXSmQ1tMBvXZLLRXSIG5foo04yW91/0o e6yG1W+iNRpHT3ksWz1+UHqxwUjCWS9MssWRqjJC/7UhxJ3WEs9HoMbMHs/tXqwVvg5H bGXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YP9DojNn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si97840eds.581.2020.05.05.17.20.27; Tue, 05 May 2020 17:20:50 -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=@chromium.org header.s=google header.b=YP9DojNn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729159AbgEFATD (ORCPT + 99 others); Tue, 5 May 2020 20:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728356AbgEFATD (ORCPT ); Tue, 5 May 2020 20:19:03 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 242C8C061A0F for ; Tue, 5 May 2020 17:19:03 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id g2so11444vsb.4 for ; Tue, 05 May 2020 17:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uxf7PIfuQA1AmzwbgiAc6qi52bK5LTEy5mM67o299pg=; b=YP9DojNnvL0GKT59bxFJk7GMLrsEk2LCd5aowl6qLFcQdpPAxIs6zTVGg2i6fYhDJz dyvRxqWVH9vP7aAeBY2R+7ovwrMKFqgr+zf5hfdg2ome+cQL9T+tX2oEiMp15mZ3FxB7 qL0Sg3ZHqsoiZp8InrBjMlJzG2kBeeYmEkBsk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uxf7PIfuQA1AmzwbgiAc6qi52bK5LTEy5mM67o299pg=; b=e1emW5Z4YJELKh4Ap5aXGYNXKJZLPekNEvdMOKAEnRoZi5zuDwWvhmj+il8oVhH2hD VlgNO7xUJig731xffSV31i4SmCAFikBgikTeE+zuQBFI2xCYLf2HYsh+FS0Woe8k7zPz /g1/+EEQ9jpb7Y8Qg8nNuH2ilefvErGOuqTP+GYAQCJ8Wzn9uhWOXjKtdmOgMN5yo4/3 4MSoXIRdsthqzQwwt1UBZE6Gi0Y1c8OTHf33AeaEaH2Grr9BaHE6mh7j0i6VlFxJZpOm ZGzkL8TtyXIDjB3B6aOU5a4v7lkiOI5GWB07UUjVEIS/4WgMmGZTLaeu+mnkJHU4xZtc Ysng== X-Gm-Message-State: AGi0PubZgKtj48Erp4w3U2Tw3iIZ9pjDEsUVbXJM3f8HewxlP61RFAL4 aC4TPZr4BGD4ypX0iOwDjn9TdrMnbxU= X-Received: by 2002:a67:f957:: with SMTP id u23mr5877488vsq.146.1588724341905; Tue, 05 May 2020 17:19:01 -0700 (PDT) Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com. [209.85.217.41]) by smtp.gmail.com with ESMTPSA id q25sm84107uap.1.2020.05.05.17.19.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 May 2020 17:19:00 -0700 (PDT) Received: by mail-vs1-f41.google.com with SMTP id g2so11397vsb.4 for ; Tue, 05 May 2020 17:19:00 -0700 (PDT) X-Received: by 2002:a05:6102:4d:: with SMTP id k13mr5406597vsp.198.1588724340078; Tue, 05 May 2020 17:19:00 -0700 (PDT) MIME-Version: 1.0 References: <20200504213624.1.Ibc8eeddcee94984a608d6900b46f9ffde4045da4@changeid> <20200505082436.GD9658@pendragon.ideasonboard.com> <20200505210609.GA6094@pendragon.ideasonboard.com> <20200505211401.GC6094@pendragon.ideasonboard.com> In-Reply-To: From: Doug Anderson Date: Tue, 5 May 2020 17:18:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity To: Laurent Pinchart Cc: Andrzej Hajda , Neil Armstrong , Rob Clark , Sean Paul , linux-arm-msm , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , dri-devel , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, May 5, 2020 at 2:24 PM Doug Anderson wrote: > > Hi, > > On Tue, May 5, 2020 at 2:14 PM Laurent Pinchart > wrote: > > > > > I'll add this documentation into the comments of the yaml, but I'm not > > > going to try to implement enforcement at the yaml level. > > > > Why not ? :-) > > Because trying to describe anything in the yaml bindings that doesn't > fit in the exact pattern of things that the yaml bindings are designed > to check is like constructing the empire state building with only > toothpicks. > > If you want to suggest some syntax that would actually make this > doable without blowing out the yaml bindings then I'm happy to add it. > Me being naive would assume that we'd need to do an exhaustive list of > the OK combinations. That would be fine for the 1-land and 2-lane > cases, but for 4 lanes that means adding 256 entries to the bindings. > > I think the correct way to do this would require adding code in the > project but that's > really only done for generic subsystem-level concepts and not for a > single driver. OK. Looked at your review of the .yaml and the "uniqueItems" is probably the bit I didn't think of. With that I can limit this but it's still a little awkward. I still haven't figured out how to force data-lanes and lane-polarities to have the same number of items, too. I'll add this as an add-on patch to my v2 and folks can decide if they like it or hate it. # See ../../media/video-interface.txt for details. data-lanes: oneOf: - minItems: 1 maxItems: 1 uniqueItems: true items: enum: - 0 - 1 description: If you have 1 logical lane it can go to either physical port 0 or port 1. Port 0 is suggested. - minItems: 2 maxItems: 2 uniqueItems: true items: enum: - 0 - 1 description: If you have 2 logical lanes they can be reordered on physical ports 0 and 1. - minItems: 4 maxItems: 4 uniqueItems: true items: enum: - 0 - 1 - 2 - 3 description: If you have 4 logical lanes they can be reordered on in any way. -Doug