Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp842937imm; Thu, 6 Sep 2018 10:56:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZEr5cruPwYQUuYMzwvsbjgirT/izF9r5DeSs+qu89cBQfvtYG9htMTdwQBqnbrCUJz8Srj X-Received: by 2002:a63:7557:: with SMTP id f23-v6mr4016662pgn.135.1536256564161; Thu, 06 Sep 2018 10:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536256564; cv=none; d=google.com; s=arc-20160816; b=ybDbDEr7nscZ2zOUu19s69j8rmiJ3Hzemn20C9jDN2xA0rP+JBk1Xa1KP1TZ8KX6Iq VOaR6LGUku84pJpW5Qy0gcXjtVJEMRpdc62nbsk+JqxJsbol6yZ6DertT0s78tb83phc 7WkoWCLE1p5z+dE9K7/4hWfbEzXGAfmCnPbTD7Y7JyXUl+phCJkTwbat5GPE20DrXNXB eSFDnlrutSeBHwYb8Wz+X7t2j9aZEVcFtPt5ZOgS4BvXmlJapa6rLdrs1lfdAZaRpmYm juH/xG6KKTsiB0L3dQY+P39kp27+S+BeIhO64hMa0wdvcx6BDMnDZZhmtXPfeZbvQikl +gag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=0WZrxHmxpLe134XJ3jTrSq8LG2wdslR5AgJwfMNyhlQ=; b=KJnBDp74BYnQl2Qa9fCAp4CiC3AzUC1QWAhGaPE3gUcG6aYUhvuaG1T5Ih00XDTfyg 5HjaWfG1JANNHxDq89+Lt8hRQw5mPC30Zhvth3y5I7cd0ZPY7rXMaw2Y8sNBNpJNY6yG Ob8NNlS5cLBA5D4wGfVoNIE/8vbneQFStuTtniL+Cs/zrKgGi4LX1HZsBuus4P+YuA/z kdU8lDD4sCp+RScha474Ys+L4i0tyYdeTXXUEH0OKgoGWBEdLtVtH0+uTDgBmkkmWkFq QbQ51CrXeTakVjyzJG4QvWYqUTUSFzOlP9aTPy51AfuUpCgHVtpIUnco0FCzQ3omLSbb VcPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=FmU7EmQD; 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 z5-v6si5346856pgn.348.2018.09.06.10.55.18; Thu, 06 Sep 2018 10:56:04 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=FmU7EmQD; 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 S1728484AbeIFRBK (ORCPT + 99 others); Thu, 6 Sep 2018 13:01:10 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:39786 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbeIFRBK (ORCPT ); Thu, 6 Sep 2018 13:01:10 -0400 Received: from avalon.localnet (38-237-62-37.mobileinternet.proximus.be [37.62.237.38]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4741B119E; Thu, 6 Sep 2018 14:25:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1536236752; bh=oTWt0i8tpHR94qs+kZq4+rnkmm4BrLC9HhAoBJSKkTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FmU7EmQDLmDiztTquyqYwL/SXoYqUkQ9wxqMtZh8pgOe4kLfNqwp+CgL1NKUxNuwP A3Ixrv88UGJtazLCcrO/GychHapeyPlblCz61aHPeL/Msv4T8n+OcsY9yLQD61+RH3 Ba0PZ3PM5o3LiGb8u6o4FGJSCuAmLKSvKRXLVclU= From: Laurent Pinchart To: Linus Walleij Cc: Stefan Agner , Dave Airlie , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Philipp Zabel , Sascha Hauer , Fabio Estevam , NXP Linux Team , Archit Taneja , Andrzej Hajda , Gustavo Padovan , Maarten Lankhorst , sean@poorly.run, Marcel Ziswiler , max.krummenacher@toradex.com, "open list:DRM PANEL DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/6] drm/bridge: use bus flags in bridge timings Date: Thu, 06 Sep 2018 15:25:56 +0300 Message-ID: <10044412.4MiZRujKJI@avalon> Organization: Ideas on Board Oy In-Reply-To: References: <20180905052113.21262-1-stefan@agner.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On Thursday, 6 September 2018 14:07:41 EEST Linus Walleij wrote: > On Wed, Sep 5, 2018 at 8:32 PM Stefan Agner wrote: > > On 05.09.2018 00:44, Laurent Pinchart wrote: > > > > Good point! I actually really don't like that we use the same flags here > > but from a different perspective. Especially since the flags defines > > document things differently: > > > > /* drive data on pos. edge */ > > #define DRM_BUS_FLAG_PIXDATA_POSEDGE (1<<2) > > /* drive data on neg. edge */ > > #define DRM_BUS_FLAG_PIXDATA_NEGEDGE (1<<3) > > Maybe a stupid comment from my side, but can't we just change the > documentation to match the usecases? > > /* Trigger pixel data latch on positive edge */ > #define DRM_BUS_FLAG_PIXDATA_POSEDGE (1<<2) The flags are used for the drm_connector bus_flags field, and really mean driving on the positive/negative edges. We this can't change their meaning like this. > > Using the opposite perspective would also need translation in crtc > > drivers... So far no driver uses sampling_edge. > > > > I would prefer if we always use the meaning as documented by the flags. > > > > I guess we would need to convert DRM_BUS_FLAG_PIXDATA_POSEDGE -> > > DRM_BUS_FLAG_PIXDATA_NEGEDGE. > > > > Linus Walleij, you added sampling edge, any thoughts? > > I just thought it was generally useful to have triggering edge encoded > into the bridge as it makes it clear that this edge is something > that is a delayed version of the driving edge which is subject to > clock skew caused by the speed of electrons in silicon and > copper and slew rate caused by parasitic capacitance. I agree that we need both the driving and sampling edge. In many case they will be opposite, and providing some kind of appropriate defaults in APIs is fine by me, but we need a way to specify both when needed. -- Regards, Laurent Pinchart