diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-08-11 16:49:06 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-08-16 12:52:42 +0300 |
commit | 37ea27b97b6a5ef073e71169dbc95d89f4daa288 (patch) | |
tree | 00e31a54daeaf433c72ba70677f32a30d317fb24 /drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | |
parent | ba63b6352c753f592e35b6b828f9ffd4e9ac6aa1 (diff) | |
download | linux-37ea27b97b6a5ef073e71169dbc95d89f4daa288.tar.xz |
drm: omapdrm: hdmi: Configure the PHY from the HDMI core version
The OMAP4 and OMAP5 HDMI PHYs have different properties that require
specific handling in the HDMI PHY driver. This needs knowledge of the
PHY version, which is currently inferred from the DSS version. As part
of the effort to remove usage of the DSS version, use the HDMI
controller version instead.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/hdmi_phy.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c index bff1ea11ed2f..95770c3203a1 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c @@ -183,7 +183,8 @@ static const struct hdmi_phy_features omap54xx_phy_feats = { }; static int hdmi_phy_init_features(struct platform_device *pdev, - struct hdmi_phy_data *phy) + struct hdmi_phy_data *phy, + unsigned int version) { struct hdmi_phy_features *dst; const struct hdmi_phy_features *src; @@ -194,21 +195,10 @@ static int hdmi_phy_init_features(struct platform_device *pdev, return -ENOMEM; } - switch (omapdss_get_version()) { - case OMAPDSS_VER_OMAP4430_ES1: - case OMAPDSS_VER_OMAP4430_ES2: - case OMAPDSS_VER_OMAP4: + if (version == 4) src = &omap44xx_phy_feats; - break; - - case OMAPDSS_VER_OMAP5: - case OMAPDSS_VER_DRA7xx: + else src = &omap54xx_phy_feats; - break; - - default: - return -ENODEV; - } memcpy(dst, src, sizeof(*dst)); phy->features = dst; @@ -216,12 +206,13 @@ static int hdmi_phy_init_features(struct platform_device *pdev, return 0; } -int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy) +int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy, + unsigned int version) { int r; struct resource *res; - r = hdmi_phy_init_features(pdev, phy); + r = hdmi_phy_init_features(pdev, phy, version); if (r) return r; |