Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbaLDKEA (ORCPT ); Thu, 4 Dec 2014 05:04:00 -0500 Received: from lucky1.263xmail.com ([211.157.147.132]:47077 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753072AbaLDKD5 (ORCPT ); Thu, 4 Dec 2014 05:03:57 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: airlied@linux.ie X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: <27b429c6498b1d462d6f55d72eae4b78> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Andy Yan To: airlied@linux.ie, Philipp Zabel , heiko@sntech.de, fabio.estevam@freescale.com, rmk+kernel@arm.linux.org.uk Cc: Greg Kroah-Hartman , Grant Likely , Rob Herring , Shawn Guo , Josh Boyer , Sean Paul , Inki Dae , Dave Airlie , Arnd Bergmann , Lucas Stach , Zubair.Kakakhel@imgtec.com, djkurtz@google.com, ykk@rock-chips.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, jay.xu@rock-chips.com, Pawel Moll , mark.yao@rock-chips.com, Mark Rutland , Ian Campbell , Kumar Gala , vladimir_zapolskiy@mentor.com, Andy Yan Subject: [PATCH v17 03/12] drm: imx: imx-hdmi: convert imx-hdmi to drm_bridge mode Date: Thu, 4 Dec 2014 18:03:26 +0800 Message-Id: <1417687406-13062-1-git-send-email-andy.yan@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417686826-12687-1-git-send-email-andy.yan@rock-chips.com> References: <1417686826-12687-1-git-send-email-andy.yan@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IMX6 and Rockchip RK3288 and JZ4780 (Ingenic Xburst/MIPS) use the interface compatible Designware HDMI IP, but they also have some lightly differences, such as phy pll configuration, register width, 4K support, clk useage, and the crtc mux configuration is also platform specific. To reuse the imx hdmi driver, convert it to drm_bridge handle encoder in imx-hdmi_pltfm.c, as most of the encoder operation are platform specific such as crtc select and panel format set This patch depends on Russell King's patch: drm: imx: convert imx-drm to use the generic DRM OF helper http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2014-July/053484.html Signed-off-by: Andy Yan Signed-off-by: Yakir Yang --- Changes in v17: - remove platform device stuff, adviced by Russell King Changes in v16: - use the common binding for the clocks Changes in v15: None Changes in v14: - add defer probing, adviced by Philipp Zabel Changes in v13: - split platform specific phy configuration Changes in v12: - squash patch Changes in v11: - squash patch Changes in v10: - split generic dw_hdmi.c improvements from patch#11 (add rk3288 support) Changes in v9: None Changes in v8: None Changes in v7: - remove unused variables from structure dw_hdmi - remove a wrong modification - add copyrights for dw_hdmi-imx.c Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None drivers/gpu/drm/imx/Makefile | 2 +- drivers/gpu/drm/imx/imx-hdmi.c | 257 +++++++++++++---------------------- drivers/gpu/drm/imx/imx-hdmi.h | 15 ++ drivers/gpu/drm/imx/imx-hdmi_pltfm.c | 204 +++++++++++++++++++++++++++ 4 files changed, 316 insertions(+), 162 deletions(-) create mode 100644 drivers/gpu/drm/imx/imx-hdmi_pltfm.c diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile index 582c438..63cf56a 100644 --- a/drivers/gpu/drm/imx/Makefile +++ b/drivers/gpu/drm/imx/Makefile @@ -9,4 +9,4 @@ obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o -obj-$(CONFIG_DRM_IMX_HDMI) += imx-hdmi.o +obj-$(CONFIG_DRM_IMX_HDMI) += imx-hdmi.o imx-hdmi_pltfm.o diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c index 7a54d20..3ea9726 100644 --- a/drivers/gpu/drm/imx/imx-hdmi.c +++ b/drivers/gpu/drm/imx/imx-hdmi.c @@ -12,25 +12,20 @@ * Copyright (C) 2010, Guennadi Liakhovetski */ -#include #include #include #include #include #include -#include -#include -#include #include +#include #include #include #include #include -#include