Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742446
| From | Algea Cao <algea.cao@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 7/7] drm: bridge: dw-hdmi: get phy ops by device type |
| Date | 2017-09-30 03:50 +0200 |
| Message-ID | <uvf4K-5LX-19@gated-at.bofh.it> (permalink) |
| References | <uvf4J-5LX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add device type to distinguish different chips.Different chips
use different phy ops, get them by device type.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 34eeaf6..b414aef 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -144,6 +144,7 @@ struct dw_hdmi {
const struct dw_hdmi_plat_data *plat_data;
int vic;
+ enum dw_hdmi_devtype dev_type;
u8 edid[HDMI_EDID_LEN];
bool cable_plugin;
@@ -2202,7 +2203,9 @@ static int dw_hdmi_detect_phy(struct dw_hdmi *hdmi)
phy_type = hdmi_readb(hdmi, HDMI_CONFIG2_ID);
- if (phy_type == DW_HDMI_PHY_VENDOR_PHY) {
+ if (phy_type == DW_HDMI_PHY_VENDOR_PHY ||
+ hdmi->dev_type == RK3328_HDMI ||
+ hdmi->dev_type == RK3228_HDMI) {
/* Vendor PHYs require support from the glue layer. */
if (!hdmi->plat_data->phy_ops || !hdmi->plat_data->phy_name) {
dev_err(hdmi->dev,
@@ -2298,6 +2301,7 @@ __dw_hdmi_probe(struct platform_device *pdev,
if (!hdmi)
return ERR_PTR(-ENOMEM);
+ hdmi->dev_type = plat_data->dev_type;
hdmi->plat_data = plat_data;
hdmi->dev = dev;
hdmi->sample_rate = 48000;
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v2 7/7] drm: bridge: dw-hdmi: get phy ops by device type Algea Cao <algea.cao@rock-chips.com> - 2017-09-30 03:50 +0200
csiph-web