Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1546418ybx; Thu, 31 Oct 2019 12:11:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0nWdS5jB4MC0SosvIdqGazBDT9a7YSTlEcEMWR+FvGq5Gf1oXXRqXzyjTgM5giwl6vmya X-Received: by 2002:a50:fb87:: with SMTP id e7mr8092690edq.268.1572549105053; Thu, 31 Oct 2019 12:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572549105; cv=none; d=google.com; s=arc-20160816; b=Z0LAsanATSKzmWtVGDCN/vtEmkIaKPtw4s6gJLt80VvYdj67tKuRUik/8LMKU3adGF n0yCc/HALKdpZ2yXQbUzDikKRdKmzfnVJ2Ia/CJAKsqw1p51kiUWMs+0Kpd4eTUlnIQg PKVdzaJWyMLKi1G19SVp9p8dGlZtawLpFbgzoDByySKQ54gFKmbqR6Q9+dOU0coxHvTz 23Q+M0LewjET2moc0fTsxO9l2isyBBUhbNvR3D0r554O/3TDTv3ikrE0LvTX10THhrLF 78GqXa5ai4C5WAAsBvse6hyHMjU2PKMas1h1O28rXTbKehce8ZgVWCjPLF3fqkEr0C81 UTwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=NksrGo7VLDUZCd6HoLBYFFHdmGp1j2rsyx5o8dDFSSM=; b=PWdenlxJDzEdaX+CyCdBpN2qV1rqeoqh//Yord4kLMBn8NUJT5CG2UdPUtPvkazoRg is2FZkSmgvbUPhpBYjv27jmqBNkh0e9oeRvFk8q4nLggW/8k37Od7ORNc8EekkdFMhqE sv5WbEhCkvDuxEriX55m9pxTlPgv4Wy6evFMOX0S5BHFlTBtgiw4xti0Yn0tTgFSY2ys 7SS4RLILwJK2pLd2ehRLuNA8DpJvrN0zuxy2OOZjCjR+281rILe49mIyxf2/+MCP/siU 5MSDg0a2EzL7+2FlmXcwuIibatCgSIeSTz1dxd8/rNveeWKOLqTEsQ1+T4XRWnLY5FQf PJUA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uz29si4435815ejb.68.2019.10.31.12.11.20; Thu, 31 Oct 2019 12:11:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729453AbfJaTKc (ORCPT + 99 others); Thu, 31 Oct 2019 15:10:32 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51862 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729296AbfJaTKb (ORCPT ); Thu, 31 Oct 2019 15:10:31 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 5E60A290B9B From: Adrian Ratiu To: Emil Velikov , Adrian Ratiu Cc: "Linux-Kernel\@Vger. Kernel. Org" , ML dri-devel , linux-rockchip , kernel@collabora.com, linux-stm32@st-md-mailman.stormreply.com, LAKML Subject: Re: [PATCH 0/4] Genericize DW MIPI DSI bridge and add i.MX 6 driver In-Reply-To: References: <20191031142633.12460-1-adrian.ratiu@collabora.com> Date: Thu, 31 Oct 2019 21:10:48 +0200 Message-ID: <87y2x091dz.fsf@iwork.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 Oct 2019, Emil Velikov wrote: > Hi Adrian, Hi Emil! > > 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. No, I haven't. It sounds like a good idea though and I think it's doable. Thank you! > >> .../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. Agreed. I'll do this in v2 unless someone objects or proposes a better alternative. I'll let this series sit a little more on review so others have a chance to see and review; will address all feedback in v2. > > -Emil > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip