From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18FB8C433DF for ; Thu, 13 Aug 2020 19:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7045206B2 for ; Thu, 13 Aug 2020 19:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgHMTFm (ORCPT ); Thu, 13 Aug 2020 15:05:42 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:60918 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbgHMTFm (ORCPT ); Thu, 13 Aug 2020 15:05:42 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 361E42002E; Thu, 13 Aug 2020 21:05:28 +0200 (CEST) Date: Thu, 13 Aug 2020 21:05:27 +0200 From: Sam Ravnborg To: Venkateshwar Rao Gannavarapu Cc: hyun.kwon@xilinx.com, laurent.pinchart@ideasonboard.com, dri-devel@lists.freedesktop.org, sandipk@xilinx.com, airlied@linux.ie, linux-kernel@vger.kernel.org, vgannava@xilinx.com Subject: Re: [RFC PATCH V2 2/2] drm: xlnx: dsi: driver for Xilinx DSI TX subsystem Message-ID: <20200813190527.GA796524@ravnborg.org> References: <1597106777-30913-1-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> <1597106777-30913-3-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1597106777-30913-3-git-send-email-venkateshwar.rao.gannavarapu@xilinx.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=f+hm+t6M c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=Am4ss40yAAAA:8 a=e5mUnYsNAAAA:8 a=IXgV3OlwSc8iuBbpLzUA:9 a=P_rrYiEMR7mftgad:21 a=wDHEmPcqT0wlVZaQ:21 a=CjuIK1q_8ugA:10 a=lf-hbUz_c89dky27wAWH:22 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Venkateshwar On Tue, Aug 11, 2020 at 06:16:17AM +0530, Venkateshwar Rao Gannavarapu wrote: > The Xilinx MIPI DSI TX subsystem soft IP is used to display video > data from AXI-4 stream interface. > > It supports upto 4 lanes, multiple RGB color formats, video mode > and command mode. The driver provides the kernel mode setting and > MIPI DSI host functionalities. > > Signed-off-by: Venkateshwar Rao Gannavarapu This is maybe covered before - but considered that this driver is used to control an IP that may be utilised by other hardware configurations in the future this should be independent and not tied to the xilinx display driver. In other words - this would be much better implemented on top of the bridge framework. In the beginning ther will only a single user of this bridge driver, so no backward compatibility is needed. Just update the xilinx driver to use the new bride interface and this should do the trick. Some benefits from this: - drm_panel stuff will be handled by the panel_bridge - the connector will be handled by drm_bridge_conector - no need for the component framework - reuseabilty by others I did not comment on the actual patch - because the details looks good. But the overall design needs an update. I look forward to see this implemented as a bridge driver with the necessary adjustments to the display driver. Sam > --- > drivers/gpu/drm/xlnx/Kconfig | 11 + > drivers/gpu/drm/xlnx/Makefile | 2 + > drivers/gpu/drm/xlnx/xlnx_dsi.c | 701 ++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 714 insertions(+) > create mode 100644 drivers/gpu/drm/xlnx/xlnx_dsi.c > > diff --git a/drivers/gpu/drm/xlnx/Kconfig b/drivers/gpu/drm/xlnx/Kconfig > index aa6cd88..991bb37 100644 > --- a/drivers/gpu/drm/xlnx/Kconfig > +++ b/drivers/gpu/drm/xlnx/Kconfig > @@ -11,3 +11,14 @@ config DRM_ZYNQMP_DPSUB > This is a DRM/KMS driver for ZynqMP DisplayPort controller. Choose > this option if you have a Xilinx ZynqMP SoC with DisplayPort > subsystem. > + > +config DRM_XLNX_DSI > + tristate "Xilinx DRM DSI Subsystem Driver" > + select DRM_MIPI_DSI > + select DRM_PANEL > + select DRM_PANEL_SIMPLE > + help > + DRM KMS driver for Xilinx programmable DSI subsystem controller. > + Choose this option if you have a Xilinx MIPI DSI-TX in video > + pipeline. The driver provides the kernel mode settings and MIPI > + DSI host functionalities. > diff --git a/drivers/gpu/drm/xlnx/Makefile b/drivers/gpu/drm/xlnx/Makefile > index 2b844c6..b7ee6ef 100644 > --- a/drivers/gpu/drm/xlnx/Makefile > +++ b/drivers/gpu/drm/xlnx/Makefile > @@ -1,2 +1,4 @@ > zynqmp-dpsub-objs += zynqmp_disp.o zynqmp_dpsub.o zynqmp_dp.o > obj-$(CONFIG_DRM_ZYNQMP_DPSUB) += zynqmp-dpsub.o > + > +obj-$(CONFIG_DRM_XLNX_DSI) += xlnx_dsi.o > diff --git a/drivers/gpu/drm/xlnx/xlnx_dsi.c b/drivers/gpu/drm/xlnx/xlnx_dsi.c > new file mode 100644 > index 0000000..3231043 > --- /dev/null > +++ b/drivers/gpu/drm/xlnx/xlnx_dsi.c > @@ -0,0 +1,701 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Xilinx FPGA MIPI DSI Tx Controller driver > + * > + * Copyright (C) 2017 - 2019 Xilinx, Inc. > + * > + * Authors: > + * - Saurabh Sengar > + * - Venkateshwar Rao Gannavarapu > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include