Move Mediatek HDMI PHY driver from DRM folder to PHY folder
Subsystems (5)
Chun-Kuang Hu
maintainerv3 cover Move Mediatek HDMI PHY driver from DRM folder to PHY folder
mtk_hdmi_phy is currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so move mtk_hdmi_phy driver into phy driver folder.
Changes in v3:
- Modify [PATCH v2 3/4] prefix.
Changes in v2:
- include module.h in mtk_hdmi.c
CK Hu (3):
drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver drm/mediatek: Separate mtk_hdmi_phy to an independent module
phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek
folder
Chun-Kuang Hu (1):
MAINTAINERS: add files for Mediatek DRM drivers
MAINTAINERS | 1 +
drivers/gpu/drm/mediatek/Kconfig | 2 +-
drivers/gpu/drm/mediatek/Makefile | 5 +---
drivers/gpu/drm/mediatek/mtk_hdmi.c | 24 +++++++++++++++----
drivers/gpu/drm/mediatek/mtk_hdmi.h | 1 -
drivers/phy/mediatek/Kconfig | 7 ++++++
drivers/phy/mediatek/Makefile | 7 ++++++
.../mediatek/phy-mtk-hdmi-mt2701.c} | 3 +--
.../mediatek/phy-mtk-hdmi-mt8173.c} | 2 +-
.../mediatek/phy-mtk-hdmi.c} | 3 ++-
.../mediatek/phy-mtk-hdmi.h} | 2 --
11 files changed, 41 insertions(+), 16 deletions(-)
rename drivers/{gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt2701.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt8173.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} (98%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} (95%)Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Chun-Kuang Hu
maintainerPATCH v3 1/4 drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
From: CK Hu <[email protected]>
tz_disabled is used to control mtk_hdmi output signal, but this variable is stored in mtk_hdmi_phy and mtk_hdmi_phy does not use it. So move tz_disabled to mtk_hdmi where it's used.
--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)
drivers/gpu/drm/mediatek/mtk_hdmi.c +19 -3
@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;
@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI
@@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );
@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)
@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume); +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173; +static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173, + }, {} };
drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0 -1
@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0 -1
@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
Quoted 98 lines · Chun-Kuang Hu
From: CK Hu <[email protected]>
tz_disabledis used to controlmtk_hdmioutput signal, but this variable is stored inmtk_hdmi_phyandmtk_hdmi_phydoes not use it. So movetz_disabledtomtk_hdmiwhere it's used.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/mediatek/mtk_hdmi.c +19
-3@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume); +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173; +static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173, + }, {} };drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-1@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-0
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) · line 242
Quoted 7 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-1@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,
Matthias Brugger
maintainerRe: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
Quoted 42 lines · Chunfeng Yun
Quoted 41 lines · Chun-Kuang Hu
From: CK Hu <[email protected]>
tz_disabledis used to controlmtk_hdmioutput signal, but this variable is stored inmtk_hdmi_phyandmtk_hdmi_phydoes not use it. So movetz_disabledtomtk_hdmiwhere it's used.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-1@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) · line 245
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-1/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)
Wouldn't we need to check:
if (hdmi->conf && hdmi->conf->tz_disabled)
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume);
Quoted 13 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static int mtk_hdmi_resume(struct device *dev) · line 1784
Quoted 13 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +11
-1+static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173; +static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173,
We don't have any data? Then we should set data to NULL instead.
Regards,
Matthias
Quoted 23 lines
Quoted 23 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0+ }, {} };drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-1@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-0@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) · line 242
Quoted 5 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-1struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,Reviewed-by Chunfeng Yun <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Chun-Kuang Hu
maintainerRe: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
Hi, Matthias:
Matthias Brugger <[email protected]> 於 2020年4月1日 週三 下午11:53寫道:
Quoted 46 lines · Chunfeng Yun
Quoted 42 lines · Chun-Kuang Hu
Quoted 41 lines
From: CK Hu <[email protected]>
tz_disabledis used to controlmtk_hdmioutput signal, but this variable is stored inmtk_hdmi_phyandmtk_hdmi_phydoes not use it. So movetz_disabledtomtk_hdmiwhere it's used.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-1@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);
Quoted 11 lines
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) · line 245
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-1/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)Wouldn't we need to check:
if (hdmi->conf&&hdmi->conf->tz_disabled)
My design is: hdmi->conf would not be NULL.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume);
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-0+static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173;Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static int mtk_hdmi_resume(struct device *dev) · line 1784
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +6
-1+static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173,We don't have any data? Then we should set data to NULL instead.
My design is data would not be NULL, so I need not to check whether it is NULL in driver.
Regards,
CK
Quoted 35 lines
Regards,
MatthiasQuoted 31 lines
Quoted 21 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0+ }, {} };drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-1@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-0drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) · line 242
Quoted 7 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-1@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,Reviewed-by Chunfeng Yun <[email protected]>
Chunfeng Yun
maintainerRe: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
Quoted 95 lines · Chun-Kuang Hu
Hi, Matthias:
Matthias Brugger <[email protected]> 於 2020年4月1日 週三 下午11:53寫道:
Quoted 46 lines · Chunfeng Yun
Quoted 42 lines · Chun-Kuang Hu
Quoted 41 lines
From: CK Hu <[email protected]>
tz_disabledis used to controlmtk_hdmioutput signal, but this variable is stored inmtk_hdmi_phyandmtk_hdmi_phydoes not use it. So movetz_disabledtomtk_hdmiwhere it's used.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-1@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);Quoted 11 lines
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) · line 245
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-1/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)Wouldn't we need to check:
if (hdmi->conf&&hdmi->conf->tz_disabled)My design is:
hdmi->confwould not be NULL.Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume);Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-0+static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173;Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static int mtk_hdmi_resume(struct device *dev) · line 1784
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +6
-1+static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173,We don't have any data? Then we should set data to NULL instead.
Quoted 2 lines
My design is data would not be NULL, so I need not to check whether it is NULL in driver.
But we don't need .data for mt8173, it's better to set it to NULL.
Quoted 39 lines
Regards,
CKQuoted 35 lines
Regards,
MatthiasQuoted 31 lines
Quoted 21 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0+ }, {} };drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-1@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-0drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) · line 242
Quoted 7 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-1@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,Reviewed-by Chunfeng Yun <[email protected]>
Chun-Kuang Hu
maintainerRe: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver
Chunfeng Yun <[email protected]> 於 2020年4月3日 週五 上午10:59寫道:
Quoted 97 lines · Chun-Kuang Hu
Quoted 95 lines
Hi, Matthias:
Matthias Brugger <[email protected]> 於 2020年4月1日 週三 下午11:53寫道:
Quoted 46 lines · Chunfeng Yun
Quoted 42 lines · Chun-Kuang Hu
Quoted 41 lines
From: CK Hu <[email protected]>
tz_disabledis used to controlmtk_hdmioutput signal, but this variable is stored inmtk_hdmi_phyandmtk_hdmi_phydoes not use it. So movetz_disabledtomtk_hdmiwhere it's used.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-)drivers/gpu/drm/mediatek/mtk_hdmi.c +5
-1@@ -144,11 +144,16 @@ struct hdmi_audio_param {struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { +bool tz_disabled; +}; +struct mtk_hdmi {struct drm_bridge bridge;struct drm_bridge *next_bridge;struct drm_connector conn;struct device *dev; +const struct mtk_hdmi_conf *conf;struct phy *phy;struct device *cec_dev;struct i2c_adapter *ddc_adpt;@@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black)static void mtk_hdmi_hw_make_reg_writable (struct mtk_hdmi *hdmi,bool enable) {struct arm_smccc_res res; -struct mtk_hdmi_phy *hdmi_phy =phy_get_drvdata (hdmi->phy);Quoted 11 lines
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) · line 245
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-1/* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable)* The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ -if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) +if (hdmi->conf->tz_disabled)Wouldn't we need to check:
if (hdmi->conf&&hdmi->conf->tz_disabled)My design is:
hdmi->confwould not be NULL.Quoted 31 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0regmap_update_bits (hdmi->sys_regmap, hdmi->sys_offset +HDMI_SYS_CFG20 ,0x80008005 , enable ?0x80000005 :0x8000 );@@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev)return -ENOMEM ; hdmi->dev = dev; + hdmi->conf =of_device_get_match_data (dev); ret =mtk_hdmi_dt_parse_pdata (hdmi, pdev);if (ret)@@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume);Quoted 13 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c static int mtk_hdmi_resume(struct device *dev) · line 1784
Quoted 13 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +11
-1+static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173; +static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible ="mediatek,mt8173-hdmi" , }, + { .compatible ="mediatek,mt2701-hdmi" , + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible ="mediatek,mt8173-hdmi" , + .data = &mtk_hdmi_conf_mt8173,We don't have any data? Then we should set data to NULL instead.
Quoted 3 lines
Quoted 2 lines
My design is data would not be NULL, so I need not to check whether it is NULL in driver.
But we don't need .data for mt8173, it's better to set it to NULL.
OK, in the view of reducing the code size, setting it to NULL would make code size smaller.
I would modify this in next version.
Regards,
Chun-Kuang.
Quoted 32 lines
Quoted 32 lines
Regards,
CKQuoted 27 lines
Regards,
MatthiasQuoted 23 lines
Quoted 23 lines
drivers/gpu/drm/mediatek/mtk_hdmi.c +1
-0+ }, {} };drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-1@@ -20,7 +20,6 @@struct mtk_hdmi_phy ;struct mtk_hdmi_phy_conf { -bool tz_disabled;unsigned long flags;const struct clk_ops *hdmi_phy_clk_ops;void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy);drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-0@@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) }
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) · line 242
Quoted 5 lines
drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +0
-1struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags =CLK_SET_RATE_GATE , .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds,Reviewed-by Chunfeng Yun <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Chun-Kuang Hu
maintainerPATCH v3 2/4 drm/mediatek: Separate mtk_hdmi_phy to an independent module
In reply to Chun-Kuang HuFrom: CK Hu <[email protected]>
mtk_hdmi_phy is a part of mtk_hdmi module, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module.
--- drivers/gpu/drm/mediatek/Kconfig | 9 ++++++++- drivers/gpu/drm/mediatek/Makefile | 11 +++++++---- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi.h | 1 - drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 1 + drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - 6 files changed, 17 insertions(+), 8 deletions(-)
drivers/gpu/drm/mediatek/Kconfig +8 -1
@@ -23,6 +23,13 @@ config DRM_MEDIATEK_HDMI tristate "DRM HDMI Support for Mediatek SoCs" depends on DRM_MEDIATEK select SND_SOC_HDMI_CODEC if SND_SOC - select GENERIC_PHY + select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs + +config PHY_MTK_HDMI + tristate "MediaTek HDMI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Enable this to support HDMI-PHY
drivers/gpu/drm/mediatek/Makefile +7 -4
@@ -19,9 +19,12 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi.o \ - mtk_hdmi_ddc.o \ - mtk_mt2701_hdmi_phy.o \ - mtk_mt8173_hdmi_phy.o \ - mtk_hdmi_phy.o + mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o + +phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ + mtk_mt2701_hdmi_phy.o \ + mtk_mt8173_hdmi_phy.o + +obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o
drivers/gpu/drm/mediatek/mtk_hdmi.c +1 -1
@@ -12,6 +12,7 @@#include <linux/io.h> #include <linux/kernel.h> #include <linux/mfd/syscon.h> +#include <linux/module.h> #include <linux/of_platform.h> #include <linux/of.h> #include <linux/of_gpio.h>
@@ -1797,7 +1798,6 @@ static struct platform_driver mtk_hdmi_driver = { };static struct platform_driver *const mtk_hdmi_drivers[] = { - &mtk_hdmi_phy_driver, &mtk_hdmi_ddc_driver, &mtk_cec_driver, &mtk_hdmi_driver,
drivers/gpu/drm/mediatek/mtk_hdmi.h +0 -1
@@ -5,7 +5,6 @@*/ #ifndef _MTK_HDMI_CTRL_H#define _MTK_HDMI_CTRL_H -#include "mtk_hdmi_phy.h" struct platform_driver ;
drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +1 -0
@@ -205,6 +205,7 @@ struct platform_driver mtk_hdmi_phy_driver = { .of_match_table = mtk_hdmi_phy_match, }, }; +module_platform_driver (mtk_hdmi_phy_driver);MODULE_DESCRIPTION ("MediaTek HDMI PHY Driver" );MODULE_LICENSE ("GPL v2" );
drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0 -1
@@ -49,7 +49,6 @@ void mtk_hdmi_phy_mask(struct mtk_hdmi_phy *hdmi_phy, u32 offset, u32 val, u32 mask);struct mtk_hdmi_phy *to_mtk_hdmi_phy (struct clk_hw *hw); -extern struct platform_driver mtk_hdmi_phy_driver;extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf;extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf;
Signature · 1 line
2.17.1
Re: [PATCH v3 2/4] drm/mediatek: Separate mtk_hdmi_phy to an independent module
Quoted 8 lines · Chun-Kuang Hu
From: CK Hu <[email protected]>
mtk_hdmi_phyis a part ofmtk_hdmimodule, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>
Quoted 8 lines
--- drivers/gpu/drm/mediatek/Kconfig | 9 ++++++++- drivers/gpu/drm/mediatek/Makefile | 11 +++++++---- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi.h | 1 - drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 1 + drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - 6 files changed, 17 insertions(+), 8 deletions(-)
Thanks a lot
Chun-Kuang Hu
maintainerPATCH v3 3/4 phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder
In reply to Chun-Kuang HuFrom: CK Hu <[email protected]>
mtk_hdmi_phy is currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so move mtk_hdmi_phy driver into phy driver folder.
---
drivers/gpu/drm/mediatek/Kconfig | 7 -------
drivers/gpu/drm/mediatek/Makefile | 6 ------
drivers/phy/mediatek/Kconfig | 7 +++++++
drivers/phy/mediatek/Makefile | 7 +++++++
.../mediatek/phy-mtk-hdmi-mt2701.c} | 2 +-
.../mediatek/phy-mtk-hdmi-mt8173.c} | 2 +-
.../mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} | 2 +-
.../mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} | 0
8 files changed, 17 insertions(+), 16 deletions(-)
rename drivers/{gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt2701.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt8173.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} (100%)drivers/gpu/drm/mediatek/Kconfig +0 -7
@@ -26,10 +26,3 @@ config DRM_MEDIATEK_HDMI select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs - -config PHY_MTK_HDMI - tristate "MediaTek HDMI-PHY Driver" - depends on ARCH_MEDIATEK && OF - select GENERIC_PHY - help - Enable this to support HDMI-PHY
drivers/gpu/drm/mediatek/Makefile +0 -6
@@ -22,9 +22,3 @@ mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o - -phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ - mtk_mt2701_hdmi_phy.o \ - mtk_mt8173_hdmi_phy.o - -obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o
drivers/phy/mediatek/Kconfig +7 -0
@@ -35,3 +35,10 @@ config PHY_MTK_XSPHY Enable this to support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 controllers on MediaTek chips. The driver supports multiple USB2.0, USB3.1 GEN2 ports. + +config PHY_MTK_HDMI + tristate "MediaTek HDMI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Enable this to support HDMI-PHY
drivers/phy/mediatek/Makefile +7 -0
@@ -6,3 +6,10 @@ obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o obj-$(CONFIG_PHY_MTK_UFS) += phy-mtk-ufs.o obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o + +phy-mtk-hdmi-drv-objs := phy-mtk-hdmi.o \ + phy-mtk-hdmi-mt2701.o \ + phy-mtk-hdmi-mt8173.o + +obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o +
drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c renamed from drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +1 -1
@@ -4,7 +4,7 @@* Author: Chunhui Dai <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00#define RG_HDMITX_DRV_IBIAS 0
drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c renamed from drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c +1 -1
@@ -4,7 +4,7 @@* Author: Jie Qiu <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00#define RG_HDMITX_PLL_EN BIT(31)
drivers/phy/mediatek/phy-mtk-hdmi.c renamed from drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +1 -1
@@ -4,7 +4,7 @@* Author: Jie Qiu <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" static int mtk_hdmi_phy_power_on (struct phy *phy);static int mtk_hdmi_phy_power_off (struct phy *phy);
drivers/phy/mediatek/phy-mtk-hdmi.h renamed from drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0 -0
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 3/4] phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder
Quoted 8 lines · Chun-Kuang Hu
From: CK Hu <[email protected]>
mtk_hdmi_phyis currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so movemtk_hdmi_phydriver into phy driver folder.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>
Quoted 15 lines
---
drivers/gpu/drm/mediatek/Kconfig | 7 -------
drivers/gpu/drm/mediatek/Makefile | 6 ------
drivers/phy/mediatek/Kconfig | 7 +++++++
drivers/phy/mediatek/Makefile | 7 +++++++
.../mediatek/phy-mtk-hdmi-mt2701.c} | 2 +-
.../mediatek/phy-mtk-hdmi-mt8173.c} | 2 +-
.../mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} | 2 +-
.../mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} | 0
8 files changed, 17 insertions(+), 16 deletions(-)
rename drivers/{gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt2701.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt8173.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} (99%)
rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} (100%)Re: [PATCH v3 3/4] phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder
In reply to Chun-Kuang HuQuoted 9 lines · Chun-Kuang Hu
From: CK Hu <[email protected]>
mtk_hdmi_phyis currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so movemtk_hdmi_phydriver into phy driver folder.Signed-off-by CK Hu <[email protected]>Signed-off-by Chun-Kuang Hu <[email protected]>---
drivers/phy/mediatek/phy-mtk-hdmi.h
Quoted 126 lines
drivers/gpu/drm/mediatek/Kconfig | 7 ------- drivers/gpu/drm/mediatek/Makefile | 6 ------ drivers/phy/mediatek/Kconfig | 7 +++++++ drivers/phy/mediatek/Makefile | 7 +++++++ .../mediatek/phy-mtk-hdmi-mt2701.c} | 2 +- .../mediatek/phy-mtk-hdmi-mt8173.c} | 2 +- .../mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} | 2 +- .../mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} | 0 8 files changed, 17 insertions(+), 16 deletions(-) rename drivers/{gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt2701.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt8173.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} (100%)drivers/gpu/drm/mediatek/Kconfig +0
-7@@ -26,10 +26,3 @@ config DRM_MEDIATEK_HDMI select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs - -config PHY_MTK_HDMI - tristate "MediaTek HDMI-PHY Driver" - depends on ARCH_MEDIATEK && OF - select GENERIC_PHY - help - Enable this to support HDMI-PHYdrivers/gpu/drm/mediatek/Makefile +0
-6@@ -22,9 +22,3 @@ mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o - -phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ - mtk_mt2701_hdmi_phy.o \ - mtk_mt8173_hdmi_phy.o - -obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.odrivers/phy/mediatek/Kconfig +7
-0@@ -35,3 +35,10 @@ config PHY_MTK_XSPHY Enable this to support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 controllers on MediaTek chips. The driver supports multiple USB2.0, USB3.1 GEN2 ports. + +config PHY_MTK_HDMI + tristate "MediaTek HDMI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Enable this to support HDMI-PHYdrivers/phy/mediatek/Makefile +7
-0@@ -6,3 +6,10 @@ obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o obj-$(CONFIG_PHY_MTK_UFS) += phy-mtk-ufs.o obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o + +phy-mtk-hdmi-drv-objs := phy-mtk-hdmi.o \ + phy-mtk-hdmi-mt2701.o \ + phy-mtk-hdmi-mt8173.o + +obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o +drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c renamed from drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +1
-1@@ -4,7 +4,7 @@* Author: Chunhui Dai <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00#define RG_HDMITX_DRV_IBIAS 0drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c renamed from drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c +1
-1@@ -4,7 +4,7 @@* Author: Jie Qiu <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00#define RG_HDMITX_PLL_EN BIT(31)drivers/phy/mediatek/phy-mtk-hdmi.c renamed from drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +1
-1@@ -4,7 +4,7 @@* Author: Jie Qiu <[email protected]> */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" static int mtk_hdmi_phy_power_on (struct phy *phy);static int mtk_hdmi_phy_power_off (struct phy *phy);drivers/phy/mediatek/phy-mtk-hdmi.h renamed from drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +0
-0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Chun-Kuang Hu
maintainerPATCH v3 4/4 MAINTAINERS: add files for Mediatek DRM drivers
In reply to Chun-Kuang HuMediatek HDMI phy driver is moved from drivers/gpu/drm/mediatek to drivers/phy/mediatek, so add the new folder to the Mediatek DRM drivers' information.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -5612,6 +5612,7 @@ M: Philipp Zabel <[email protected]> L: [email protected] S: Supported F: drivers/gpu/drm/mediatek/ +F: drivers/phy/mediatek/phy-mtk-hdmi* F: Documentation/devicetree/bindings/display/mediatek/ DRM DRIVERS FOR NVIDIA TEGRA
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 4/4] MAINTAINERS: add files for Mediatek DRM drivers
Quoted 5 lines · Chun-Kuang Hu
Mediatek HDMI phy driver is moved from
drivers/gpu/drm/mediatektodrivers/phy/mediatek, so add the new folder to the Mediatek DRM drivers' information.Signed-off-by Chun-Kuang Hu <[email protected]>
Quoted 10 lines
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0
MAINTAINERS M: Philipp Zabel <[email protected]> · line 5618
Quoted 7 lines
MAINTAINERS +1
-0@@ -5612,6 +5612,7 @@ M: Philipp Zabel <[email protected]> L: [email protected] S: Supported F: drivers/gpu/drm/mediatek/ +F: drivers/phy/mediatek/phy-mtk-hdmi* F: Documentation/devicetree/bindings/display/mediatek/ DRM DRIVERS FOR NVIDIA TEGRA
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel