linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Adrian Ratiu <adrian.ratiu@collabora.com>
Cc: LAKML <linux-arm-kernel@lists.infradead.org>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-rockchip <linux-rockchip@lists.infradead.org>,
	kernel@collabora.com,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver
Date: Thu, 31 Oct 2019 17:07:36 +0000	[thread overview]
Message-ID: <CACvgo50NmofJrCvADOTxJqJqKEWDsy8qD-1B6R356vFMcmdbWA@mail.gmail.com> (raw)
In-Reply-To: <20191031142633.12460-1-adrian.ratiu@collabora.com>

Hi Adrian,

On Thu, 31 Oct 2019 at 14:26, Adrian Ratiu <adrian.ratiu@collabora.com> wrote:
>
> Having a generic Synopsis DesignWare MIPI-DSI host controller bridge
> driver is a very good idea, however the current implementation has
> hardcoded quite a lot of the register layouts used by the two supported
> SoC vendors, STM and Rockchip, which use IP cores v1.30 and v1.31.
>
> This makes it hard to support other SoC vendors like the FSL/NXP i.MX 6
> which use older v1.01 cores or future versions because, based on history,
> layout changes should also be expected in new DSI versions / SoCs.
>
> This patch series converts the bridge and platform drivers to access
> registers via generic regmap APIs and allows each platform driver to
> configure its register layout via struct reg_fields, then adds support
> for the host controller found on i.MX 6.
>
Have you considered keeping the difference internal to the dw-mipi-dsi driver?
Say having the iMX6 module "request" the v1.01 regmap from the bridge
driver, while rockchip/others doing the equivalent.

>  .../bindings/display/imx/mipi-dsi.txt         |  56 ++
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 518 +++++++++---------
>  drivers/gpu/drm/imx/Kconfig                   |   7 +
>  drivers/gpu/drm/imx/Makefile                  |   1 +
>  drivers/gpu/drm/imx/dw_mipi_dsi-imx.c         | 502 +++++++++++++++++
>  .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   | 154 +++++-
>  drivers/gpu/drm/stm/dw_mipi_dsi-stm.c         | 160 +++++-
>  include/drm/bridge/dw_mipi_dsi.h              |  60 +-
>  8 files changed, 1185 insertions(+), 273 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/imx/mipi-dsi.txt
>  create mode 100644 drivers/gpu/drm/imx/dw_mipi_dsi-imx.c
>

This should make the delta a lot smaller, avoiding the unnecessary
copy of register fields and regmap.
Plus plugging future users will be dead trivial.

-Emil

  parent reply	other threads:[~2019-10-31 17:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 14:26 [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver Adrian Ratiu
2019-10-31 14:26 ` [PATCH 1/4] drm: bridge: dw_mipi_dsi: access registers via a regmap Adrian Ratiu
2019-11-04  9:15   ` Neil Armstrong
2019-11-04 12:03     ` Adrian Ratiu
2019-11-04 15:46       ` Neil Armstrong
2019-10-31 14:26 ` [PATCH 2/4] drm: bridge: dw_mipi_dsi: abstract register access using reg_fields Adrian Ratiu
2019-10-31 14:26 ` [PATCH 3/4] drm: imx: Add i.MX 6 MIPI DSI host driver Adrian Ratiu
2019-10-31 14:26 ` [PATCH 4/4] dt-bindings: display: add IMX MIPI DSI host controller doc Adrian Ratiu
2019-10-31 17:07 ` Emil Velikov [this message]
2019-10-31 19:10   ` [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver Adrian Ratiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACvgo50NmofJrCvADOTxJqJqKEWDsy8qD-1B6R356vFMcmdbWA@mail.gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=adrian.ratiu@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).