Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3835731pxf; Mon, 22 Mar 2021 17:04:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy0ZPDUEav9ZDbHmVQbBTVJcIlQqYouXjEuHaYEWIzRdQyPPhre874Zm79SbDYIqj7Zpqe X-Received: by 2002:a17:906:b747:: with SMTP id fx7mr2255504ejb.474.1616457854288; Mon, 22 Mar 2021 17:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616457854; cv=none; d=google.com; s=arc-20160816; b=TEBXhRZdvEuPS0nFn9yGcBwcoRKsCgkHlqUfWkuYGpseFUlid6axlOoLuEjWq8C+TT DVyVEbNnj3QopagOYRCPpQkSzvK+cZY40HvyGdLrqYq/g7lGq9cWzoWB95ys+pFMsP+m kPXY9Xc311XhPnILsS44HQKS3EC1UysyRP9jTCRDL1ykNAo214AjjdFTT1L2om8R/wPP tqyPAOGTleKVTFnWWCD7wHn2SHhH9XrC5mP6aYczN6IELMvIpwZQHPz53v/jVaE0LmR9 kYRT6cs+Fq3f3945Px3lg6GelOwdPfQbDD9TruKqoXj8lmbgWu8p/NS4w94fSsu/vBvK 6c8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5YR52RLdhNnAc+O0ijCCUotqftoYbULo931/I/TYqlY=; b=MlwZbLiexNf/y+RJ83URn/HyUgquEHj9dcXvadMsCFA2Zv+YOFsRkf4ZVybpGgsbXk GAInh8r9BMcX4GqtZt8oZX72TFI8fmDYkn+QxDHYWXInojEvgLR5qtm4ZFCf/jgLxR6F KeWId7eVRd6w3jrIxgiLMj54A+1juiGHWZqvO5ZHerEv9H/PUmW7epv3qOOlwDsSUxlA mpOM/spoDJuXLjIlBrPXjvOJz6XTnJoYNkofqfYDQ5zCKTcEhquD5OE9zMmFrBCgFnhR fdS8pPWLiyQmLMeP3b5PVMMV17sIWc3TfhD5AXEOLzYqdG07XUqypHsGSio9Qn+4HYWQ rW3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=e0PgscoQ; 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 ho20si12716547ejc.295.2021.03.22.17.03.46; Mon, 22 Mar 2021 17:04:14 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=e0PgscoQ; 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 S230393AbhCWABc (ORCPT + 99 others); Mon, 22 Mar 2021 20:01:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbhCWABN (ORCPT ); Mon, 22 Mar 2021 20:01:13 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32743C061574 for ; Mon, 22 Mar 2021 17:01:13 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4E9D4A52; Tue, 23 Mar 2021 01:01:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616457665; bh=1WW6qwvVbYFjhgbp6peXSl7i0rOj0DjQbdTkGNk0wLA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e0PgscoQxX7AP56OjLdJAIgeK60VwZSRdJPpvuOO9i8cZuz5E54BGmqYVnhU/XNMr 4t5hc3mu/wuhHPqn1yncJUUnq1+tFGygD6pYMAVIt6POXSym7hREqkL7tLRmYtJvwL exR9BU4NtvLv4Hb66LGE+SNmC6HoedzOEws5ElqI= Date: Tue, 23 Mar 2021 02:00:23 +0200 From: Laurent Pinchart To: Stephen Boyd Cc: Sam Ravnborg , Andrzej Hajda , Neil Armstrong , Jernej Skrabec , Jonas Karlman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Douglas Anderson , Sean Paul Subject: Re: [PATCH v2 0/4] drm/bridge: ti-sn65dsi86: Support EDID reading Message-ID: References: <20201030011738.2028313-1-swboyd@chromium.org> <20201101173741.GA1293305@ravnborg.org> <160436612483.884498.883110130131457033@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <160436612483.884498.883110130131457033@swboyd.mtv.corp.google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, On Mon, Nov 02, 2020 at 05:15:24PM -0800, Stephen Boyd wrote: > Quoting Sam Ravnborg (2020-11-01 09:37:41) > > Hi Stephen. > > > > On Thu, Oct 29, 2020 at 06:17:34PM -0700, Stephen Boyd wrote: > > > This patch series cleans up the DDC code a little bit so that > > > it is more efficient time wise and supports grabbing the EDID > > > of the eDP panel over the aux channel. I timed this on a board > > > I have on my desk and it takes about 20ms to grab the EDID out > > > of the panel and make sure it is valid. > > > > > > The first two patches seem less controversial so I stuck them at > > > the beginning. The third patch does the EDID reading and caches > > > it so we don't have to keep grabbing it over and over again. And > > > finally the last patch updates the reply field so that short > > > reads and nacks over the channel are reflected properly instead of > > > treating them as some sort of error that can't be discerned. > > > > > > Stephen Boyd (4): > > > drm/bridge: ti-sn65dsi86: Combine register accesses in > > > ti_sn_aux_transfer() > > > drm/bridge: ti-sn65dsi86: Make polling a busy loop > > > drm/bridge: ti-sn65dsi86: Read EDID blob over DDC > > > drm/bridge: ti-sn65dsi86: Update reply on aux failures > > > > Series looks good. You can add my a-b on the full series. > > Acked-by: Sam Ravnborg > > > > I can apply after Douglas have had a look at the patches he did not r-b > > yet. > > > > Any chance we can convince you to prepare this bridge driver for use in > > a chained bridge setup where the connector is created by the display > > driver and uses drm_bridge_funcs? > > > > First step wuld be to introduce the use of a panel_bridge. > > Then add get_edid to drm_bridge_funcs and maybe more helpers. > > > > Then natural final step would be to move connector creation to the > > display driver - see how other uses drm_bridge_connector_init() to do so > > - it is relatively simple. > > > > Should be doable - and reach out if you need some help. > > I started to look at this and got stuck at ti_sn_bridge_get_bpp(). Where > can I get the details of the bpc for the downstream bridge or panel? Is > there some function that can tell this bridge what the bpc is for the > attached connector? I've posted a patch series to convert to DRM_BRIDGE_ATTACH_NO_CONNECTOR yesterday (and have CC'ed you), but I've overlooked this particular problem :-S You can't get the connector in the .enable() operation, but you can get it in .atomic_enable(), with drm_atomic_get_new_connector_for_encoder(). This being said, it's probably not the right option. What matters here isn't the bpc for the connector, but the format expected by the next bridge in the chain. drm_bridge_funcs has two operations, .atomic_get_output_bus_fmts() and .atomic_get_input_bus_fmts(), to negotiate that format along a chain of bridges. The panel bridge driver (drivers/gpu/drm/bridge/panel.c) doesn't implement those operations, and neither does display-connector.c, so that may be what we should start with. > I see that td_mode_valid() in > drivers/gpu/drm/bridge/tc358775.c stores away the bpc from the incoming > drm_display_info pointer but I'm not sure that is correct because can't > that be called for various and not necessarily the one we're using? You're right, .mode_valid() shouldn't do that. -- Regards, Laurent Pinchart