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=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 241B3C433E1 for ; Wed, 19 Aug 2020 11:48:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0E0A207BB for ; Wed, 19 Aug 2020 11:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837693; bh=+NoH4YjX5TxAfeB92q3/7g03nc1yFW/oR0B99A6AIA8=; h=From:To:Cc:Subject:Date:List-ID:From; b=w1HnoUyEjIdiS/7vs2C4aRxo3g9sxAuwoWJkvcldY2+WiDNNgF7XZotMX7SI4yNA0 6b8lPFeYfIohCQkmLtBh9hSTrZFjKkwX1KdU1q+9GFNfULnVMEkTwKDAnWipaQ4tDO HQt4PV9I7B1PxIhK4oaN72lhfLcHw6id4uOd7JK0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727949AbgHSLsI (ORCPT ); Wed, 19 Aug 2020 07:48:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:44910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbgHSLqX (ORCPT ); Wed, 19 Aug 2020 07:46:23 -0400 Received: from mail.kernel.org (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E29F20885; Wed, 19 Aug 2020 11:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837581; bh=+NoH4YjX5TxAfeB92q3/7g03nc1yFW/oR0B99A6AIA8=; h=From:To:Cc:Subject:Date:From; b=Ic+Hs2SPR5TjgN0Q8ckou8MEnmbrDMOVcj2W8hjSCq0u38W2GCsoGl09f2uLpU9Al HIxIPeMTB6kZq5hWg169GVEsgyuyl159tEDpAj4/kGhH2B+yIwMzAR1ucVQJhR6B3l BerRTWVmuFQT7pZZG3nReu4CGsxfb6mXqVE8M/QU= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1k8MXq-00EuZw-R7; Wed, 19 Aug 2020 13:46:18 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , John Stultz , Manivannan Sadhasivam , Daniel Vetter , dri-devel , Bogdan Togorean , Liwei Cai , linux-arm-kernel@lists.infradead.org, Daniel Borkmann , Rob Herring , "David S. Miller" , Xinliang Liu , Neil Armstrong , Wanchun Zheng , devel@driverdev.osuosl.org, bpf@vger.kernel.org, Xiubin Zhang , linux-media@vger.kernel.org, Tomi Valkeinen , Jesper Dangaard Brouer , Laurent Pinchart , Xinwei Kong , Alexei Starovoitov , devicetree@vger.kernel.org, Rob Clark , Laurentiu Palcu , Andrzej Hajda , John Fastabend , Liuyao An , linaro-mm-sig@lists.linaro.org, Wei Xu , Rongrong Zou , Philipp Zabel , Sam Ravnborg , netdev@vger.kernel.org, Sumit Semwal , linux-kernel@vger.kernel.org, Jakub Kicinski , David Airlie , Chen Feng Subject: [PATCH 00/49] DRM driver for Hikey 970 Date: Wed, 19 Aug 2020 13:45:28 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series port the out-of-tree driver for Hikey 970 (which should also support Hikey 960) from the official 96boards tree: https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 Based on his history, this driver seems to be originally written for Kernel 4.4, and was later ported to Kernel 4.9. The original driver used to depend on ION (from Kernel 4.4) and had its own implementation for FB dev API. As I need to preserve the original history (with has patches from both HiSilicon and from Linaro), I'm starting from the original patch applied there. The remaining patches are incremental, and port this driver to work with upstream Kernel. This driver doesn't depend on any firmware or on any special userspace code. It works as-is with both X11 and Wayland. Yet, I'm submitting it via staging due to the following reasons: - It depends on the LDO3 power supply, which is provided by a regulator driver that it is currently on staging; - Due to legal reasons, I need to preserve the authorship of each one responsbile for each patch. So, I need to start from the original patch from Kernel 4.4; - There are still some problems I need to figure out how to solve: - The adv7535 can't get EDID data. Maybe it is a timing issue, but it requires more research to be sure about how to solve it; - The driver only accept resolutions on a defined list, as there's a known bug that this driver may have troubles with random resolutions. Probably due to a bug at the pixel clock settings; - Sometimes (at least with 1080p), it generates LDI underflow errors, which in turn causes the DRM to stop working. That happens for example when using gdm on Wayland and gnome on X11; - Probably related to the previous issue, when the monitor suspends due to DPMS, it doesn't return back to life. So, IMO, the best is to keep it on staging for a while, until those remaining bugs gets solved. I added this series, together with the regulator driver and a few other patches (including a hack to fix a Kernel 5.8 regression at WiFi ) at: https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master Chen Feng (1): staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 John Stultz (1): staging: hikey9xx/gpu: port it to work with Kernel v4.9 Liwei Cai (2): staging: hikey9xx/gpu: solve tearing issue of display staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab (38): staging: hikey9xx/gpu: get rid of adv7535 fork staging: hikey9xx/gpu: rename the Kirin9xx namespace staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c staging: hikey9xx/gpu: get rid of some ifdefs staging: hikey9xx/gpu: rename the config option for Kirin970 staging: hikey9xx/gpu: change the includes to reflect upstream staging: hikey9xx/gpu: port driver to upstream kAPIs staging: hikey9xx/gpu: add a copy of set_reg() function there staging: hikey9xx/gpu: get rid of ION headers staging: hikey9xx/gpu: add support for using a reserved CMA memory staging: hikey9xx/gpu: cleanup encoder attach logic staging: hikey9xx/gpu: Change the logic which sets the burst mode staging: hikey9xx/gpu: fix the DRM setting logic staging: hikey9xx/gpu: do some code cleanups staging: hikey9xx/gpu: use default GEM_CMA fops staging: hikey9xx/gpu: place vblank enable/disable at the right place staging: hikey9xx/gpu: remove an uneeded hack staging: hikey9xx/gpu: add a possible implementation for atomic_disable staging: hikey9xx/gpu: register connector staging: hikey9xx/gpu: fix driver name staging: hikey9xx/gpu: get rid of iommu_format staging: hikey9xx/gpu: re-work the mode validation code staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator staging: hikey9xx/gpu: add SPMI headers staging: hikey9xx/gpu: solve most coding style issues staging: hikey9xx/gpu: don't use iommu code staging: hikey9xx/gpu: add kirin9xx driver to the building system staging: hikey9xx/gpu: get rid of typedefs staging: hikey9xx/gpu: get rid of input/output macros staging: hikey9xx/gpu: get rid of some unused data staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 dts: hisilicon: hi3670.dtsi: add I2C settings dts: hikey970-pinctrl.dtsi: add missing pinctrl settings dt: hisilicon: add support for the PMIC found on Hikey 970 dts: add support for Hikey 970 DRM staging: hikey9xx/gpu: drop kirin9xx_pwm dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Xiubin Zhang (7): staging: hikey9xx/gpu: add support to hikey970 HDMI and panel staging: hikey9xx/gpu: Solve SR Cannot Display Problems. staging: hikey9xx/gpu: Solve HDMI compatibility Problem. staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970. staging: hikey9xx/gpu: Solve SR test reset problem for hikey970. staging: hikey9xx/gpu: add debug prints for this driver staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays. .../display/hisilicon,hi3660-dpe.yaml | 99 + .../display/hisilicon,hi3660-dsi.yaml | 102 + .../boot/dts/hisilicon/hi3670-hikey970.dts | 56 +- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 77 + .../boot/dts/hisilicon/hikey970-drm.dtsi | 93 + .../boot/dts/hisilicon/hikey970-pinctrl.dtsi | 548 +++- .../boot/dts/hisilicon/hikey970-pmic.dtsi | 197 ++ drivers/staging/hikey9xx/Kconfig | 3 + drivers/staging/hikey9xx/Makefile | 1 + drivers/staging/hikey9xx/gpu/Kconfig | 22 + drivers/staging/hikey9xx/gpu/Makefile | 9 + drivers/staging/hikey9xx/gpu/kirin960_defs.c | 378 +++ .../staging/hikey9xx/gpu/kirin960_dpe_reg.h | 233 ++ drivers/staging/hikey9xx/gpu/kirin970_defs.c | 381 +++ .../staging/hikey9xx/gpu/kirin970_dpe_reg.h | 1188 ++++++++ drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h | 2437 +++++++++++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.c | 1178 ++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.h | 286 ++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.c | 368 +++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.h | 57 + .../staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 1063 +++++++ .../hikey9xx/gpu/kirin9xx_drm_overlay_utils.c | 1005 +++++++ .../hikey9xx/gpu/kirin9xx_dw_drm_dsi.c | 2132 ++++++++++++++ .../hikey9xx/gpu/kirin9xx_dw_dsi_reg.h | 146 + .../staging/hikey9xx/gpu/kirin9xx_fb_panel.h | 191 ++ 25 files changed, 12229 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-pmic.dtsi create mode 100644 drivers/staging/hikey9xx/gpu/Kconfig create mode 100644 drivers/staging/hikey9xx/gpu/Makefile create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_overlay_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_dsi_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h -- 2.26.2 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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 F2CCCC433E3 for ; Wed, 19 Aug 2020 11:46:28 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C39EE20825 for ; Wed, 19 Aug 2020 11:46:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ic+Hs2SP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C39EE20825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8904C86961; Wed, 19 Aug 2020 11:46:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3fhGtlyYUGdm; Wed, 19 Aug 2020 11:46:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DCE6786632; Wed, 19 Aug 2020 11:46:25 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2BFEB1BF30D for ; Wed, 19 Aug 2020 11:46:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 279EE85569 for ; Wed, 19 Aug 2020 11:46:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gq7PQs9f8mnQ for ; Wed, 19 Aug 2020 11:46:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 03EC584AA7 for ; Wed, 19 Aug 2020 11:46:22 +0000 (UTC) Received: from mail.kernel.org (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E29F20885; Wed, 19 Aug 2020 11:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837581; bh=+NoH4YjX5TxAfeB92q3/7g03nc1yFW/oR0B99A6AIA8=; h=From:To:Cc:Subject:Date:From; b=Ic+Hs2SPR5TjgN0Q8ckou8MEnmbrDMOVcj2W8hjSCq0u38W2GCsoGl09f2uLpU9Al HIxIPeMTB6kZq5hWg169GVEsgyuyl159tEDpAj4/kGhH2B+yIwMzAR1ucVQJhR6B3l BerRTWVmuFQT7pZZG3nReu4CGsxfb6mXqVE8M/QU= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1k8MXq-00EuZw-R7; Wed, 19 Aug 2020 13:46:18 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Subject: [PATCH 00/49] DRM driver for Hikey 970 Date: Wed, 19 Aug 2020 13:45:28 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Xinliang Liu , Wanchun Zheng , linuxarm@huawei.com, dri-devel , Andrzej Hajda , Laurent Pinchart , Sam Ravnborg , Sumit Semwal , devel@driverdev.osuosl.org, Daniel Borkmann , Mauro Carvalho Chehab , John Fastabend , Xiubin Zhang , Wei Xu , David Airlie , Xinwei Kong , Tomi Valkeinen , Bogdan Togorean , Philipp Zabel , Laurentiu Palcu , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Liwei Cai , Jesper Dangaard Brouer , Manivannan Sadhasivam , Chen Feng , Alexei Starovoitov , linaro-mm-sig@lists.linaro.org, Rob Herring , John Stultz , Jakub Kicinski , mauro.chehab@huawei.com, Rob Clark , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liuyao An , Daniel Vetter , Rongrong Zou , bpf@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" This patch series port the out-of-tree driver for Hikey 970 (which should also support Hikey 960) from the official 96boards tree: https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 Based on his history, this driver seems to be originally written for Kernel 4.4, and was later ported to Kernel 4.9. The original driver used to depend on ION (from Kernel 4.4) and had its own implementation for FB dev API. As I need to preserve the original history (with has patches from both HiSilicon and from Linaro), I'm starting from the original patch applied there. The remaining patches are incremental, and port this driver to work with upstream Kernel. This driver doesn't depend on any firmware or on any special userspace code. It works as-is with both X11 and Wayland. Yet, I'm submitting it via staging due to the following reasons: - It depends on the LDO3 power supply, which is provided by a regulator driver that it is currently on staging; - Due to legal reasons, I need to preserve the authorship of each one responsbile for each patch. So, I need to start from the original patch from Kernel 4.4; - There are still some problems I need to figure out how to solve: - The adv7535 can't get EDID data. Maybe it is a timing issue, but it requires more research to be sure about how to solve it; - The driver only accept resolutions on a defined list, as there's a known bug that this driver may have troubles with random resolutions. Probably due to a bug at the pixel clock settings; - Sometimes (at least with 1080p), it generates LDI underflow errors, which in turn causes the DRM to stop working. That happens for example when using gdm on Wayland and gnome on X11; - Probably related to the previous issue, when the monitor suspends due to DPMS, it doesn't return back to life. So, IMO, the best is to keep it on staging for a while, until those remaining bugs gets solved. I added this series, together with the regulator driver and a few other patches (including a hack to fix a Kernel 5.8 regression at WiFi ) at: https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master Chen Feng (1): staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 John Stultz (1): staging: hikey9xx/gpu: port it to work with Kernel v4.9 Liwei Cai (2): staging: hikey9xx/gpu: solve tearing issue of display staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab (38): staging: hikey9xx/gpu: get rid of adv7535 fork staging: hikey9xx/gpu: rename the Kirin9xx namespace staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c staging: hikey9xx/gpu: get rid of some ifdefs staging: hikey9xx/gpu: rename the config option for Kirin970 staging: hikey9xx/gpu: change the includes to reflect upstream staging: hikey9xx/gpu: port driver to upstream kAPIs staging: hikey9xx/gpu: add a copy of set_reg() function there staging: hikey9xx/gpu: get rid of ION headers staging: hikey9xx/gpu: add support for using a reserved CMA memory staging: hikey9xx/gpu: cleanup encoder attach logic staging: hikey9xx/gpu: Change the logic which sets the burst mode staging: hikey9xx/gpu: fix the DRM setting logic staging: hikey9xx/gpu: do some code cleanups staging: hikey9xx/gpu: use default GEM_CMA fops staging: hikey9xx/gpu: place vblank enable/disable at the right place staging: hikey9xx/gpu: remove an uneeded hack staging: hikey9xx/gpu: add a possible implementation for atomic_disable staging: hikey9xx/gpu: register connector staging: hikey9xx/gpu: fix driver name staging: hikey9xx/gpu: get rid of iommu_format staging: hikey9xx/gpu: re-work the mode validation code staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator staging: hikey9xx/gpu: add SPMI headers staging: hikey9xx/gpu: solve most coding style issues staging: hikey9xx/gpu: don't use iommu code staging: hikey9xx/gpu: add kirin9xx driver to the building system staging: hikey9xx/gpu: get rid of typedefs staging: hikey9xx/gpu: get rid of input/output macros staging: hikey9xx/gpu: get rid of some unused data staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 dts: hisilicon: hi3670.dtsi: add I2C settings dts: hikey970-pinctrl.dtsi: add missing pinctrl settings dt: hisilicon: add support for the PMIC found on Hikey 970 dts: add support for Hikey 970 DRM staging: hikey9xx/gpu: drop kirin9xx_pwm dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Xiubin Zhang (7): staging: hikey9xx/gpu: add support to hikey970 HDMI and panel staging: hikey9xx/gpu: Solve SR Cannot Display Problems. staging: hikey9xx/gpu: Solve HDMI compatibility Problem. staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970. staging: hikey9xx/gpu: Solve SR test reset problem for hikey970. staging: hikey9xx/gpu: add debug prints for this driver staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays. .../display/hisilicon,hi3660-dpe.yaml | 99 + .../display/hisilicon,hi3660-dsi.yaml | 102 + .../boot/dts/hisilicon/hi3670-hikey970.dts | 56 +- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 77 + .../boot/dts/hisilicon/hikey970-drm.dtsi | 93 + .../boot/dts/hisilicon/hikey970-pinctrl.dtsi | 548 +++- .../boot/dts/hisilicon/hikey970-pmic.dtsi | 197 ++ drivers/staging/hikey9xx/Kconfig | 3 + drivers/staging/hikey9xx/Makefile | 1 + drivers/staging/hikey9xx/gpu/Kconfig | 22 + drivers/staging/hikey9xx/gpu/Makefile | 9 + drivers/staging/hikey9xx/gpu/kirin960_defs.c | 378 +++ .../staging/hikey9xx/gpu/kirin960_dpe_reg.h | 233 ++ drivers/staging/hikey9xx/gpu/kirin970_defs.c | 381 +++ .../staging/hikey9xx/gpu/kirin970_dpe_reg.h | 1188 ++++++++ drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h | 2437 +++++++++++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.c | 1178 ++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.h | 286 ++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.c | 368 +++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.h | 57 + .../staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 1063 +++++++ .../hikey9xx/gpu/kirin9xx_drm_overlay_utils.c | 1005 +++++++ .../hikey9xx/gpu/kirin9xx_dw_drm_dsi.c | 2132 ++++++++++++++ .../hikey9xx/gpu/kirin9xx_dw_dsi_reg.h | 146 + .../staging/hikey9xx/gpu/kirin9xx_fb_panel.h | 191 ++ 25 files changed, 12229 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-pmic.dtsi create mode 100644 drivers/staging/hikey9xx/gpu/Kconfig create mode 100644 drivers/staging/hikey9xx/gpu/Makefile create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_overlay_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_dsi_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h -- 2.26.2 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel 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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 3E971C433E1 for ; Wed, 19 Aug 2020 11:48:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECB0120855 for ; Wed, 19 Aug 2020 11:48:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cl9j//3a"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ic+Hs2SP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECB0120855 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+m8vniXj69lxwU+mHb01cRxkwqIoNSwUX0WXRBbky2Q=; b=cl9j//3aMJiawR9PQRyb9VqTXP 6sL3Dqi5u7l38cpV74gLOWRiezGnNbCMqL/V5IYfArh09bMc4SPXRbSBRQpqcJbEdmEaWMPvFuHHH s9emk2f5I42ejELuL9yT6KplC26lhGdN3uQUvKBAzDu4nI9SdlrB1IG6UCNp534qHhtMuejXJJ700 ClE7Y90UT/WdIh2KMYhTlZoRkLCq4ao7SUKmpGaNKR5w1NCbkOlRSCy9LTzhiO5KCiUMFr8XlTgu7 6z90HgZlcJBi/YT23AB/WjiqF3a3i+cp0FUn6xpIg/p5wzr6j2GSChJ7y00oQ+s/hP2GJWMekYsyp oXioOrOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8MXy-0003uZ-9v; Wed, 19 Aug 2020 11:46:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8MXu-0003qV-HG for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2020 11:46:24 +0000 Received: from mail.kernel.org (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E29F20885; Wed, 19 Aug 2020 11:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837581; bh=+NoH4YjX5TxAfeB92q3/7g03nc1yFW/oR0B99A6AIA8=; h=From:To:Cc:Subject:Date:From; b=Ic+Hs2SPR5TjgN0Q8ckou8MEnmbrDMOVcj2W8hjSCq0u38W2GCsoGl09f2uLpU9Al HIxIPeMTB6kZq5hWg169GVEsgyuyl159tEDpAj4/kGhH2B+yIwMzAR1ucVQJhR6B3l BerRTWVmuFQT7pZZG3nReu4CGsxfb6mXqVE8M/QU= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1k8MXq-00EuZw-R7; Wed, 19 Aug 2020 13:46:18 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Subject: [PATCH 00/49] DRM driver for Hikey 970 Date: Wed, 19 Aug 2020 13:45:28 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200819_074622_950125_83BCD066 X-CRM114-Status: GOOD ( 30.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Xinliang Liu , Wanchun Zheng , linuxarm@huawei.com, dri-devel , Andrzej Hajda , Laurent Pinchart , Sam Ravnborg , Sumit Semwal , devel@driverdev.osuosl.org, Daniel Borkmann , Mauro Carvalho Chehab , John Fastabend , Xiubin Zhang , Wei Xu , David Airlie , Xinwei Kong , Tomi Valkeinen , Bogdan Togorean , Philipp Zabel , Laurentiu Palcu , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Liwei Cai , Jesper Dangaard Brouer , Manivannan Sadhasivam , Chen Feng , Alexei Starovoitov , linaro-mm-sig@lists.linaro.org, Rob Herring , John Stultz , Jakub Kicinski , mauro.chehab@huawei.com, Rob Clark , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liuyao An , Daniel Vetter , Rongrong Zou , bpf@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series port the out-of-tree driver for Hikey 970 (which should also support Hikey 960) from the official 96boards tree: https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 Based on his history, this driver seems to be originally written for Kernel 4.4, and was later ported to Kernel 4.9. The original driver used to depend on ION (from Kernel 4.4) and had its own implementation for FB dev API. As I need to preserve the original history (with has patches from both HiSilicon and from Linaro), I'm starting from the original patch applied there. The remaining patches are incremental, and port this driver to work with upstream Kernel. This driver doesn't depend on any firmware or on any special userspace code. It works as-is with both X11 and Wayland. Yet, I'm submitting it via staging due to the following reasons: - It depends on the LDO3 power supply, which is provided by a regulator driver that it is currently on staging; - Due to legal reasons, I need to preserve the authorship of each one responsbile for each patch. So, I need to start from the original patch from Kernel 4.4; - There are still some problems I need to figure out how to solve: - The adv7535 can't get EDID data. Maybe it is a timing issue, but it requires more research to be sure about how to solve it; - The driver only accept resolutions on a defined list, as there's a known bug that this driver may have troubles with random resolutions. Probably due to a bug at the pixel clock settings; - Sometimes (at least with 1080p), it generates LDI underflow errors, which in turn causes the DRM to stop working. That happens for example when using gdm on Wayland and gnome on X11; - Probably related to the previous issue, when the monitor suspends due to DPMS, it doesn't return back to life. So, IMO, the best is to keep it on staging for a while, until those remaining bugs gets solved. I added this series, together with the regulator driver and a few other patches (including a hack to fix a Kernel 5.8 regression at WiFi ) at: https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master Chen Feng (1): staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 John Stultz (1): staging: hikey9xx/gpu: port it to work with Kernel v4.9 Liwei Cai (2): staging: hikey9xx/gpu: solve tearing issue of display staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab (38): staging: hikey9xx/gpu: get rid of adv7535 fork staging: hikey9xx/gpu: rename the Kirin9xx namespace staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c staging: hikey9xx/gpu: get rid of some ifdefs staging: hikey9xx/gpu: rename the config option for Kirin970 staging: hikey9xx/gpu: change the includes to reflect upstream staging: hikey9xx/gpu: port driver to upstream kAPIs staging: hikey9xx/gpu: add a copy of set_reg() function there staging: hikey9xx/gpu: get rid of ION headers staging: hikey9xx/gpu: add support for using a reserved CMA memory staging: hikey9xx/gpu: cleanup encoder attach logic staging: hikey9xx/gpu: Change the logic which sets the burst mode staging: hikey9xx/gpu: fix the DRM setting logic staging: hikey9xx/gpu: do some code cleanups staging: hikey9xx/gpu: use default GEM_CMA fops staging: hikey9xx/gpu: place vblank enable/disable at the right place staging: hikey9xx/gpu: remove an uneeded hack staging: hikey9xx/gpu: add a possible implementation for atomic_disable staging: hikey9xx/gpu: register connector staging: hikey9xx/gpu: fix driver name staging: hikey9xx/gpu: get rid of iommu_format staging: hikey9xx/gpu: re-work the mode validation code staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator staging: hikey9xx/gpu: add SPMI headers staging: hikey9xx/gpu: solve most coding style issues staging: hikey9xx/gpu: don't use iommu code staging: hikey9xx/gpu: add kirin9xx driver to the building system staging: hikey9xx/gpu: get rid of typedefs staging: hikey9xx/gpu: get rid of input/output macros staging: hikey9xx/gpu: get rid of some unused data staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 dts: hisilicon: hi3670.dtsi: add I2C settings dts: hikey970-pinctrl.dtsi: add missing pinctrl settings dt: hisilicon: add support for the PMIC found on Hikey 970 dts: add support for Hikey 970 DRM staging: hikey9xx/gpu: drop kirin9xx_pwm dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Xiubin Zhang (7): staging: hikey9xx/gpu: add support to hikey970 HDMI and panel staging: hikey9xx/gpu: Solve SR Cannot Display Problems. staging: hikey9xx/gpu: Solve HDMI compatibility Problem. staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970. staging: hikey9xx/gpu: Solve SR test reset problem for hikey970. staging: hikey9xx/gpu: add debug prints for this driver staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays. .../display/hisilicon,hi3660-dpe.yaml | 99 + .../display/hisilicon,hi3660-dsi.yaml | 102 + .../boot/dts/hisilicon/hi3670-hikey970.dts | 56 +- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 77 + .../boot/dts/hisilicon/hikey970-drm.dtsi | 93 + .../boot/dts/hisilicon/hikey970-pinctrl.dtsi | 548 +++- .../boot/dts/hisilicon/hikey970-pmic.dtsi | 197 ++ drivers/staging/hikey9xx/Kconfig | 3 + drivers/staging/hikey9xx/Makefile | 1 + drivers/staging/hikey9xx/gpu/Kconfig | 22 + drivers/staging/hikey9xx/gpu/Makefile | 9 + drivers/staging/hikey9xx/gpu/kirin960_defs.c | 378 +++ .../staging/hikey9xx/gpu/kirin960_dpe_reg.h | 233 ++ drivers/staging/hikey9xx/gpu/kirin970_defs.c | 381 +++ .../staging/hikey9xx/gpu/kirin970_dpe_reg.h | 1188 ++++++++ drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h | 2437 +++++++++++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.c | 1178 ++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.h | 286 ++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.c | 368 +++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.h | 57 + .../staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 1063 +++++++ .../hikey9xx/gpu/kirin9xx_drm_overlay_utils.c | 1005 +++++++ .../hikey9xx/gpu/kirin9xx_dw_drm_dsi.c | 2132 ++++++++++++++ .../hikey9xx/gpu/kirin9xx_dw_dsi_reg.h | 146 + .../staging/hikey9xx/gpu/kirin9xx_fb_panel.h | 191 ++ 25 files changed, 12229 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-pmic.dtsi create mode 100644 drivers/staging/hikey9xx/gpu/Kconfig create mode 100644 drivers/staging/hikey9xx/gpu/Makefile create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_overlay_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_dsi_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 610A1C433E3 for ; Wed, 19 Aug 2020 11:46:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3965722DA9 for ; Wed, 19 Aug 2020 11:46:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ic+Hs2SP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3965722DA9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF88F6E241; Wed, 19 Aug 2020 11:46:29 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1656589C19 for ; Wed, 19 Aug 2020 11:46:22 +0000 (UTC) Received: from mail.kernel.org (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E29F20885; Wed, 19 Aug 2020 11:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837581; bh=+NoH4YjX5TxAfeB92q3/7g03nc1yFW/oR0B99A6AIA8=; h=From:To:Cc:Subject:Date:From; b=Ic+Hs2SPR5TjgN0Q8ckou8MEnmbrDMOVcj2W8hjSCq0u38W2GCsoGl09f2uLpU9Al HIxIPeMTB6kZq5hWg169GVEsgyuyl159tEDpAj4/kGhH2B+yIwMzAR1ucVQJhR6B3l BerRTWVmuFQT7pZZG3nReu4CGsxfb6mXqVE8M/QU= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1k8MXq-00EuZw-R7; Wed, 19 Aug 2020 13:46:18 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Subject: [PATCH 00/49] DRM driver for Hikey 970 Date: Wed, 19 Aug 2020 13:45:28 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Xinliang Liu , Wanchun Zheng , linuxarm@huawei.com, dri-devel , Andrzej Hajda , Laurent Pinchart , Sam Ravnborg , devel@driverdev.osuosl.org, Daniel Borkmann , Mauro Carvalho Chehab , John Fastabend , Xiubin Zhang , Wei Xu , David Airlie , Xinwei Kong , Tomi Valkeinen , Bogdan Togorean , Laurentiu Palcu , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Liwei Cai , Jesper Dangaard Brouer , Manivannan Sadhasivam , Chen Feng , Alexei Starovoitov , linaro-mm-sig@lists.linaro.org, Rob Herring , Jakub Kicinski , mauro.chehab@huawei.com, Rob Clark , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Liuyao An , Rongrong Zou , bpf@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch series port the out-of-tree driver for Hikey 970 (which should also support Hikey 960) from the official 96boards tree: https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 Based on his history, this driver seems to be originally written for Kernel 4.4, and was later ported to Kernel 4.9. The original driver used to depend on ION (from Kernel 4.4) and had its own implementation for FB dev API. As I need to preserve the original history (with has patches from both HiSilicon and from Linaro), I'm starting from the original patch applied there. The remaining patches are incremental, and port this driver to work with upstream Kernel. This driver doesn't depend on any firmware or on any special userspace code. It works as-is with both X11 and Wayland. Yet, I'm submitting it via staging due to the following reasons: - It depends on the LDO3 power supply, which is provided by a regulator driver that it is currently on staging; - Due to legal reasons, I need to preserve the authorship of each one responsbile for each patch. So, I need to start from the original patch from Kernel 4.4; - There are still some problems I need to figure out how to solve: - The adv7535 can't get EDID data. Maybe it is a timing issue, but it requires more research to be sure about how to solve it; - The driver only accept resolutions on a defined list, as there's a known bug that this driver may have troubles with random resolutions. Probably due to a bug at the pixel clock settings; - Sometimes (at least with 1080p), it generates LDI underflow errors, which in turn causes the DRM to stop working. That happens for example when using gdm on Wayland and gnome on X11; - Probably related to the previous issue, when the monitor suspends due to DPMS, it doesn't return back to life. So, IMO, the best is to keep it on staging for a while, until those remaining bugs gets solved. I added this series, together with the regulator driver and a few other patches (including a hack to fix a Kernel 5.8 regression at WiFi ) at: https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master Chen Feng (1): staging: hikey9xx: Add hisilicon DRM driver for hikey960/970 John Stultz (1): staging: hikey9xx/gpu: port it to work with Kernel v4.9 Liwei Cai (2): staging: hikey9xx/gpu: solve tearing issue of display staging: hikey9xx/gpu: resolve the performance issue by interrupt mechanism Mauro Carvalho Chehab (38): staging: hikey9xx/gpu: get rid of adv7535 fork staging: hikey9xx/gpu: rename the Kirin9xx namespace staging: hikey9xx/gpu: get rid of kirin9xx_fbdev.c staging: hikey9xx/gpu: get rid of some ifdefs staging: hikey9xx/gpu: rename the config option for Kirin970 staging: hikey9xx/gpu: change the includes to reflect upstream staging: hikey9xx/gpu: port driver to upstream kAPIs staging: hikey9xx/gpu: add a copy of set_reg() function there staging: hikey9xx/gpu: get rid of ION headers staging: hikey9xx/gpu: add support for using a reserved CMA memory staging: hikey9xx/gpu: cleanup encoder attach logic staging: hikey9xx/gpu: Change the logic which sets the burst mode staging: hikey9xx/gpu: fix the DRM setting logic staging: hikey9xx/gpu: do some code cleanups staging: hikey9xx/gpu: use default GEM_CMA fops staging: hikey9xx/gpu: place vblank enable/disable at the right place staging: hikey9xx/gpu: remove an uneeded hack staging: hikey9xx/gpu: add a possible implementation for atomic_disable staging: hikey9xx/gpu: register connector staging: hikey9xx/gpu: fix driver name staging: hikey9xx/gpu: get rid of iommu_format staging: hikey9xx/gpu: re-work the mode validation code staging: hikey9xx/gpu: add support for enable/disable ldo3 regulator staging: hikey9xx/gpu: add SPMI headers staging: hikey9xx/gpu: solve most coding style issues staging: hikey9xx/gpu: don't use iommu code staging: hikey9xx/gpu: add kirin9xx driver to the building system staging: hikey9xx/gpu: get rid of typedefs staging: hikey9xx/gpu: get rid of input/output macros staging: hikey9xx/gpu: get rid of some unused data staging: hikey9xx/gpu: place common definitions at kirin9xx_dpe.h staging: hikey9xx/gpu: get rid of DRM_HISI_KIRIN970 dts: hisilicon: hi3670.dtsi: add I2C settings dts: hikey970-pinctrl.dtsi: add missing pinctrl settings dt: hisilicon: add support for the PMIC found on Hikey 970 dts: add support for Hikey 970 DRM staging: hikey9xx/gpu: drop kirin9xx_pwm dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Xiubin Zhang (7): staging: hikey9xx/gpu: add support to hikey970 HDMI and panel staging: hikey9xx/gpu: Solve SR Cannot Display Problems. staging: hikey9xx/gpu: Solve HDMI compatibility Problem. staging: hikey9xx/gpu: Support MIPI DSI 3 lanes for hikey970. staging: hikey9xx/gpu: Solve SR test reset problem for hikey970. staging: hikey9xx/gpu: add debug prints for this driver staging: hikey9xx/gpu: Add support 10.1 inch special HDMI displays. .../display/hisilicon,hi3660-dpe.yaml | 99 + .../display/hisilicon,hi3660-dsi.yaml | 102 + .../boot/dts/hisilicon/hi3670-hikey970.dts | 56 +- arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 77 + .../boot/dts/hisilicon/hikey970-drm.dtsi | 93 + .../boot/dts/hisilicon/hikey970-pinctrl.dtsi | 548 +++- .../boot/dts/hisilicon/hikey970-pmic.dtsi | 197 ++ drivers/staging/hikey9xx/Kconfig | 3 + drivers/staging/hikey9xx/Makefile | 1 + drivers/staging/hikey9xx/gpu/Kconfig | 22 + drivers/staging/hikey9xx/gpu/Makefile | 9 + drivers/staging/hikey9xx/gpu/kirin960_defs.c | 378 +++ .../staging/hikey9xx/gpu/kirin960_dpe_reg.h | 233 ++ drivers/staging/hikey9xx/gpu/kirin970_defs.c | 381 +++ .../staging/hikey9xx/gpu/kirin970_dpe_reg.h | 1188 ++++++++ drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h | 2437 +++++++++++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.c | 1178 ++++++++ .../hikey9xx/gpu/kirin9xx_drm_dpe_utils.h | 286 ++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.c | 368 +++ .../staging/hikey9xx/gpu/kirin9xx_drm_drv.h | 57 + .../staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 1063 +++++++ .../hikey9xx/gpu/kirin9xx_drm_overlay_utils.c | 1005 +++++++ .../hikey9xx/gpu/kirin9xx_dw_drm_dsi.c | 2132 ++++++++++++++ .../hikey9xx/gpu/kirin9xx_dw_dsi_reg.h | 146 + .../staging/hikey9xx/gpu/kirin9xx_fb_panel.h | 191 ++ 25 files changed, 12229 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi create mode 100644 arch/arm64/boot/dts/hisilicon/hikey970-pmic.dtsi create mode 100644 drivers/staging/hikey9xx/gpu/Kconfig create mode 100644 drivers/staging/hikey9xx/gpu/Makefile create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin960_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_defs.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin970_dpe_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dpe.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dpe_utils.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_drv.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_drm_overlay_utils.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_drm_dsi.c create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_dw_dsi_reg.h create mode 100644 drivers/staging/hikey9xx/gpu/kirin9xx_fb_panel.h -- 2.26.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel