Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2545130ybh; Mon, 5 Aug 2019 02:50:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ0B7pbJhtoWpjkrFbCUkPQ+b0nXUK8axBL7mi4rBNhIPzYE2rzaz0XaopsJqys+Vkpmiu X-Received: by 2002:a63:4c5a:: with SMTP id m26mr133360294pgl.270.1564998644401; Mon, 05 Aug 2019 02:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564998644; cv=none; d=google.com; s=arc-20160816; b=cQfj5hNbHvzKHxxkaWOTuFGt08eAsjiCnKT9X54ciBydnWqW41qMAgM8Xd12/5JEjj 6UhIFBm6MWh3QQ8uSR183WTualzWI2GsolVcAZfZYkz6IPTrftV9+emuhf9HXa2NpO+3 6gw5oxJRmPPIV4LaETmv/Cjib6esVsp4TboshaHBHUIKvvSRi/Hhv8PGxSt9AiTeUIic 6r2T3ke6V75hXJVW4KYp6qfguo+X87NGMVRGiVQs292wLxYAFezSxKvZSFou7qOiPCWP RG5KbcX91zrVPI7uWKc7JXDKbpz41oDYDrSwnXDAPqsWIdszVhV0aTZEZQlvDV02K/Yo uB/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rcAwqKdU8xdz2J8MS82iePudHi5C1mx1GRfcsYGqZLc=; b=SV42/lr/UuLkuvVPfcuNHv0bRfmbrr0cpqRAVphtt0UMYwdt1OqfVfjUm1D8RjLaBi bpSOYJIBDX/nKzRbijtTFbPUFX6aFJBBaKtfhKd5Jh4Wpe77DcsgQfTYHYzC44flng2l 2xKZEbFgaepPx6ho9LXbDv+qdTXuaQlWaZtems+3d8Re5ywaiT8mxWo1JrZDQ/GgO933 fOxQQ9jAqOwiK/4Fdqd4HbwRKv+D1V7zOpnDPDkRp6FjdAjdmme13/SePDPhlN6oN6kT XEbbBGGh9RxOoKnYJZqnoxSd/4M2nfAOZqnsQpAmzRELYyYBUPqQSbB29JuPRjHX34L6 tKJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=njb4pAnN; 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 f10si11998743pjw.89.2019.08.05.02.50.28; Mon, 05 Aug 2019 02:50:44 -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=njb4pAnN; 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 S1726454AbfHEJsi (ORCPT + 99 others); Mon, 5 Aug 2019 05:48:38 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:47194 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728015AbfHEJsg (ORCPT ); Mon, 5 Aug 2019 05:48:36 -0400 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 071782F9; Mon, 5 Aug 2019 11:48:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1564998514; bh=Hlh6gN/t4xFizjbxHfFQzVLy6XLN3G3JoWMd+k4cq+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=njb4pAnNHQunR991gcRzW/2IP86RN3qunFwrTDBtWjtmCMef9nA6OU6nVetreRI1n QIH94hCpAjye0HhE76vTyRnB0VUDhLkJGvi2wjx53YDM6xUJ0/L3Yo2DdP10d/mvyA fXASI8aA+Balq23VeA4qYdIQxtddCn/45ZRba3Qc= Date: Mon, 5 Aug 2019 12:48:32 +0300 From: Laurent Pinchart To: Fabrizio Castro Cc: Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter , "dri-devel@lists.freedesktop.org" , "linux-renesas-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: Re: [PATCH/RFC 07/12] drm: rcar-du: lvds: Add support for dual link panels Message-ID: <20190805094832.GC29747@pendragon.ideasonboard.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> <1564731249-22671-8-git-send-email-fabrizio.castro@bp.renesas.com> <20190802082020.GH5008@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabrizio, On Mon, Aug 05, 2019 at 09:12:34AM +0000, Fabrizio Castro wrote: > > From: Laurent Pinchart > > Sent: 02 August 2019 09:20 > > Subject: Re: [PATCH/RFC 07/12] drm: rcar-du: lvds: Add support for dual link panels > > > > Hi Fabrizio, > > > > Thank you for the patch. > > > > On Fri, Aug 02, 2019 at 08:34:04AM +0100, Fabrizio Castro wrote: > > > If the display comes with two ports, assume it supports dual > > > link. > > > > > > Signed-off-by: Fabrizio Castro > > > --- > > > drivers/gpu/drm/rcar-du/rcar_lvds.c | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c > > > index 2d54ae5..97c51c2 100644 > > > --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c > > > +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c > > > @@ -751,6 +751,9 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) > > > ret = -EPROBE_DEFER; > > > goto done; > > > } > > > + if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK) > > > + lvds->dual_link = of_graph_get_endpoint_count(remote) > > > + == 2; > > > > This is a bit of a hack, as I think the information should be queried > > from the panel, like we do for bridges. I'd say we can live with this > > for now, but as the data swap flag should come from the panel as well, > > we will need infrastructure for that, and we can as well through the > > dual link flag there at the same time. > > I totally agree, this is a nasty hack, my series is missing the infrastructure > for describing this information > > > I think we should use the drm_bridge_timings structure for this purpose, > > as it would make life more difficult for users of drm_bridge and > > drm_panel to have two different structures (especially when wrapping a > > drm_panel with drm_panel_bridge_add()). The structure could be renamed > > if desired. > > I am not too sure using drm_bridge_timings for panels would make everybody > happy? Is there any alternative? Perhaps this calls for a new struct we could > embed in both drm_bridge_timings and some drm_panel_ data > structure? I think we could simply rename the structure, all its fields apply to panels too. > > > } > > > > > > if (lvds->dual_link) { -- Regards, Laurent Pinchart