Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp316414ybi; Fri, 24 May 2019 04:22:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0q7tJeLaKJwBQBuYglGdsLdYMOaJ9Q/4tn0UHXSjnKgZIKAzxxac3S7cxUK/cLHN5jByL X-Received: by 2002:a17:902:4906:: with SMTP id u6mr5175805pld.220.1558696949055; Fri, 24 May 2019 04:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558696949; cv=none; d=google.com; s=arc-20160816; b=wNw3yyYTuCMwVV/lIXqcE+0HhbiergG55E8OfSTcDluzVLbxCqYHeFtiE9mJcLVMtm m+naP7GECIIfEcyIQjBx/tCpjAARjvR/qZmvmofL9GpDxoq6g8aJALhhXEjKFlvaACvy SAYHeF8M+50l2iYh9PAnRnEy9Xr9SOVfSQ74AZ/dpvlWB6J3ETG6BUK4jxMxQItlzKO9 tIdVS+0caZdrVaJ6qThU2zHzTZceP73P1Wabbk0YW3DnuPR9QMd+XHf7QmKYXYJTv3IK UclnGrnu3nTBgdzNcaFQaIdC3xUfDR9CrDnH/AOMtBa9Qy9xatvS4aRzIde9LGCdVqDW tPog== 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; bh=+JIl4U660OR4AQUICDYBv/hCoOYsSzB4Xynia0AI3YQ=; b=HGjcv4z6GB9hGTwWFRH/tb+wqWpvTieEeV4ud61T6XrUBI9aAVLqorLXblHSU7oYfS 7ajTpYUUIHNV/ypNS5Q5rKYMyhesvKXlq0jCP/NFMDs9uE9KLQFkeX2zGbZkwiclOe1w sRONsOqcS5PyPr2UsryPb4LiVVMGhGaBLudfbxD+yTYLD7e/vXvWAIUntt0bskzt4xWq RAeQpC3ixl0ki9r+pVqCoIlO/WhxEcO2L7Z2IAJFSYzEWbEs/PRkgZZz8N7iGWSs4YBY isrNmMGXPx9vG1qYYNkmTcHMgvmDRp27zx2650qYUJFQVFxLN3/DVrjhTwrVav7hyqez u+pw== ARC-Authentication-Results: i=1; mx.google.com; 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 az4si3536510plb.291.2019.05.24.04.22.13; Fri, 24 May 2019 04:22:29 -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; 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 S2390946AbfEXLTl (ORCPT + 99 others); Fri, 24 May 2019 07:19:41 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60747 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390743AbfEXLTl (ORCPT ); Fri, 24 May 2019 07:19:41 -0400 X-Originating-IP: 90.88.147.134 Received: from localhost (aaubervilliers-681-1-27-134.w90-88.abo.wanadoo.fr [90.88.147.134]) (Authenticated sender: maxime.ripard@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 71F01C0006; Fri, 24 May 2019 11:19:29 +0000 (UTC) Date: Fri, 24 May 2019 13:19:28 +0200 From: Maxime Ripard To: Jagan Teki Cc: Andrzej Hajda , Laurent Pinchart , Chen-Yu Tsai , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Michael Trimarchi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com Subject: Re: [PATCH v2 3/6] drm/sun4i: dsi: Add bridge support Message-ID: <20190524111928.ourdmraxw7vrhaar@flea> References: <20190524104317.20287-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190524104317.20287-1-jagan@amarulasolutions.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, May 24, 2019 at 04:13:14PM +0530, Jagan Teki wrote: > Some display panels would come up with a non-DSI output which > can have an option to connect DSI interface by means of bridge > converter. > > This DSI to non-DSI bridge converter would require a bridge > driver that would communicate the DSI controller for bridge > functionalities. > > So, add support for bridge functionalities in Allwinner DSI > controller. > > Signed-off-by: Jagan Teki > --- > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 60 +++++++++++++++++++------- > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 1 + > 2 files changed, 45 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > index ae2fe31b05b1..2b4b1355a88f 100644 > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c > @@ -775,6 +775,9 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) > if (!IS_ERR(dsi->panel)) > drm_panel_prepare(dsi->panel); > > + if (!IS_ERR(dsi->bridge)) > + drm_bridge_pre_enable(dsi->bridge); > + drm_panel_bridge provides what's needed to deal with both a panel and a bridge, I guess it would make sense to use this instead of duplicating everything. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com