Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1699952ybx; Thu, 31 Oct 2019 14:39:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfK8aj7iD7ak8r9DiSM2DtvR9W2sERz1auSEkSGLIZ5hZWRxcqMQhR31PckTEyYsAzgdp5 X-Received: by 2002:a17:906:27ce:: with SMTP id k14mr6490547ejc.72.1572557987053; Thu, 31 Oct 2019 14:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572557987; cv=none; d=google.com; s=arc-20160816; b=Cd1HA20him09BVJlQZ5cFQScpgjc7nuBDg+wBDTLPY+HdpRP3dTwYbiMzcSoH+o3fG PsWQwHZMGr2ZAQNPxDJrqNhVAjuwib6U5FuVvNubOL1n1h9t0X5PupIzzT9c3rPWSIlU vzpIY9/KsPUbxaMbk4z1WBx2wZ33ikBoGqh4mD0Txt7Ko0Uydst4JcVLlxxMh4splqJc 5Dll7YzYzrileAR6sZFgFKlNYiEv4e3rOyEyN5cxu14visEB8SwnR83BsjaC/ZWNnmaI LOocvoLiSQJsrkYWC5Dc4qXvBfIpSoDyQjQDuoBBiKGGKiIk9H0adAycWTnRFUTXz5Eo s38Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BbJu3UVGxb/D3O3Jaajy2yYceop1LdG6jIZpC2UGdME=; b=qf8LD9bPsPy4NpZaj5VI+u9Tb402gWm4jbC4s/8Ph7MFYpuZCBQa7afMF1DbwKjSC6 zlFj/tBpe79GiIhpg/2SE/p2+CeGDonz7OPJKxzNI+jUG9s4BytUUoN5YwuCiA5umFM7 i8Q2cAP2sv2wYYgpQu9aS+ShTC+K2g23xkto2WQ8i4P0RfkjFsaer6ucOMdAqBx7od8C 298MB+GtSLEvAzMr7oX9XxsGicZXdxn8FQkhDxsW7QUdauH4syFH7PgVTjMbEx29U87O xts20OtIdJW6rULvVCbqpNadsqFCsp5eQ/Q2b1R2swilbXJ+tIQn+ZYrOKoFiaXBiYuv O5YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sILgo0Ex; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si4381744ejz.22.2019.10.31.14.38.56; Thu, 31 Oct 2019 14:39:47 -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 header.i=@gmail.com header.s=20161025 header.b=sILgo0Ex; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbfJaRJd (ORCPT + 99 others); Thu, 31 Oct 2019 13:09:33 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:33004 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728547AbfJaRJc (ORCPT ); Thu, 31 Oct 2019 13:09:32 -0400 Received: by mail-vs1-f66.google.com with SMTP id k1so4608585vsm.0 for ; Thu, 31 Oct 2019 10:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BbJu3UVGxb/D3O3Jaajy2yYceop1LdG6jIZpC2UGdME=; b=sILgo0ExuXrqJv9wUbE2Tumq0ELe9CBQDKkU77dnmj/RuVa26/zmecu0GpbeZGTHBM ePVf1uFkrSYmYYbtLs705cqb8LfV8HUlHunhiFQbAbOik3oQEtW7EJPpasqgTvjQ2TM0 LIrREjmrFrRvjpBgBmRubuP6d0oRUxDI8Hc32Y4qIlmCaBj2B/JSC+PHwtXGcKgLiWus DEKo5bKI89SVAivdVDnQ+wCLFKmAm9oWYDSxKRXcB3/y3uZeqC/7CvcgrGjxfvkSWxoG TG6wKMt7wZHp7DAHNEHqrk4ygoaC3HxA8z/wUcmHdZrBvMtS821UR9VsV2r3le3tgedY vrJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BbJu3UVGxb/D3O3Jaajy2yYceop1LdG6jIZpC2UGdME=; b=h6tnDywcAEsw02RsIB+L9TO3xAisu/tWaBxwy+bz2T3UeJWiCVbTJXhU8obC59aU+f XO0YT8fk4ctctlKmY3f+9pQ2gVzFGTQ559Kw6dtxnuARkTVARtKYk9cQ665fIrL3CaHR 9Gs95ouakhgbNWugL14JgJ7CQnpH/25XnEXz5o8lJ+BrbP0Bc5L458maTy/JpLrhE5QY XEwZ9KUQBAxnAA500aWdy+PTzOZVWyIwcnRtz3doIk5ii//jMk/hDoDpAqz+Vo5L973/ ohOmplWan4TYSFdirsnnXejt518dj0aQDBuRgTvHOTQ4qPOHKHiz/cYS8sYL/bwIOtj/ JKpA== X-Gm-Message-State: APjAAAV7su0o3dvl87mtzDCANg+xL9mE9aqhNn0hOCWn7pE/iSy9Z2AB PyQyJo73Mk6VAulLBJEgmpkzsBa8pt/t5h4HbCM= X-Received: by 2002:a67:77d4:: with SMTP id s203mr3435400vsc.118.1572541771757; Thu, 31 Oct 2019 10:09:31 -0700 (PDT) MIME-Version: 1.0 References: <20191031142633.12460-1-adrian.ratiu@collabora.com> In-Reply-To: <20191031142633.12460-1-adrian.ratiu@collabora.com> From: Emil Velikov Date: Thu, 31 Oct 2019 17:07:36 +0000 Message-ID: Subject: Re: [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver To: Adrian Ratiu Cc: LAKML , linux-stm32@st-md-mailman.stormreply.com, linux-rockchip , kernel@collabora.com, "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrian, On Thu, 31 Oct 2019 at 14:26, Adrian Ratiu 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