Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753680AbbLGHxD (ORCPT ); Mon, 7 Dec 2015 02:53:03 -0500 Received: from lucky1.263xmail.com ([211.157.147.130]:58144 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbbLGHw6 (ORCPT ); Mon, 7 Dec 2015 02:52:58 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: inki.dae@samsung.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <6e547b6ae90e8f8710e4f677de9bbe54> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Yakir Yang To: Inki Dae , Mark Yao , Jingoo Han , Heiko Stuebner Cc: Thierry Reding , Krzysztof Kozlowski , Rob Herring , Andrzej Hajda , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Russell King , emil.l.velikov@gmail.com, Gustavo Padovan , Kishon Vijay Abraham I , ajaynumb@gmail.com, javier@osg.samsung.com, Andy Yan , Yakir Yang , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v11 01/17] drm: bridge: analogix/dp: split exynos dp driver to bridge directory Date: Mon, 7 Dec 2015 15:52:40 +0800 Message-Id: <1449474760-11434-1-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449470239-30667-1-git-send-email-ykk@rock-chips.com> References: <1449470239-30667-1-git-send-email-ykk@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 170524 Lines: 5770 Split the dp core driver from exynos directory to bridge directory, and rename the core driver to analogix_dp_*, rename the platform code to exynos_dp. Beside the new analogix_dp driver would export six hooks. "analogix_dp_bind()" and "analogix_dp_unbind()" "analogix_dp_suspned()" and "analogix_dp_resume()" "analogix_dp_detect()" and "analogix_dp_get_modes()" The bind/unbind symbols is used for analogix platform driver to connect with analogix_dp core driver. And the detect/get_modes is used for analogix platform driver to init the connector. They reason why connector need register in helper driver is rockchip drm haven't implement the atomic API, but Exynos drm have implement it, so there would need two different connector helper functions, that's why we leave the connector register in helper driver. Signed-off-by: Yakir Yang Tested-by: Javier Martinez Canillas --- Changes in v11: - Fix compiled error in analogix_dp_unbind() Changes in v10: None Changes in v9: None Changes in v8: None Changes in v7: None Changes in v6: - Fix the Kconfig recursive dependency (Javier) Changes in v5: - Correct the check condition of gpio_is_valid when driver try to get the "hpd-gpios" DT propery. (Heiko) - Move the platform attach callback in the front of core driver bridge attch function. Cause once platform failed at attach, core driver should still failed, so no need to init connector before platform attached (Krzysztof) - Keep code style no changes with the previous exynos_dp_code.c in this patch, and update commit message about the new export symbol (Krzysztof) - Gather the device type patch (v4 11/16) into this one. (Krzysztof) - leave out the connector registration to analogix platform driver. (Thierry) Changes in v4: - Update "analogix,hpd-gpios" to "hpd-gpios" DT propery. (Rob) - Rename "analogix_dp-exynos.c" file name to "exynos_dp.c" (Jingoo) - Create a separate folder for analogix code in bridge/ (Archit) Changes in v3: - Move exynos's video_timing code to analogix_dp-exynos platform driver, add get_modes method to struct analogix_dp_plat_data. (Thierry) - Rename some "samsung*" dts propery to "analogix*". (Heiko) Changes in v2: - Remove new copyright (Jingoo) - Fix compiled failed due to analogix_dp_device misspell drivers/gpu/drm/bridge/Kconfig | 2 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/analogix/Kconfig | 3 + drivers/gpu/drm/bridge/analogix/Makefile | 1 + .../analogix/analogix_dp_core.c} | 799 +++++-------- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 277 +++++ drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 1263 ++++++++++++++++++++ .../analogix/analogix_dp_reg.h} | 258 ++-- drivers/gpu/drm/exynos/Kconfig | 3 +- drivers/gpu/drm/exynos/Makefile | 2 +- drivers/gpu/drm/exynos/exynos_dp.c | 384 ++++++ drivers/gpu/drm/exynos/exynos_dp_core.h | 282 ----- drivers/gpu/drm/exynos/exynos_dp_reg.c | 1263 -------------------- include/drm/bridge/analogix_dp.h | 41 + 14 files changed, 2399 insertions(+), 2180 deletions(-) create mode 100644 drivers/gpu/drm/bridge/analogix/Kconfig create mode 100644 drivers/gpu/drm/bridge/analogix/Makefile rename drivers/gpu/drm/{exynos/exynos_dp_core.c => bridge/analogix/analogix_dp_core.c} (50%) create mode 100644 drivers/gpu/drm/bridge/analogix/analogix_dp_core.h create mode 100644 drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c rename drivers/gpu/drm/{exynos/exynos_dp_reg.h => bridge/analogix/analogix_dp_reg.h} (64%) create mode 100644 drivers/gpu/drm/exynos/exynos_dp.c delete mode 100644 drivers/gpu/drm/exynos/exynos_dp_core.h delete mode 100644 drivers/gpu/drm/exynos/exynos_dp_reg.c create mode 100644 include/drm/bridge/analogix_dp.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 27e2022..efd94e0 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -40,4 +40,6 @@ config DRM_PARADE_PS8622 ---help--- Parade eDP-LVDS bridge chip driver. +source "drivers/gpu/drm/bridge/analogix/Kconfig" + endmenu diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index f13c33d..ff821f4 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_DRM_DW_HDMI) += dw-hdmi.o obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw-hdmi-ahb-audio.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o +obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig new file mode 100644 index 0000000..80f286f --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/Kconfig @@ -0,0 +1,3 @@ +config DRM_ANALOGIX_DP + tristate + depends on DRM diff --git a/drivers/gpu/drm/bridge/analogix/Makefile b/drivers/gpu/drm/bridge/analogix/Makefile new file mode 100644 index 0000000..9107b86 --- /dev/null +++ b/drivers/gpu/drm/bridge/analogix/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp_core.o analogix_dp_reg.o diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c similarity index 50% rename from drivers/gpu/drm/exynos/exynos_dp_core.c rename to drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index aee3262..cd86413 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1,14 +1,14 @@ /* - * Samsung SoC DP (Display Port) interface driver. - * - * Copyright (C) 2012 Samsung Electronics Co., Ltd. - * Author: Jingoo Han - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ +* Analogix DP (Display Port) core interface driver. +* +* Copyright (C) 2012 Samsung Electronics Co., Ltd. +* Author: Jingoo Han +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ #include #include @@ -18,65 +18,48 @@ #include #include #include -#include #include #include #include -#include