Global symbols in the kernel should be prefixed by the name of the subsystem and/or driver to avoid conflicts when all code is built-in. In this case, function names like 'hdmi_register' or 'hdmi_set_mode' are way too generic for an MSM specific DRM driver, so I'm renaming them all to msm_hdmi_* here. I also rename a lot of the 'static' symbols along with the global names for consistency, even though those are relatively harmless; they might only be slightly confusing when they show up in backtraces.
Unified · Split
| @@ -21,7 +21,7 @@ · 20 unmodified lines | ||
| 21 | 21 | |
| 22 | 22 | #include "hdmi.h" |
| 23 | 23 | |
| 24 | −void hdmi_set_mode(struct hdmi *hdmi, bool power_on) | |
| 24 | +void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on) | |
| 25 | 25 | { |
| 26 | 26 | uint32_t ctrl = 0; |
| 27 | 27 | unsigned long flags; |
| @@ -46,26 +46,26 @@ void hdmi_set_mode(struct hdmi *hdmi, bool power_on) · 18 unmodified lines | ||
| 46 | 46 | power_on ? "Enable" : "Disable", ctrl); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | −static irqreturn_t hdmi_irq(int irq, void *dev_id) | |
| 49 | +static irqreturn_t msm_hdmi_irq(int irq, void *dev_id) | |
| 50 | 50 | { |
| 51 | 51 | struct hdmi *hdmi = dev_id; |
| 52 | 52 | |
| 53 | 53 | /* Process HPD: */ |
| 54 | − hdmi_connector_irq(hdmi->connector); | |
| 54 | + msm_hdmi_connector_irq(hdmi->connector); | |
| 55 | 55 | |
| 56 | 56 | /* Process DDC: */ |
| 57 | − hdmi_i2c_irq(hdmi->i2c); | |
| 57 | + msm_hdmi_i2c_irq(hdmi->i2c); | |
| 58 | 58 | |
| 59 | 59 | /* Process HDCP: */ |
| 60 | 60 | if (hdmi->hdcp_ctrl) |
| 61 | − hdmi_hdcp_irq(hdmi->hdcp_ctrl); | |
| 61 | + msm_hdmi_hdcp_irq(hdmi->hdcp_ctrl); | |
| 62 | 62 | |
| 63 | 63 | /* TODO audio.. */ |
| 64 | 64 | |
| 65 | 65 | return IRQ_HANDLED; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | −static void hdmi_destroy(struct hdmi *hdmi) | |
| 68 | +static void msm_hdmi_destroy(struct hdmi *hdmi) | |
| 69 | 69 | { |
| 70 | 70 | /* |
| 71 | 71 | * at this point, hpd has been disabled, |
| @@ -75,7 +75,7 @@ static void hdmi_destroy(struct hdmi *hdmi) · 3 unmodified lines | ||
| 75 | 75 | flush_workqueue(hdmi->workq); |
| 76 | 76 | destroy_workqueue(hdmi->workq); |
| 77 | 77 | } |
| 78 | − hdmi_hdcp_destroy(hdmi); | |
| 78 | + msm_hdmi_hdcp_destroy(hdmi); | |
| 79 | 79 | |
| 80 | 80 | if (hdmi->phy_dev) { |
| 81 | 81 | put_device(hdmi->phy_dev); |
| @@ -84,12 +84,12 @@ static void hdmi_destroy(struct hdmi *hdmi) · 2 unmodified lines | ||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | if (hdmi->i2c) |
| 87 | − hdmi_i2c_destroy(hdmi->i2c); | |
| 87 | + msm_hdmi_i2c_destroy(hdmi->i2c); | |
| 88 | 88 | |
| 89 | 89 | platform_set_drvdata(hdmi->pdev, NULL); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | −static int hdmi_get_phy(struct hdmi *hdmi) | |
| 92 | +static int msm_hdmi_get_phy(struct hdmi *hdmi) | |
| 93 | 93 | { |
| 94 | 94 | struct platform_device *pdev = hdmi->pdev; |
| 95 | 95 | struct platform_device *phy_pdev; |
| @@ -121,7 +121,7 @@ static int hdmi_get_phy(struct hdmi *hdmi) · 25 unmodified lines | ||
| 121 | 121 | * we are to EPROBE_DEFER we want to do it here, rather than later |
| 122 | 122 | * at modeset_init() time |
| 123 | 123 | */ |
| 124 | −static struct hdmi *hdmi_init(struct platform_device *pdev) | |
| 124 | +static struct hdmi *msm_hdmi_init(struct platform_device *pdev) | |
| 125 | 125 | { |
| 126 | 126 | struct hdmi_platform_config *config = pdev->dev.platform_data; |
| 127 | 127 | struct hdmi *hdmi = NULL; |
| @@ -240,7 +240,7 @@ static struct hdmi *hdmi_init(struct platform_device *pdev) · 112 unmodified lines | ||
| 240 | 240 | |
| 241 | 241 | hdmi->workq = alloc_ordered_workqueue("msm_hdmi", 0); |
| 242 | 242 | |
| 243 | − hdmi->i2c = hdmi_i2c_init(hdmi); | |
| 243 | + hdmi->i2c = msm_hdmi_i2c_init(hdmi); | |
| 244 | 244 | if (IS_ERR(hdmi->i2c)) { |
| 245 | 245 | ret = PTR_ERR(hdmi->i2c); |
| 246 | 246 | dev_err(&pdev->dev, "failed to get i2c: %d\n", ret); |
| @@ -248,13 +248,13 @@ static struct hdmi *hdmi_init(struct platform_device *pdev) · 1 unmodified line | ||
| 248 | 248 | goto fail; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | − ret = hdmi_get_phy(hdmi); | |
| 251 | + ret = msm_hdmi_get_phy(hdmi); | |
| 252 | 252 | if (ret) { |
| 253 | 253 | dev_err(&pdev->dev, "failed to get phy\n"); |
| 254 | 254 | goto fail; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | − hdmi->hdcp_ctrl = hdmi_hdcp_init(hdmi); | |
| 257 | + hdmi->hdcp_ctrl = msm_hdmi_hdcp_init(hdmi); | |
| 258 | 258 | if (IS_ERR(hdmi->hdcp_ctrl)) { |
| 259 | 259 | dev_warn(&pdev->dev, "failed to init hdcp: disabled\n"); |
| 260 | 260 | hdmi->hdcp_ctrl = NULL; |
| @@ -264,7 +264,7 @@ static struct hdmi *hdmi_init(struct platform_device *pdev) · 3 unmodified lines | ||
| 264 | 264 | |
| 265 | 265 | fail: |
| 266 | 266 | if (hdmi) |
| 267 | − hdmi_destroy(hdmi); | |
| 267 | + msm_hdmi_destroy(hdmi); | |
| 268 | 268 | |
| 269 | 269 | return ERR_PTR(ret); |
| 270 | 270 | } |
| @@ -274,10 +274,10 @@ fail: · 3 unmodified lines | ||
| 274 | 274 | * driver (not hdmi sub-device's probe/bind!) |
| 275 | 275 | * |
| 276 | 276 | * Any resource (regulator/clk/etc) which could be missing at boot |
| 277 | − * should be handled in hdmi_init() so that failure happens from | |
| 277 | + * should be handled in msm_hdmi_init() so that failure happens from | |
| 278 | 278 | * hdmi sub-device's probe. |
| 279 | 279 | */ |
| 280 | −int hdmi_modeset_init(struct hdmi *hdmi, | |
| 280 | +int msm_hdmi_modeset_init(struct hdmi *hdmi, | |
| 281 | 281 | struct drm_device *dev, struct drm_encoder *encoder) |
| 282 | 282 | { |
| 283 | 283 | struct msm_drm_private *priv = dev->dev_private; |
| @@ -289,7 +289,7 @@ int hdmi_modeset_init(struct hdmi *hdmi, · 5 unmodified lines | ||
| 289 | 289 | |
| 290 | 290 | hdmi_audio_infoframe_init(&hdmi->audio.infoframe); |
| 291 | 291 | |
| 292 | − hdmi->bridge = hdmi_bridge_init(hdmi); | |
| 292 | + hdmi->bridge = msm_hdmi_bridge_init(hdmi); | |
| 293 | 293 | if (IS_ERR(hdmi->bridge)) { |
| 294 | 294 | ret = PTR_ERR(hdmi->bridge); |
| 295 | 295 | dev_err(dev->dev, "failed to create HDMI bridge: %d\n", ret); |
| @@ -297,7 +297,7 @@ int hdmi_modeset_init(struct hdmi *hdmi, · 1 unmodified line | ||
| 297 | 297 | goto fail; |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | − hdmi->connector = hdmi_connector_init(hdmi); | |
| 300 | + hdmi->connector = msm_hdmi_connector_init(hdmi); | |
| 301 | 301 | if (IS_ERR(hdmi->connector)) { |
| 302 | 302 | ret = PTR_ERR(hdmi->connector); |
| 303 | 303 | dev_err(dev->dev, "failed to create HDMI connector: %d\n", ret); |
| @@ -313,7 +313,7 @@ int hdmi_modeset_init(struct hdmi *hdmi, · 9 unmodified lines | ||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | ret = devm_request_irq(&pdev->dev, hdmi->irq, |
| 316 | − hdmi_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, | |
| 316 | + msm_hdmi_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, | |
| 317 | 317 | "hdmi_isr", hdmi); |
| 318 | 318 | if (ret < 0) { |
| 319 | 319 | dev_err(dev->dev, "failed to request IRQ%u: %d\n", |
| @@ -333,7 +333,7 @@ int hdmi_modeset_init(struct hdmi *hdmi, · 13 unmodified lines | ||
| 333 | 333 | fail: |
| 334 | 334 | /* bridge is normally destroyed by drm: */ |
| 335 | 335 | if (hdmi->bridge) { |
| 336 | − hdmi_bridge_destroy(hdmi->bridge); | |
| 336 | + msm_hdmi_bridge_destroy(hdmi->bridge); | |
| 337 | 337 | hdmi->bridge = NULL; |
| 338 | 338 | } |
| 339 | 339 | if (hdmi->connector) { |
| @@ -410,7 +410,7 @@ static const struct { · 70 unmodified lines | ||
| 410 | 410 | const bool output; |
| 411 | 411 | const int value; |
| 412 | 412 | const char *label; |
| 413 | −} hdmi_gpio_pdata[] = { | |
| 413 | +} msm_hdmi_gpio_pdata[] = { | |
| 414 | 414 | { "qcom,hdmi-tx-ddc-clk", true, 1, "HDMI_DDC_CLK" }, |
| 415 | 415 | { "qcom,hdmi-tx-ddc-data", true, 1, "HDMI_DDC_DATA" }, |
| 416 | 416 | { "qcom,hdmi-tx-hpd", false, 1, "HDMI_HPD" }, |
| @@ -419,7 +419,7 @@ static const struct { · 2 unmodified lines | ||
| 419 | 419 | { "qcom,hdmi-tx-mux-lpm", true, 1, "HDMI_MUX_LPM" }, |
| 420 | 420 | }; |
| 421 | 421 | |
| 422 | −static int get_gpio(struct device_node *of_node, const char *name) | |
| 422 | +static int msm_hdmi_get_gpio(struct device_node *of_node, const char *name) | |
| 423 | 423 | { |
| 424 | 424 | int gpio = of_get_named_gpio(of_node, name, 0); |
| 425 | 425 | if (gpio < 0) { |
| @@ -434,7 +434,7 @@ static int get_gpio(struct device_node *of_node, const char *name) · 8 unmodified lines | ||
| 434 | 434 | return gpio; |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | −static int hdmi_bind(struct device *dev, struct device *master, void *data) | |
| 437 | +static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) | |
| 438 | 438 | { |
| 439 | 439 | struct drm_device *drm = dev_get_drvdata(master); |
| 440 | 440 | struct msm_drm_private *priv = drm->dev_private; |
| @@ -454,16 +454,16 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data) · 13 unmodified lines | ||
| 454 | 454 | hdmi_cfg->qfprom_mmio_name = "qfprom_physical"; |
| 455 | 455 | |
| 456 | 456 | for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { |
| 457 | − hdmi_cfg->gpios[i].num = get_gpio(of_node, | |
| 458 | − hdmi_gpio_pdata[i].name); | |
| 459 | − hdmi_cfg->gpios[i].output = hdmi_gpio_pdata[i].output; | |
| 460 | − hdmi_cfg->gpios[i].value = hdmi_gpio_pdata[i].value; | |
| 461 | − hdmi_cfg->gpios[i].label = hdmi_gpio_pdata[i].label; | |
| 457 | + hdmi_cfg->gpios[i].num = msm_hdmi_get_gpio(of_node, | |
| 458 | + msm_hdmi_gpio_pdata[i].name); | |
| 459 | + hdmi_cfg->gpios[i].output = msm_hdmi_gpio_pdata[i].output; | |
| 460 | + hdmi_cfg->gpios[i].value = msm_hdmi_gpio_pdata[i].value; | |
| 461 | + hdmi_cfg->gpios[i].label = msm_hdmi_gpio_pdata[i].label; | |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | dev->platform_data = hdmi_cfg; |
| 465 | 465 | |
| 466 | − hdmi = hdmi_init(to_platform_device(dev)); | |
| 466 | + hdmi = msm_hdmi_init(to_platform_device(dev)); | |
| 467 | 467 | if (IS_ERR(hdmi)) |
| 468 | 468 | return PTR_ERR(hdmi); |
| 469 | 469 | priv->hdmi = hdmi; |
| @@ -471,34 +471,34 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data) · 1 unmodified line | ||
| 471 | 471 | return 0; |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | −static void hdmi_unbind(struct device *dev, struct device *master, | |
| 474 | +static void msm_hdmi_unbind(struct device *dev, struct device *master, | |
| 475 | 475 | void *data) |
| 476 | 476 | { |
| 477 | 477 | struct drm_device *drm = dev_get_drvdata(master); |
| 478 | 478 | struct msm_drm_private *priv = drm->dev_private; |
| 479 | 479 | if (priv->hdmi) { |
| 480 | − hdmi_destroy(priv->hdmi); | |
| 480 | + msm_hdmi_destroy(priv->hdmi); | |
| 481 | 481 | priv->hdmi = NULL; |
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | −static const struct component_ops hdmi_ops = { | |
| 486 | − .bind = hdmi_bind, | |
| 487 | − .unbind = hdmi_unbind, | |
| 485 | +static const struct component_ops msm_hdmi_ops = { | |
| 486 | + .bind = msm_hdmi_bind, | |
| 487 | + .unbind = msm_hdmi_unbind, | |
| 488 | 488 | }; |
| 489 | 489 | |
| 490 | −static int hdmi_dev_probe(struct platform_device *pdev) | |
| 490 | +static int msm_hdmi_dev_probe(struct platform_device *pdev) | |
| 491 | 491 | { |
| 492 | − return component_add(&pdev->dev, &hdmi_ops); | |
| 492 | + return component_add(&pdev->dev, &msm_hdmi_ops); | |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | −static int hdmi_dev_remove(struct platform_device *pdev) | |
| 495 | +static int msm_hdmi_dev_remove(struct platform_device *pdev) | |
| 496 | 496 | { |
| 497 | − component_del(&pdev->dev, &hdmi_ops); | |
| 497 | + component_del(&pdev->dev, &msm_hdmi_ops); | |
| 498 | 498 | return 0; |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | −static const struct of_device_id dt_match[] = { | |
| 501 | +static const struct of_device_id msm_hdmi_dt_match[] = { | |
| 502 | 502 | { .compatible = "qcom,hdmi-tx-8996", .data = &hdmi_tx_8996_config }, |
| 503 | 503 | { .compatible = "qcom,hdmi-tx-8994", .data = &hdmi_tx_8994_config }, |
| 504 | 504 | { .compatible = "qcom,hdmi-tx-8084", .data = &hdmi_tx_8084_config }, |
| @@ -508,23 +508,23 @@ static const struct of_device_id dt_match[] = { · 3 unmodified lines | ||
| 508 | 508 | {} |
| 509 | 509 | }; |
| 510 | 510 | |
| 511 | −static struct platform_driver hdmi_driver = { | |
| 512 | − .probe = hdmi_dev_probe, | |
| 513 | − .remove = hdmi_dev_remove, | |
| 511 | +static struct platform_driver msm_hdmi_driver = { | |
| 512 | + .probe = msm_hdmi_dev_probe, | |
| 513 | + .remove = msm_hdmi_dev_remove, | |
| 514 | 514 | .driver = { |
| 515 | 515 | .name = "hdmi_msm", |
| 516 | − .of_match_table = dt_match, | |
| 516 | + .of_match_table = msm_hdmi_dt_match, | |
| 517 | 517 | }, |
| 518 | 518 | }; |
| 519 | 519 | |
| 520 | −void __init hdmi_register(void) | |
| 520 | +void __init msm_hdmi_register(void) | |
| 521 | 521 | { |
| 522 | − hdmi_phy_driver_register(); | |
| 523 | − platform_driver_register(&hdmi_driver); | |
| 522 | + msm_hdmi_phy_driver_register(); | |
| 523 | + platform_driver_register(&msm_hdmi_driver); | |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | −void __exit hdmi_unregister(void) | |
| 526 | +void __exit msm_hdmi_unregister(void) | |
| 527 | 527 | { |
| 528 | − platform_driver_unregister(&hdmi_driver); | |
| 529 | − hdmi_phy_driver_unregister(); | |
| 528 | + platform_driver_unregister(&msm_hdmi_driver); | |
| 529 | + msm_hdmi_phy_driver_unregister(); | |
| 530 | 530 | } |
| @@ -122,7 +122,7 @@ struct hdmi_platform_config { · 121 unmodified lines | ||
| 122 | 122 | struct hdmi_gpio_data gpios[HDMI_MAX_NUM_GPIO]; |
| 123 | 123 | }; |
| 124 | 124 | |
| 125 | −void hdmi_set_mode(struct hdmi *hdmi, bool power_on); | |
| 125 | +void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on); | |
| 126 | 126 | |
| 127 | 127 | static inline void hdmi_write(struct hdmi *hdmi, u32 reg, u32 data) |
| 128 | 128 | { |
| @@ -161,10 +161,10 @@ struct hdmi_phy_cfg { · 32 unmodified lines | ||
| 161 | 161 | int num_clks; |
| 162 | 162 | }; |
| 163 | 163 | |
| 164 | −extern const struct hdmi_phy_cfg hdmi_phy_8x60_cfg; | |
| 165 | −extern const struct hdmi_phy_cfg hdmi_phy_8960_cfg; | |
| 166 | −extern const struct hdmi_phy_cfg hdmi_phy_8x74_cfg; | |
| 167 | −extern const struct hdmi_phy_cfg hdmi_phy_8996_cfg; | |
| 164 | +extern const struct hdmi_phy_cfg msm_hdmi_phy_8x60_cfg; | |
| 165 | +extern const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg; | |
| 166 | +extern const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg; | |
| 167 | +extern const struct hdmi_phy_cfg msm_hdmi_phy_8996_cfg; | |
| 168 | 168 | |
| 169 | 169 | struct hdmi_phy { |
| 170 | 170 | struct platform_device *pdev; |
| @@ -185,23 +185,23 @@ static inline u32 hdmi_phy_read(struct hdmi_phy *phy, u32 reg) · 14 unmodified lines | ||
| 185 | 185 | return msm_readl(phy->mmio + reg); |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | −int hdmi_phy_resource_enable(struct hdmi_phy *phy); | |
| 189 | −void hdmi_phy_resource_disable(struct hdmi_phy *phy); | |
| 190 | −void hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock); | |
| 191 | −void hdmi_phy_powerdown(struct hdmi_phy *phy); | |
| 192 | −void __init hdmi_phy_driver_register(void); | |
| 193 | −void __exit hdmi_phy_driver_unregister(void); | |
| 188 | +int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy); | |
| 189 | +void msm_hdmi_phy_resource_disable(struct hdmi_phy *phy); | |
| 190 | +void msm_hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock); | |
| 191 | +void msm_hdmi_phy_powerdown(struct hdmi_phy *phy); | |
| 192 | +void __init msm_hdmi_phy_driver_register(void); | |
| 193 | +void __exit msm_hdmi_phy_driver_unregister(void); | |
| 194 | 194 | |
| 195 | 195 | #ifdef CONFIG_COMMON_CLK |
| 196 | −int hdmi_pll_8960_init(struct platform_device *pdev); | |
| 197 | −int hdmi_pll_8996_init(struct platform_device *pdev); | |
| 196 | +int msm_hdmi_pll_8960_init(struct platform_device *pdev); | |
| 197 | +int msm_hdmi_pll_8996_init(struct platform_device *pdev); | |
| 198 | 198 | #else |
| 199 | −int hdmi_pll_8960_init(struct platform_device *pdev); | |
| 199 | +static inline int msm_hdmi_pll_8960_init(struct platform_device *pdev); | |
| 200 | 200 | { |
| 201 | 201 | return -ENODEV; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | −int hdmi_pll_8996_init(struct platform_device *pdev) | |
| 204 | +static inline int msm_hdmi_pll_8996_init(struct platform_device *pdev) | |
| 205 | 205 | { |
| 206 | 206 | return -ENODEV; |
| 207 | 207 | } |
| @@ -211,42 +211,42 @@ int hdmi_pll_8996_init(struct platform_device *pdev) · 3 unmodified lines | ||
| 211 | 211 | * audio: |
| 212 | 212 | */ |
| 213 | 213 | |
| 214 | −int hdmi_audio_update(struct hdmi *hdmi); | |
| 215 | −int hdmi_audio_info_setup(struct hdmi *hdmi, bool enabled, | |
| 214 | +int msm_hdmi_audio_update(struct hdmi *hdmi); | |
| 215 | +int msm_hdmi_audio_info_setup(struct hdmi *hdmi, bool enabled, | |
| 216 | 216 | uint32_t num_of_channels, uint32_t channel_allocation, |
| 217 | 217 | uint32_t level_shift, bool down_mix); |
| 218 | −void hdmi_audio_set_sample_rate(struct hdmi *hdmi, int rate); | |
| 218 | +void msm_hdmi_audio_set_sample_rate(struct hdmi *hdmi, int rate); | |
| 219 | 219 | |
| 220 | 220 | |
| 221 | 221 | /* |
| 222 | 222 | * hdmi bridge: |
| 223 | 223 | */ |
| 224 | 224 | |
| 225 | −struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi); | |
| 226 | −void hdmi_bridge_destroy(struct drm_bridge *bridge); | |
| 225 | +struct drm_bridge *msm_hdmi_bridge_init(struct hdmi *hdmi); | |
| 226 | +void msm_hdmi_bridge_destroy(struct drm_bridge *bridge); | |
| 227 | 227 | |
| 228 | 228 | /* |
| 229 | 229 | * hdmi connector: |
| 230 | 230 | */ |
| 231 | 231 | |
| 232 | −void hdmi_connector_irq(struct drm_connector *connector); | |
| 233 | −struct drm_connector *hdmi_connector_init(struct hdmi *hdmi); | |
| 232 | +void msm_hdmi_connector_irq(struct drm_connector *connector); | |
| 233 | +struct drm_connector *msm_hdmi_connector_init(struct hdmi *hdmi); | |
| 234 | 234 | |
| 235 | 235 | /* |
| 236 | 236 | * i2c adapter for ddc: |
| 237 | 237 | */ |
| 238 | 238 | |
| 239 | −void hdmi_i2c_irq(struct i2c_adapter *i2c); | |
| 240 | −void hdmi_i2c_destroy(struct i2c_adapter *i2c); | |
| 241 | −struct i2c_adapter *hdmi_i2c_init(struct hdmi *hdmi); | |
| 239 | +void msm_hdmi_i2c_irq(struct i2c_adapter *i2c); | |
| 240 | +void msm_hdmi_i2c_destroy(struct i2c_adapter *i2c); | |
| 241 | +struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi); | |
| 242 | 242 | |
| 243 | 243 | /* |
| 244 | 244 | * hdcp |
| 245 | 245 | */ |
| 246 | −struct hdmi_hdcp_ctrl *hdmi_hdcp_init(struct hdmi *hdmi); | |
| 247 | −void hdmi_hdcp_destroy(struct hdmi *hdmi); | |
| 248 | −void hdmi_hdcp_on(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 249 | −void hdmi_hdcp_off(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 250 | −void hdmi_hdcp_irq(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 246 | +struct hdmi_hdcp_ctrl *msm_hdmi_hdcp_init(struct hdmi *hdmi); | |
| 247 | +void msm_hdmi_hdcp_destroy(struct hdmi *hdmi); | |
| 248 | +void msm_hdmi_hdcp_on(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 249 | +void msm_hdmi_hdcp_off(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 250 | +void msm_hdmi_hdcp_irq(struct hdmi_hdcp_ctrl *hdcp_ctrl); | |
| 251 | 251 | |
| 252 | 252 | #endif /* __HDMI_CONNECTOR_H__ */ |
| @@ -89,7 +89,7 @@ static const struct hdmi_msm_audio_arcs *get_arcs(unsigned long int pixclock) · 88 unmodified lines | ||
| 89 | 89 | return NULL; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | −int hdmi_audio_update(struct hdmi *hdmi) | |
| 92 | +int msm_hdmi_audio_update(struct hdmi *hdmi) | |
| 93 | 93 | { |
| 94 | 94 | struct hdmi_audio *audio = &hdmi->audio; |
| 95 | 95 | struct hdmi_audio_infoframe *info = &audio->infoframe; |
| @@ -232,7 +232,7 @@ int hdmi_audio_update(struct hdmi *hdmi) · 136 unmodified lines | ||
| 232 | 232 | return 0; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | −int hdmi_audio_info_setup(struct hdmi *hdmi, bool enabled, | |
| 235 | +int msm_hdmi_audio_info_setup(struct hdmi *hdmi, bool enabled, | |
| 236 | 236 | uint32_t num_of_channels, uint32_t channel_allocation, |
| 237 | 237 | uint32_t level_shift, bool down_mix) |
| 238 | 238 | { |
| @@ -252,10 +252,10 @@ int hdmi_audio_info_setup(struct hdmi *hdmi, bool enabled, · 13 unmodified lines | ||
| 252 | 252 | audio->infoframe.level_shift_value = level_shift; |
| 253 | 253 | audio->infoframe.downmix_inhibit = down_mix; |
| 254 | 254 | |
| 255 | − return hdmi_audio_update(hdmi); | |
| 255 | + return msm_hdmi_audio_update(hdmi); | |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | −void hdmi_audio_set_sample_rate(struct hdmi *hdmi, int rate) | |
| 258 | +void msm_hdmi_audio_set_sample_rate(struct hdmi *hdmi, int rate) | |
| 259 | 259 | { |
| 260 | 260 | struct hdmi_audio *audio; |
| 261 | 261 | |
| @@ -268,5 +268,5 @@ void hdmi_audio_set_sample_rate(struct hdmi *hdmi, int rate) · 6 unmodified lines | ||
| 268 | 268 | return; |
| 269 | 269 | |
| 270 | 270 | audio->rate = rate; |
| 271 | − hdmi_audio_update(hdmi); | |
| 271 | + msm_hdmi_audio_update(hdmi); | |
| 272 | 272 | } |
| @@ -23,11 +23,11 @@ struct hdmi_bridge { · 22 unmodified lines | ||
| 23 | 23 | }; |
| 24 | 24 | #define to_hdmi_bridge(x) container_of(x, struct hdmi_bridge, base) |
| 25 | 25 | |
| 26 | −void hdmi_bridge_destroy(struct drm_bridge *bridge) | |
| 26 | +void msm_hdmi_bridge_destroy(struct drm_bridge *bridge) | |
| 27 | 27 | { |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | −static void power_on(struct drm_bridge *bridge) | |
| 30 | +static void msm_hdmi_power_on(struct drm_bridge *bridge) | |
| 31 | 31 | { |
| 32 | 32 | struct drm_device *dev = bridge->dev; |
| 33 | 33 | struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); |
| @@ -86,7 +86,7 @@ static void power_off(struct drm_bridge *bridge) · 52 unmodified lines | ||
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | −static void hdmi_bridge_pre_enable(struct drm_bridge *bridge) | |
| 89 | +static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge) | |
| 90 | 90 | { |
| 91 | 91 | struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); |
| 92 | 92 | struct hdmi *hdmi = hdmi_bridge->hdmi; |
| @@ -95,51 +95,51 @@ static void hdmi_bridge_pre_enable(struct drm_bridge *bridge) · 2 unmodified lines | ||
| 95 | 95 | DBG("power up"); |
| 96 | 96 | |
| 97 | 97 | if (!hdmi->power_on) { |
| 98 | − hdmi_phy_resource_enable(phy); | |
| 99 | − power_on(bridge); | |
| 98 | + msm_hdmi_phy_resource_enable(phy); | |
| 99 | + msm_hdmi_power_on(bridge); | |
| 100 | 100 | hdmi->power_on = true; |
| 101 | − hdmi_audio_update(hdmi); | |
| 101 | + msm_hdmi_audio_update(hdmi); | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | − hdmi_phy_powerup(phy, hdmi->pixclock); | |
| 104 | + msm_hdmi_phy_powerup(phy, hdmi->pixclock); | |
| 105 | 105 | |
| 106 | − hdmi_set_mode(hdmi, true); | |
| 106 | + msm_hdmi_set_mode(hdmi, true); | |
| 107 | 107 | |
| 108 | 108 | if (hdmi->hdcp_ctrl) |
| 109 | − hdmi_hdcp_on(hdmi->hdcp_ctrl); | |
| 109 | + msm_hdmi_hdcp_on(hdmi->hdcp_ctrl); | |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | −static void hdmi_bridge_enable(struct drm_bridge *bridge) | |
| 112 | +static void msm_hdmi_bridge_enable(struct drm_bridge *bridge) | |
| 113 | 113 | { |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | −static void hdmi_bridge_disable(struct drm_bridge *bridge) | |
| 116 | +static void msm_hdmi_bridge_disable(struct drm_bridge *bridge) | |
| 117 | 117 | { |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | −static void hdmi_bridge_post_disable(struct drm_bridge *bridge) | |
| 120 | +static void msm_hdmi_bridge_post_disable(struct drm_bridge *bridge) | |
| 121 | 121 | { |
| 122 | 122 | struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); |
| 123 | 123 | struct hdmi *hdmi = hdmi_bridge->hdmi; |
| 124 | 124 | struct hdmi_phy *phy = hdmi->phy; |
| 125 | 125 | |
| 126 | 126 | if (hdmi->hdcp_ctrl) |
| 127 | − hdmi_hdcp_off(hdmi->hdcp_ctrl); | |
| 127 | + msm_hdmi_hdcp_off(hdmi->hdcp_ctrl); | |
| 128 | 128 | |
| 129 | 129 | DBG("power down"); |
| 130 | − hdmi_set_mode(hdmi, false); | |
| 130 | + msm_hdmi_set_mode(hdmi, false); | |
| 131 | 131 | |
| 132 | − hdmi_phy_powerdown(phy); | |
| 132 | + msm_hdmi_phy_powerdown(phy); | |
| 133 | 133 | |
| 134 | 134 | if (hdmi->power_on) { |
| 135 | 135 | power_off(bridge); |
| 136 | 136 | hdmi->power_on = false; |
| 137 | − hdmi_audio_update(hdmi); | |
| 138 | − hdmi_phy_resource_disable(phy); | |
| 137 | + msm_hdmi_audio_update(hdmi); | |
| 138 | + msm_hdmi_phy_resource_disable(phy); | |
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | −static void hdmi_bridge_mode_set(struct drm_bridge *bridge, | |
| 142 | +static void msm_hdmi_bridge_mode_set(struct drm_bridge *bridge, | |
| 143 | 143 | struct drm_display_mode *mode, |
| 144 | 144 | struct drm_display_mode *adjusted_mode) |
| 145 | 145 | { |
| @@ -196,20 +196,20 @@ static void hdmi_bridge_mode_set(struct drm_bridge *bridge, · 50 unmodified lines | ||
| 196 | 196 | DBG("frame_ctrl=%08x", frame_ctrl); |
| 197 | 197 | hdmi_write(hdmi, REG_HDMI_FRAME_CTRL, frame_ctrl); |
| 198 | 198 | |
| 199 | − hdmi_audio_update(hdmi); | |
| 199 | + msm_hdmi_audio_update(hdmi); | |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | −static const struct drm_bridge_funcs hdmi_bridge_funcs = { | |
| 203 | − .pre_enable = hdmi_bridge_pre_enable, | |
| 204 | − .enable = hdmi_bridge_enable, | |
| 205 | − .disable = hdmi_bridge_disable, | |
| 206 | − .post_disable = hdmi_bridge_post_disable, | |
| 207 | − .mode_set = hdmi_bridge_mode_set, | |
| 202 | +static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = { | |
| 203 | + .pre_enable = msm_hdmi_bridge_pre_enable, | |
| 204 | + .enable = msm_hdmi_bridge_enable, | |
| 205 | + .disable = msm_hdmi_bridge_disable, | |
| 206 | + .post_disable = msm_hdmi_bridge_post_disable, | |
| 207 | + .mode_set = msm_hdmi_bridge_mode_set, | |
| 208 | 208 | }; |
| 209 | 209 | |
| 210 | 210 | |
| 211 | 211 | /* initialize bridge */ |
| 212 | −struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi) | |
| 212 | +struct drm_bridge *msm_hdmi_bridge_init(struct hdmi *hdmi) | |
| 213 | 213 | { |
| 214 | 214 | struct drm_bridge *bridge = NULL; |
| 215 | 215 | struct hdmi_bridge *hdmi_bridge; |
| @@ -225,7 +225,7 @@ struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi) · 9 unmodified lines | ||
| 225 | 225 | hdmi_bridge->hdmi = hdmi; |
| 226 | 226 | |
| 227 | 227 | bridge = &hdmi_bridge->base; |
| 228 | − bridge->funcs = &hdmi_bridge_funcs; | |
| 228 | + bridge->funcs = &msm_hdmi_bridge_funcs; | |
| 229 | 229 | |
| 230 | 230 | ret = drm_bridge_attach(hdmi->dev, bridge); |
| 231 | 231 | if (ret) |
| @@ -235,7 +235,7 @@ struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi) · 3 unmodified lines | ||
| 235 | 235 | |
| 236 | 236 | fail: |
| 237 | 237 | if (bridge) |
| 238 | − hdmi_bridge_destroy(bridge); | |
| 238 | + msm_hdmi_bridge_destroy(bridge); | |
| 239 | 239 | |
| 240 | 240 | return ERR_PTR(ret); |
| 241 | 241 | } |
| @@ -28,7 +28,7 @@ struct hdmi_connector { · 27 unmodified lines | ||
| 28 | 28 | }; |
| 29 | 29 | #define to_hdmi_connector(x) container_of(x, struct hdmi_connector, base) |
| 30 | 30 | |
| 31 | −static void hdmi_phy_reset(struct hdmi *hdmi) | |
| 31 | +static void msm_hdmi_phy_reset(struct hdmi *hdmi) | |
| 32 | 32 | { |
| 33 | 33 | unsigned int val; |
| 34 | 34 | |
| @@ -179,9 +179,9 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector) · 144 unmodified lines | ||
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | − hdmi_set_mode(hdmi, false); | |
| 183 | − hdmi_phy_reset(hdmi); | |
| 184 | − hdmi_set_mode(hdmi, true); | |
| 182 | + msm_hdmi_set_mode(hdmi, false); | |
| 183 | + msm_hdmi_phy_reset(hdmi); | |
| 184 | + msm_hdmi_set_mode(hdmi, true); | |
| 185 | 185 | |
| 186 | 186 | hdmi_write(hdmi, REG_HDMI_USEC_REFTIMER, 0x0001001b); |
| 187 | 187 | |
| @@ -218,7 +218,7 @@ static void hdp_disable(struct hdmi_connector *hdmi_connector) · 30 unmodified lines | ||
| 218 | 218 | /* Disable HPD interrupt */ |
| 219 | 219 | hdmi_write(hdmi, REG_HDMI_HPD_INT_CTRL, 0); |
| 220 | 220 | |
| 221 | − hdmi_set_mode(hdmi, false); | |
| 221 | + msm_hdmi_set_mode(hdmi, false); | |
| 222 | 222 | |
| 223 | 223 | for (i = 0; i < config->hpd_clk_cnt; i++) |
| 224 | 224 | clk_disable_unprepare(hdmi->hpd_clks[i]); |
| @@ -240,7 +240,7 @@ static void hdp_disable(struct hdmi_connector *hdmi_connector) · 15 unmodified lines | ||
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | static void |
| 243 | −hotplug_work(struct work_struct *work) | |
| 243 | +msm_hdmi_hotplug_work(struct work_struct *work) | |
| 244 | 244 | { |
| 245 | 245 | struct hdmi_connector *hdmi_connector = |
| 246 | 246 | container_of(work, struct hdmi_connector, hpd_work); |
| @@ -248,7 +248,7 @@ hotplug_work(struct work_struct *work) · 1 unmodified line | ||
| 248 | 248 | drm_helper_hpd_irq_event(connector->dev); |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | −void hdmi_connector_irq(struct drm_connector *connector) | |
| 251 | +void msm_hdmi_connector_irq(struct drm_connector *connector) | |
| 252 | 252 | { |
| 253 | 253 | struct hdmi_connector *hdmi_connector = to_hdmi_connector(connector); |
| 254 | 254 | struct hdmi *hdmi = hdmi_connector->hdmi; |
| @@ -347,7 +347,7 @@ static void hdmi_connector_destroy(struct drm_connector *connector) · 92 unmodified lines | ||
| 347 | 347 | kfree(hdmi_connector); |
| 348 | 348 | } |
| 349 | 349 | |
| 350 | −static int hdmi_connector_get_modes(struct drm_connector *connector) | |
| 350 | +static int msm_hdmi_connector_get_modes(struct drm_connector *connector) | |
| 351 | 351 | { |
| 352 | 352 | struct hdmi_connector *hdmi_connector = to_hdmi_connector(connector); |
| 353 | 353 | struct hdmi *hdmi = hdmi_connector->hdmi; |
| @@ -373,7 +373,7 @@ static int hdmi_connector_get_modes(struct drm_connector *connector) · 19 unmodified lines | ||
| 373 | 373 | return ret; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | −static int hdmi_connector_mode_valid(struct drm_connector *connector, | |
| 376 | +static int msm_hdmi_connector_mode_valid(struct drm_connector *connector, | |
| 377 | 377 | struct drm_display_mode *mode) |
| 378 | 378 | { |
| 379 | 379 | struct hdmi_connector *hdmi_connector = to_hdmi_connector(connector); |
| @@ -403,7 +403,7 @@ static int hdmi_connector_mode_valid(struct drm_connector *connector, · 23 unmodified lines | ||
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | static struct drm_encoder * |
| 406 | −hdmi_connector_best_encoder(struct drm_connector *connector) | |
| 406 | +msm_hdmi_connector_best_encoder(struct drm_connector *connector) | |
| 407 | 407 | { |
| 408 | 408 | struct hdmi_connector *hdmi_connector = to_hdmi_connector(connector); |
| 409 | 409 | return hdmi_connector->hdmi->encoder; |
| @@ -419,14 +419,14 @@ static const struct drm_connector_funcs hdmi_connector_funcs = { · 9 unmodified lines | ||
| 419 | 419 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
| 420 | 420 | }; |
| 421 | 421 | |
| 422 | −static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { | |
| 423 | − .get_modes = hdmi_connector_get_modes, | |
| 424 | − .mode_valid = hdmi_connector_mode_valid, | |
| 425 | − .best_encoder = hdmi_connector_best_encoder, | |
| 422 | +static const struct drm_connector_helper_funcs msm_hdmi_connector_helper_funcs = { | |
| 423 | + .get_modes = msm_hdmi_connector_get_modes, | |
| 424 | + .mode_valid = msm_hdmi_connector_mode_valid, | |
| 425 | + .best_encoder = msm_hdmi_connector_best_encoder, | |
| 426 | 426 | }; |
| 427 | 427 | |
| 428 | 428 | /* initialize connector */ |
| 429 | −struct drm_connector *hdmi_connector_init(struct hdmi *hdmi) | |
| 429 | +struct drm_connector *msm_hdmi_connector_init(struct hdmi *hdmi) | |
| 430 | 430 | { |
| 431 | 431 | struct drm_connector *connector = NULL; |
| 432 | 432 | struct hdmi_connector *hdmi_connector; |
| @@ -439,13 +439,13 @@ struct drm_connector *hdmi_connector_init(struct hdmi *hdmi) · 6 unmodified lines | ||
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | hdmi_connector->hdmi = hdmi; |
| 442 | − INIT_WORK(&hdmi_connector->hpd_work, hotplug_work); | |
| 442 | + INIT_WORK(&hdmi_connector->hpd_work, msm_hdmi_hotplug_work); | |
| 443 | 443 | |
| 444 | 444 | connector = &hdmi_connector->base; |
| 445 | 445 | |
| 446 | 446 | drm_connector_init(hdmi->dev, connector, &hdmi_connector_funcs, |
| 447 | 447 | DRM_MODE_CONNECTOR_HDMIA); |
| 448 | − drm_connector_helper_add(connector, &hdmi_connector_helper_funcs); | |
| 448 | + drm_connector_helper_add(connector, &msm_hdmi_connector_helper_funcs); | |
| 449 | 449 | |
| 450 | 450 | connector->polled = DRM_CONNECTOR_POLL_CONNECT | |
| 451 | 451 | DRM_CONNECTOR_POLL_DISCONNECT; |
| @@ -84,7 +84,7 @@ struct hdmi_hdcp_ctrl { · 83 unmodified lines | ||
| 84 | 84 | bool max_dev_exceeded; |
| 85 | 85 | }; |
| 86 | 86 | |
| 87 | −static int hdmi_ddc_read(struct hdmi *hdmi, u16 addr, u8 offset, | |
| 87 | +static int msm_hdmi_ddc_read(struct hdmi *hdmi, u16 addr, u8 offset, | |
| 88 | 88 | u8 *data, u16 data_len) |
| 89 | 89 | { |
| 90 | 90 | int rc; |
| @@ -122,7 +122,7 @@ retry: · 31 unmodified lines | ||
| 122 | 122 | |
| 123 | 123 | #define HDCP_DDC_WRITE_MAX_BYTE_NUM 32 |
| 124 | 124 | |
| 125 | −static int hdmi_ddc_write(struct hdmi *hdmi, u16 addr, u8 offset, | |
| 125 | +static int msm_hdmi_ddc_write(struct hdmi *hdmi, u16 addr, u8 offset, | |
| 126 | 126 | u8 *data, u16 data_len) |
| 127 | 127 | { |
| 128 | 128 | int rc; |
| @@ -162,7 +162,7 @@ retry: · 33 unmodified lines | ||
| 162 | 162 | return rc; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | −static int hdmi_hdcp_scm_wr(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 *preg, | |
| 165 | +static int msm_hdmi_hdcp_scm_wr(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 *preg, | |
| 166 | 166 | u32 *pdata, u32 count) |
| 167 | 167 | { |
| 168 | 168 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -202,7 +202,7 @@ static int hdmi_hdcp_scm_wr(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 *preg, · 33 unmodified lines | ||
| 202 | 202 | return ret; |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | −void hdmi_hdcp_irq(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 205 | +void msm_hdmi_hdcp_irq(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 206 | 206 | { |
| 207 | 207 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 208 | 208 | u32 reg_val, hdcp_int_status; |
| @@ -247,7 +247,7 @@ void hdmi_hdcp_irq(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 38 unmodified lines | ||
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | −static int hdmi_hdcp_msleep(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 ms, u32 ev) | |
| 250 | +static int msm_hdmi_hdcp_msleep(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 ms, u32 ev) | |
| 251 | 251 | { |
| 252 | 252 | int rc; |
| 253 | 253 | |
| @@ -264,7 +264,7 @@ static int hdmi_hdcp_msleep(struct hdmi_hdcp_ctrl *hdcp_ctrl, u32 ms, u32 ev) · 10 unmodified lines | ||
| 264 | 264 | return 0; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | −static int hdmi_hdcp_read_validate_aksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 267 | +static int msm_hdmi_hdcp_read_validate_aksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 268 | 268 | { |
| 269 | 269 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 270 | 270 | |
| @@ -287,7 +287,7 @@ static int hdmi_hdcp_read_validate_aksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 16 unmodified lines | ||
| 287 | 287 | return 0; |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | −static int reset_hdcp_ddc_failures(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 290 | +static int msm_reset_hdcp_ddc_failures(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 291 | 291 | { |
| 292 | 292 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 293 | 293 | u32 reg_val, failure, nack0; |
| @@ -337,7 +337,7 @@ static int reset_hdcp_ddc_failures(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 43 unmodified lines | ||
| 337 | 337 | reg_val |= HDMI_DDC_CTRL_SW_STATUS_RESET; |
| 338 | 338 | hdmi_write(hdmi, REG_HDMI_DDC_CTRL, reg_val); |
| 339 | 339 | |
| 340 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 340 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 341 | 341 | |
| 342 | 342 | reg_val = hdmi_read(hdmi, REG_HDMI_DDC_CTRL); |
| 343 | 343 | reg_val &= ~HDMI_DDC_CTRL_SW_STATUS_RESET; |
| @@ -350,7 +350,7 @@ static int reset_hdcp_ddc_failures(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 6 unmodified lines | ||
| 350 | 350 | |
| 351 | 351 | /* If previous msleep is aborted, skip this msleep */ |
| 352 | 352 | if (!rc) |
| 353 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 353 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 354 | 354 | |
| 355 | 355 | reg_val = hdmi_read(hdmi, REG_HDMI_DDC_CTRL); |
| 356 | 356 | reg_val &= ~HDMI_DDC_CTRL_SOFT_RESET; |
| @@ -362,7 +362,7 @@ static int reset_hdcp_ddc_failures(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 5 unmodified lines | ||
| 362 | 362 | return rc; |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | −static int hdmi_hdcp_hw_ddc_clean(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 365 | +static int msm_hdmi_hdcp_hw_ddc_clean(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 366 | 366 | { |
| 367 | 367 | int rc; |
| 368 | 368 | u32 hdcp_ddc_status, ddc_hw_status; |
| @@ -394,7 +394,7 @@ static int hdmi_hdcp_hw_ddc_clean(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 25 unmodified lines | ||
| 394 | 394 | return -ETIMEDOUT; |
| 395 | 395 | } |
| 396 | 396 | |
| 397 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 397 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 398 | 398 | if (rc) |
| 399 | 399 | return rc; |
| 400 | 400 | } while (1); |
| @@ -402,7 +402,7 @@ static int hdmi_hdcp_hw_ddc_clean(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 402 | 402 | return 0; |
| 403 | 403 | } |
| 404 | 404 | |
| 405 | −static void hdmi_hdcp_reauth_work(struct work_struct *work) | |
| 405 | +static void msm_hdmi_hdcp_reauth_work(struct work_struct *work) | |
| 406 | 406 | { |
| 407 | 407 | struct hdmi_hdcp_ctrl *hdcp_ctrl = container_of(work, |
| 408 | 408 | struct hdmi_hdcp_ctrl, hdcp_reauth_work); |
| @@ -430,7 +430,7 @@ static void hdmi_hdcp_reauth_work(struct work_struct *work) · 21 unmodified lines | ||
| 430 | 430 | HDMI_HDCP_RESET_LINK0_DEAUTHENTICATE); |
| 431 | 431 | |
| 432 | 432 | /* Wait to be clean on DDC HW engine */ |
| 433 | − if (hdmi_hdcp_hw_ddc_clean(hdcp_ctrl)) { | |
| 433 | + if (msm_hdmi_hdcp_hw_ddc_clean(hdcp_ctrl)) { | |
| 434 | 434 | pr_info("%s: reauth work aborted\n", __func__); |
| 435 | 435 | return; |
| 436 | 436 | } |
| @@ -461,7 +461,7 @@ static void hdmi_hdcp_reauth_work(struct work_struct *work) · 24 unmodified lines | ||
| 461 | 461 | queue_work(hdmi->workq, &hdcp_ctrl->hdcp_auth_work); |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | −static int hdmi_hdcp_auth_prepare(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 464 | +static int msm_hdmi_hdcp_auth_prepare(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 465 | 465 | { |
| 466 | 466 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 467 | 467 | u32 link0_status; |
| @@ -470,7 +470,7 @@ static int hdmi_hdcp_auth_prepare(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 2 unmodified lines | ||
| 470 | 470 | int rc; |
| 471 | 471 | |
| 472 | 472 | if (!hdcp_ctrl->aksv_valid) { |
| 473 | − rc = hdmi_hdcp_read_validate_aksv(hdcp_ctrl); | |
| 473 | + rc = msm_hdmi_hdcp_read_validate_aksv(hdcp_ctrl); | |
| 474 | 474 | if (rc) { |
| 475 | 475 | pr_err("%s: ASKV validation failed\n", __func__); |
| 476 | 476 | hdcp_ctrl->hdcp_state = HDCP_STATE_NO_AKSV; |
| @@ -538,12 +538,12 @@ static int hdmi_hdcp_auth_prepare(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 61 unmodified lines | ||
| 538 | 538 | DBG("An not ready after enabling HDCP"); |
| 539 | 539 | |
| 540 | 540 | /* Clear any DDC failures from previous tries before enable HDCP*/ |
| 541 | − rc = reset_hdcp_ddc_failures(hdcp_ctrl); | |
| 541 | + rc = msm_reset_hdcp_ddc_failures(hdcp_ctrl); | |
| 542 | 542 | |
| 543 | 543 | return rc; |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | −static void hdmi_hdcp_auth_fail(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 546 | +static void msm_hdmi_hdcp_auth_fail(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 547 | 547 | { |
| 548 | 548 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 549 | 549 | u32 reg_val; |
| @@ -561,7 +561,7 @@ static void hdmi_hdcp_auth_fail(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 11 unmodified lines | ||
| 561 | 561 | queue_work(hdmi->workq, &hdcp_ctrl->hdcp_reauth_work); |
| 562 | 562 | } |
| 563 | 563 | |
| 564 | −static void hdmi_hdcp_auth_done(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 564 | +static void msm_hdmi_hdcp_auth_done(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 565 | 565 | { |
| 566 | 566 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 567 | 567 | u32 reg_val; |
| @@ -596,7 +596,7 @@ static void hdmi_hdcp_auth_done(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 28 unmodified lines | ||
| 596 | 596 | * Write An and AKSV to sink |
| 597 | 597 | * Read BKSV from sink and write into HDCP engine |
| 598 | 598 | */ |
| 599 | −static int hdmi_hdcp_wait_key_an_ready(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 599 | +static int msm_hdmi_hdcp_wait_key_an_ready(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 600 | 600 | { |
| 601 | 601 | int rc; |
| 602 | 602 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -621,7 +621,7 @@ static int hdmi_hdcp_wait_key_an_ready(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 18 unmodified lines | ||
| 621 | 621 | return -ETIMEDOUT; |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 624 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 625 | 625 | if (rc) |
| 626 | 626 | return rc; |
| 627 | 627 | } while (1); |
| @@ -643,7 +643,7 @@ static int hdmi_hdcp_wait_key_an_ready(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 15 unmodified lines | ||
| 643 | 643 | return -ETIMEDOUT; |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 646 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 647 | 647 | if (rc) |
| 648 | 648 | return rc; |
| 649 | 649 | } while (1); |
| @@ -651,7 +651,7 @@ static int hdmi_hdcp_wait_key_an_ready(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 651 | 651 | return 0; |
| 652 | 652 | } |
| 653 | 653 | |
| 654 | −static int hdmi_hdcp_send_aksv_an(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 654 | +static int msm_hdmi_hdcp_send_aksv_an(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 655 | 655 | { |
| 656 | 656 | int rc = 0; |
| 657 | 657 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -676,7 +676,7 @@ static int hdmi_hdcp_send_aksv_an(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 18 unmodified lines | ||
| 676 | 676 | aksv[4] = link0_aksv_1 & 0xFF; |
| 677 | 677 | |
| 678 | 678 | /* Write An to offset 0x18 */ |
| 679 | − rc = hdmi_ddc_write(hdmi, HDCP_PORT_ADDR, 0x18, (u8 *)link0_an, | |
| 679 | + rc = msm_hdmi_ddc_write(hdmi, HDCP_PORT_ADDR, 0x18, (u8 *)link0_an, | |
| 680 | 680 | (u16)sizeof(link0_an)); |
| 681 | 681 | if (rc) { |
| 682 | 682 | pr_err("%s:An write failed\n", __func__); |
| @@ -685,7 +685,7 @@ static int hdmi_hdcp_send_aksv_an(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 2 unmodified lines | ||
| 685 | 685 | DBG("Link0-An=%08x%08x", link0_an[0], link0_an[1]); |
| 686 | 686 | |
| 687 | 687 | /* Write AKSV to offset 0x10 */ |
| 688 | − rc = hdmi_ddc_write(hdmi, HDCP_PORT_ADDR, 0x10, aksv, 5); | |
| 688 | + rc = msm_hdmi_ddc_write(hdmi, HDCP_PORT_ADDR, 0x10, aksv, 5); | |
| 689 | 689 | if (rc) { |
| 690 | 690 | pr_err("%s:AKSV write failed\n", __func__); |
| 691 | 691 | return rc; |
| @@ -695,7 +695,7 @@ static int hdmi_hdcp_send_aksv_an(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 3 unmodified lines | ||
| 695 | 695 | return 0; |
| 696 | 696 | } |
| 697 | 697 | |
| 698 | −static int hdmi_hdcp_recv_bksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 698 | +static int msm_hdmi_hdcp_recv_bksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 699 | 699 | { |
| 700 | 700 | int rc = 0; |
| 701 | 701 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -703,7 +703,7 @@ static int hdmi_hdcp_recv_bksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 703 | 703 | u32 reg[2], data[2]; |
| 704 | 704 | |
| 705 | 705 | /* Read BKSV at offset 0x00 */ |
| 706 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x00, bksv, 5); | |
| 706 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x00, bksv, 5); | |
| 707 | 707 | if (rc) { |
| 708 | 708 | pr_err("%s:BKSV read failed\n", __func__); |
| 709 | 709 | return rc; |
| @@ -728,19 +728,19 @@ static int hdmi_hdcp_recv_bksv(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 18 unmodified lines | ||
| 728 | 728 | data[0] = hdcp_ctrl->bksv_lsb; |
| 729 | 729 | reg[1] = REG_HDMI_HDCP_RCVPORT_DATA1; |
| 730 | 730 | data[1] = hdcp_ctrl->bksv_msb; |
| 731 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, 2); | |
| 731 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, 2); | |
| 732 | 732 | |
| 733 | 733 | return rc; |
| 734 | 734 | } |
| 735 | 735 | |
| 736 | −static int hdmi_hdcp_recv_bcaps(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 736 | +static int msm_hdmi_hdcp_recv_bcaps(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 737 | 737 | { |
| 738 | 738 | int rc = 0; |
| 739 | 739 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 740 | 740 | u32 reg, data; |
| 741 | 741 | u8 bcaps; |
| 742 | 742 | |
| 743 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x40, &bcaps, 1); | |
| 743 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x40, &bcaps, 1); | |
| 744 | 744 | if (rc) { |
| 745 | 745 | pr_err("%s:BCAPS read failed\n", __func__); |
| 746 | 746 | return rc; |
| @@ -753,26 +753,26 @@ static int hdmi_hdcp_recv_bcaps(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 6 unmodified lines | ||
| 753 | 753 | /* Write BCAPS to the hardware */ |
| 754 | 754 | reg = REG_HDMI_HDCP_RCVPORT_DATA12; |
| 755 | 755 | data = (u32)bcaps; |
| 756 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 756 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 757 | 757 | |
| 758 | 758 | return rc; |
| 759 | 759 | } |
| 760 | 760 | |
| 761 | −static int hdmi_hdcp_auth_part1_key_exchange(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 761 | +static int msm_hdmi_hdcp_auth_part1_key_exchange(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 762 | 762 | { |
| 763 | 763 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 764 | 764 | unsigned long flags; |
| 765 | 765 | int rc; |
| 766 | 766 | |
| 767 | 767 | /* Wait for AKSV key and An ready */ |
| 768 | − rc = hdmi_hdcp_wait_key_an_ready(hdcp_ctrl); | |
| 768 | + rc = msm_hdmi_hdcp_wait_key_an_ready(hdcp_ctrl); | |
| 769 | 769 | if (rc) { |
| 770 | 770 | pr_err("%s: wait key and an ready failed\n", __func__); |
| 771 | 771 | return rc; |
| 772 | 772 | }; |
| 773 | 773 | |
| 774 | 774 | /* Read BCAPS and send to HDCP engine */ |
| 775 | − rc = hdmi_hdcp_recv_bcaps(hdcp_ctrl); | |
| 775 | + rc = msm_hdmi_hdcp_recv_bcaps(hdcp_ctrl); | |
| 776 | 776 | if (rc) { |
| 777 | 777 | pr_err("%s: read bcaps error, abort\n", __func__); |
| 778 | 778 | return rc; |
| @@ -785,14 +785,14 @@ static int hdmi_hdcp_auth_part1_key_exchange(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 6 unmodified lines | ||
| 785 | 785 | hdmi_write(hdmi, REG_HDMI_HDCP_RCVPORT_DATA4, 0); |
| 786 | 786 | |
| 787 | 787 | /* Send AKSV and An to sink */ |
| 788 | − rc = hdmi_hdcp_send_aksv_an(hdcp_ctrl); | |
| 788 | + rc = msm_hdmi_hdcp_send_aksv_an(hdcp_ctrl); | |
| 789 | 789 | if (rc) { |
| 790 | 790 | pr_err("%s:An/Aksv write failed\n", __func__); |
| 791 | 791 | return rc; |
| 792 | 792 | } |
| 793 | 793 | |
| 794 | 794 | /* Read BKSV and send to HDCP engine*/ |
| 795 | − rc = hdmi_hdcp_recv_bksv(hdcp_ctrl); | |
| 795 | + rc = msm_hdmi_hdcp_recv_bksv(hdcp_ctrl); | |
| 796 | 796 | if (rc) { |
| 797 | 797 | pr_err("%s:BKSV Process failed\n", __func__); |
| 798 | 798 | return rc; |
| @@ -812,7 +812,7 @@ static int hdmi_hdcp_auth_part1_key_exchange(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 13 unmodified lines | ||
| 812 | 812 | } |
| 813 | 813 | |
| 814 | 814 | /* read R0' from sink and pass it to HDCP engine */ |
| 815 | −static int hdmi_hdcp_auth_part1_recv_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 815 | +static int msm_hdmi_hdcp_auth_part1_recv_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 816 | 816 | { |
| 817 | 817 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 818 | 818 | int rc = 0; |
| @@ -822,12 +822,12 @@ static int hdmi_hdcp_auth_part1_recv_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 3 unmodified lines | ||
| 822 | 822 | * HDCP Compliance Test case 1A-01: |
| 823 | 823 | * Wait here at least 100ms before reading R0' |
| 824 | 824 | */ |
| 825 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 125, AUTH_ABORT_EV); | |
| 825 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 125, AUTH_ABORT_EV); | |
| 826 | 826 | if (rc) |
| 827 | 827 | return rc; |
| 828 | 828 | |
| 829 | 829 | /* Read R0' at offset 0x08 */ |
| 830 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x08, buf, 2); | |
| 830 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x08, buf, 2); | |
| 831 | 831 | if (rc) { |
| 832 | 832 | pr_err("%s:R0' read failed\n", __func__); |
| 833 | 833 | return rc; |
| @@ -842,14 +842,14 @@ static int hdmi_hdcp_auth_part1_recv_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 8 unmodified lines | ||
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | /* Wait for authenticating result: R0/R0' are matched or not */ |
| 845 | −static int hdmi_hdcp_auth_part1_verify_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 845 | +static int msm_hdmi_hdcp_auth_part1_verify_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 846 | 846 | { |
| 847 | 847 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 848 | 848 | u32 link0_status; |
| 849 | 849 | int rc; |
| 850 | 850 | |
| 851 | 851 | /* wait for hdcp irq, 10 sec should be long enough */ |
| 852 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 10000, AUTH_RESULT_RDY_EV); | |
| 852 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 10000, AUTH_RESULT_RDY_EV); | |
| 853 | 853 | if (!rc) { |
| 854 | 854 | pr_err("%s: Wait Auth IRQ timeout\n", __func__); |
| 855 | 855 | return -ETIMEDOUT; |
| @@ -869,7 +869,7 @@ static int hdmi_hdcp_auth_part1_verify_r0(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 13 unmodified lines | ||
| 869 | 869 | return 0; |
| 870 | 870 | } |
| 871 | 871 | |
| 872 | −static int hdmi_hdcp_recv_check_bstatus(struct hdmi_hdcp_ctrl *hdcp_ctrl, | |
| 872 | +static int msm_hdmi_hdcp_recv_check_bstatus(struct hdmi_hdcp_ctrl *hdcp_ctrl, | |
| 873 | 873 | u16 *pbstatus) |
| 874 | 874 | { |
| 875 | 875 | int rc; |
| @@ -880,7 +880,7 @@ static int hdmi_hdcp_recv_check_bstatus(struct hdmi_hdcp_ctrl *hdcp_ctrl, · 4 unmodified lines | ||
| 880 | 880 | u8 buf[2]; |
| 881 | 881 | |
| 882 | 882 | /* Read BSTATUS at offset 0x41 */ |
| 883 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x41, buf, 2); | |
| 883 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x41, buf, 2); | |
| 884 | 884 | if (rc) { |
| 885 | 885 | pr_err("%s: BSTATUS read failed\n", __func__); |
| 886 | 886 | goto error; |
| @@ -936,7 +936,7 @@ error: · 49 unmodified lines | ||
| 936 | 936 | return rc; |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | −static int hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( | |
| 939 | +static int msm_hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( | |
| 940 | 940 | struct hdmi_hdcp_ctrl *hdcp_ctrl) |
| 941 | 941 | { |
| 942 | 942 | int rc; |
| @@ -953,7 +953,7 @@ static int hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( · 10 unmodified lines | ||
| 953 | 953 | timeout_count = 100; |
| 954 | 954 | do { |
| 955 | 955 | /* Read BCAPS at offset 0x40 */ |
| 956 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x40, &bcaps, 1); | |
| 956 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x40, &bcaps, 1); | |
| 957 | 957 | if (rc) { |
| 958 | 958 | pr_err("%s: BCAPS read failed\n", __func__); |
| 959 | 959 | return rc; |
| @@ -968,12 +968,12 @@ static int hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( · 8 unmodified lines | ||
| 968 | 968 | return -ETIMEDOUT; |
| 969 | 969 | } |
| 970 | 970 | |
| 971 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 971 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 972 | 972 | if (rc) |
| 973 | 973 | return rc; |
| 974 | 974 | } while (1); |
| 975 | 975 | |
| 976 | − rc = hdmi_hdcp_recv_check_bstatus(hdcp_ctrl, &bstatus); | |
| 976 | + rc = msm_hdmi_hdcp_recv_check_bstatus(hdcp_ctrl, &bstatus); | |
| 977 | 977 | if (rc) { |
| 978 | 978 | pr_err("%s: bstatus error\n", __func__); |
| 979 | 979 | return rc; |
| @@ -982,7 +982,7 @@ static int hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( · 2 unmodified lines | ||
| 982 | 982 | /* Write BSTATUS and BCAPS to HDCP registers */ |
| 983 | 983 | reg = REG_HDMI_HDCP_RCVPORT_DATA12; |
| 984 | 984 | data = bcaps | (bstatus << 8); |
| 985 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 985 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 986 | 986 | if (rc) { |
| 987 | 987 | pr_err("%s: BSTATUS write failed\n", __func__); |
| 988 | 988 | return rc; |
| @@ -997,7 +997,7 @@ static int hdmi_hdcp_auth_part2_wait_ksv_fifo_ready( · 8 unmodified lines | ||
| 997 | 997 | * transfer V' from sink to HDCP engine |
| 998 | 998 | * reset SHA engine |
| 999 | 999 | */ |
| 1000 | −static int hdmi_hdcp_transfer_v_h(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1000 | +static int msm_hdmi_hdcp_transfer_v_h(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1001 | 1001 | { |
| 1002 | 1002 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 1003 | 1003 | int rc = 0; |
| @@ -1016,7 +1016,7 @@ static int hdmi_hdcp_transfer_v_h(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 12 unmodified lines | ||
| 1016 | 1016 | |
| 1017 | 1017 | for (i = 0; i < size; i++) { |
| 1018 | 1018 | rd = ®_data[i]; |
| 1019 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, | |
| 1019 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, | |
| 1020 | 1020 | rd->off, (u8 *)&data[i], (u16)sizeof(data[i])); |
| 1021 | 1021 | if (rc) { |
| 1022 | 1022 | pr_err("%s: Read %s failed\n", __func__, rd->name); |
| @@ -1027,13 +1027,13 @@ static int hdmi_hdcp_transfer_v_h(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 4 unmodified lines | ||
| 1027 | 1027 | reg[i] = reg_data[i].reg_id; |
| 1028 | 1028 | } |
| 1029 | 1029 | |
| 1030 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, size); | |
| 1030 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, size); | |
| 1031 | 1031 | |
| 1032 | 1032 | error: |
| 1033 | 1033 | return rc; |
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | −static int hdmi_hdcp_recv_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1036 | +static int msm_hdmi_hdcp_recv_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1037 | 1037 | { |
| 1038 | 1038 | int rc; |
| 1039 | 1039 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -1041,7 +1041,7 @@ static int hdmi_hdcp_recv_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 1041 | 1041 | |
| 1042 | 1042 | ksv_bytes = 5 * hdcp_ctrl->dev_count; |
| 1043 | 1043 | |
| 1044 | − rc = hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x43, | |
| 1044 | + rc = msm_hdmi_ddc_read(hdmi, HDCP_PORT_ADDR, 0x43, | |
| 1045 | 1045 | hdcp_ctrl->ksv_list, ksv_bytes); |
| 1046 | 1046 | if (rc) |
| 1047 | 1047 | pr_err("%s: KSV FIFO read failed\n", __func__); |
| @@ -1049,7 +1049,7 @@ static int hdmi_hdcp_recv_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 1049 | 1049 | return rc; |
| 1050 | 1050 | } |
| 1051 | 1051 | |
| 1052 | −static int hdmi_hdcp_reset_sha_engine(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1052 | +static int msm_hdmi_hdcp_reset_sha_engine(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1053 | 1053 | { |
| 1054 | 1054 | u32 reg[2], data[2]; |
| 1055 | 1055 | u32 rc = 0; |
| @@ -1059,12 +1059,12 @@ static int hdmi_hdcp_reset_sha_engine(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 3 unmodified lines | ||
| 1059 | 1059 | reg[1] = REG_HDMI_HDCP_SHA_CTRL; |
| 1060 | 1060 | data[1] = HDCP_REG_DISABLE; |
| 1061 | 1061 | |
| 1062 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, 2); | |
| 1062 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, reg, data, 2); | |
| 1063 | 1063 | |
| 1064 | 1064 | return rc; |
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | −static int hdmi_hdcp_auth_part2_recv_ksv_fifo( | |
| 1067 | +static int msm_hdmi_hdcp_auth_part2_recv_ksv_fifo( | |
| 1068 | 1068 | struct hdmi_hdcp_ctrl *hdcp_ctrl) |
| 1069 | 1069 | { |
| 1070 | 1070 | int rc; |
| @@ -1081,7 +1081,7 @@ static int hdmi_hdcp_auth_part2_recv_ksv_fifo( · 10 unmodified lines | ||
| 1081 | 1081 | */ |
| 1082 | 1082 | timeout_count = 100; |
| 1083 | 1083 | do { |
| 1084 | − rc = hdmi_hdcp_recv_ksv_fifo(hdcp_ctrl); | |
| 1084 | + rc = msm_hdmi_hdcp_recv_ksv_fifo(hdcp_ctrl); | |
| 1085 | 1085 | if (!rc) |
| 1086 | 1086 | break; |
| 1087 | 1087 | |
| @@ -1091,19 +1091,19 @@ static int hdmi_hdcp_auth_part2_recv_ksv_fifo( · 3 unmodified lines | ||
| 1091 | 1091 | return -ETIMEDOUT; |
| 1092 | 1092 | } |
| 1093 | 1093 | |
| 1094 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 25, AUTH_ABORT_EV); | |
| 1094 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 25, AUTH_ABORT_EV); | |
| 1095 | 1095 | if (rc) |
| 1096 | 1096 | return rc; |
| 1097 | 1097 | } while (1); |
| 1098 | 1098 | |
| 1099 | − rc = hdmi_hdcp_transfer_v_h(hdcp_ctrl); | |
| 1099 | + rc = msm_hdmi_hdcp_transfer_v_h(hdcp_ctrl); | |
| 1100 | 1100 | if (rc) { |
| 1101 | 1101 | pr_err("%s: transfer V failed\n", __func__); |
| 1102 | 1102 | return rc; |
| 1103 | 1103 | } |
| 1104 | 1104 | |
| 1105 | 1105 | /* reset SHA engine before write ksv fifo */ |
| 1106 | − rc = hdmi_hdcp_reset_sha_engine(hdcp_ctrl); | |
| 1106 | + rc = msm_hdmi_hdcp_reset_sha_engine(hdcp_ctrl); | |
| 1107 | 1107 | if (rc) { |
| 1108 | 1108 | pr_err("%s: fail to reset sha engine\n", __func__); |
| 1109 | 1109 | return rc; |
| @@ -1120,7 +1120,7 @@ static int hdmi_hdcp_auth_part2_recv_ksv_fifo( · 10 unmodified lines | ||
| 1120 | 1120 | * If the last byte is written, we need to poll for |
| 1121 | 1121 | * HDCP_SHA_COMP_DONE to wait until HW finish |
| 1122 | 1122 | */ |
| 1123 | −static int hdmi_hdcp_write_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1123 | +static int msm_hdmi_hdcp_write_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1124 | 1124 | { |
| 1125 | 1125 | int i; |
| 1126 | 1126 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -1169,7 +1169,7 @@ static int hdmi_hdcp_write_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 42 unmodified lines | ||
| 1169 | 1169 | |
| 1170 | 1170 | reg = REG_HDMI_HDCP_SHA_DATA; |
| 1171 | 1171 | data = reg_val; |
| 1172 | − rc = hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 1172 | + rc = msm_hdmi_hdcp_scm_wr(hdcp_ctrl, ®, &data, 1); | |
| 1173 | 1173 | |
| 1174 | 1174 | if (rc) |
| 1175 | 1175 | return rc; |
| @@ -1184,7 +1184,7 @@ static int hdmi_hdcp_write_ksv_fifo(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 8 unmodified lines | ||
| 1184 | 1184 | } |
| 1185 | 1185 | |
| 1186 | 1186 | /* write ksv fifo into HDCP engine */ |
| 1187 | −static int hdmi_hdcp_auth_part2_write_ksv_fifo( | |
| 1187 | +static int msm_hdmi_hdcp_auth_part2_write_ksv_fifo( | |
| 1188 | 1188 | struct hdmi_hdcp_ctrl *hdcp_ctrl) |
| 1189 | 1189 | { |
| 1190 | 1190 | int rc; |
| @@ -1193,7 +1193,7 @@ static int hdmi_hdcp_auth_part2_write_ksv_fifo( · 2 unmodified lines | ||
| 1193 | 1193 | hdcp_ctrl->ksv_fifo_w_index = 0; |
| 1194 | 1194 | timeout_count = 100; |
| 1195 | 1195 | do { |
| 1196 | − rc = hdmi_hdcp_write_ksv_fifo(hdcp_ctrl); | |
| 1196 | + rc = msm_hdmi_hdcp_write_ksv_fifo(hdcp_ctrl); | |
| 1197 | 1197 | if (!rc) |
| 1198 | 1198 | break; |
| 1199 | 1199 | |
| @@ -1206,7 +1206,7 @@ static int hdmi_hdcp_auth_part2_write_ksv_fifo( · 6 unmodified lines | ||
| 1206 | 1206 | return -ETIMEDOUT; |
| 1207 | 1207 | } |
| 1208 | 1208 | |
| 1209 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 1209 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 1210 | 1210 | if (rc) |
| 1211 | 1211 | return rc; |
| 1212 | 1212 | } while (1); |
| @@ -1214,7 +1214,7 @@ static int hdmi_hdcp_auth_part2_write_ksv_fifo( · 1 unmodified line | ||
| 1214 | 1214 | return 0; |
| 1215 | 1215 | } |
| 1216 | 1216 | |
| 1217 | −static int hdmi_hdcp_auth_part2_check_v_match(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1217 | +static int msm_hdmi_hdcp_auth_part2_check_v_match(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1218 | 1218 | { |
| 1219 | 1219 | int rc = 0; |
| 1220 | 1220 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| @@ -1232,7 +1232,7 @@ static int hdmi_hdcp_auth_part2_check_v_match(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 11 unmodified lines | ||
| 1232 | 1232 | return -ETIMEDOUT; |
| 1233 | 1233 | } |
| 1234 | 1234 | |
| 1235 | − rc = hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 1235 | + rc = msm_hdmi_hdcp_msleep(hdcp_ctrl, 20, AUTH_ABORT_EV); | |
| 1236 | 1236 | if (rc) |
| 1237 | 1237 | return rc; |
| 1238 | 1238 | } while (1); |
| @@ -1240,32 +1240,32 @@ static int hdmi_hdcp_auth_part2_check_v_match(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 1 unmodified line | ||
| 1240 | 1240 | return 0; |
| 1241 | 1241 | } |
| 1242 | 1242 | |
| 1243 | −static void hdmi_hdcp_auth_work(struct work_struct *work) | |
| 1243 | +static void msm_hdmi_hdcp_auth_work(struct work_struct *work) | |
| 1244 | 1244 | { |
| 1245 | 1245 | struct hdmi_hdcp_ctrl *hdcp_ctrl = container_of(work, |
| 1246 | 1246 | struct hdmi_hdcp_ctrl, hdcp_auth_work); |
| 1247 | 1247 | int rc; |
| 1248 | 1248 | |
| 1249 | − rc = hdmi_hdcp_auth_prepare(hdcp_ctrl); | |
| 1249 | + rc = msm_hdmi_hdcp_auth_prepare(hdcp_ctrl); | |
| 1250 | 1250 | if (rc) { |
| 1251 | 1251 | pr_err("%s: auth prepare failed %d\n", __func__, rc); |
| 1252 | 1252 | goto end; |
| 1253 | 1253 | } |
| 1254 | 1254 | |
| 1255 | 1255 | /* HDCP PartI */ |
| 1256 | − rc = hdmi_hdcp_auth_part1_key_exchange(hdcp_ctrl); | |
| 1256 | + rc = msm_hdmi_hdcp_auth_part1_key_exchange(hdcp_ctrl); | |
| 1257 | 1257 | if (rc) { |
| 1258 | 1258 | pr_err("%s: key exchange failed %d\n", __func__, rc); |
| 1259 | 1259 | goto end; |
| 1260 | 1260 | } |
| 1261 | 1261 | |
| 1262 | − rc = hdmi_hdcp_auth_part1_recv_r0(hdcp_ctrl); | |
| 1262 | + rc = msm_hdmi_hdcp_auth_part1_recv_r0(hdcp_ctrl); | |
| 1263 | 1263 | if (rc) { |
| 1264 | 1264 | pr_err("%s: receive r0 failed %d\n", __func__, rc); |
| 1265 | 1265 | goto end; |
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | − rc = hdmi_hdcp_auth_part1_verify_r0(hdcp_ctrl); | |
| 1268 | + rc = msm_hdmi_hdcp_auth_part1_verify_r0(hdcp_ctrl); | |
| 1269 | 1269 | if (rc) { |
| 1270 | 1270 | pr_err("%s: verify r0 failed %d\n", __func__, rc); |
| 1271 | 1271 | goto end; |
| @@ -1275,25 +1275,25 @@ static void hdmi_hdcp_auth_work(struct work_struct *work) · 3 unmodified lines | ||
| 1275 | 1275 | goto end; |
| 1276 | 1276 | |
| 1277 | 1277 | /* HDCP PartII */ |
| 1278 | − rc = hdmi_hdcp_auth_part2_wait_ksv_fifo_ready(hdcp_ctrl); | |
| 1278 | + rc = msm_hdmi_hdcp_auth_part2_wait_ksv_fifo_ready(hdcp_ctrl); | |
| 1279 | 1279 | if (rc) { |
| 1280 | 1280 | pr_err("%s: wait ksv fifo ready failed %d\n", __func__, rc); |
| 1281 | 1281 | goto end; |
| 1282 | 1282 | } |
| 1283 | 1283 | |
| 1284 | − rc = hdmi_hdcp_auth_part2_recv_ksv_fifo(hdcp_ctrl); | |
| 1284 | + rc = msm_hdmi_hdcp_auth_part2_recv_ksv_fifo(hdcp_ctrl); | |
| 1285 | 1285 | if (rc) { |
| 1286 | 1286 | pr_err("%s: recv ksv fifo failed %d\n", __func__, rc); |
| 1287 | 1287 | goto end; |
| 1288 | 1288 | } |
| 1289 | 1289 | |
| 1290 | − rc = hdmi_hdcp_auth_part2_write_ksv_fifo(hdcp_ctrl); | |
| 1290 | + rc = msm_hdmi_hdcp_auth_part2_write_ksv_fifo(hdcp_ctrl); | |
| 1291 | 1291 | if (rc) { |
| 1292 | 1292 | pr_err("%s: write ksv fifo failed %d\n", __func__, rc); |
| 1293 | 1293 | goto end; |
| 1294 | 1294 | } |
| 1295 | 1295 | |
| 1296 | − rc = hdmi_hdcp_auth_part2_check_v_match(hdcp_ctrl); | |
| 1296 | + rc = msm_hdmi_hdcp_auth_part2_check_v_match(hdcp_ctrl); | |
| 1297 | 1297 | if (rc) |
| 1298 | 1298 | pr_err("%s: check v match failed %d\n", __func__, rc); |
| 1299 | 1299 | |
| @@ -1304,13 +1304,13 @@ end: · 4 unmodified lines | ||
| 1304 | 1304 | pr_info("%s: hdcp is not supported\n", __func__); |
| 1305 | 1305 | } else if (rc) { |
| 1306 | 1306 | pr_err("%s: hdcp authentication failed\n", __func__); |
| 1307 | − hdmi_hdcp_auth_fail(hdcp_ctrl); | |
| 1307 | + msm_hdmi_hdcp_auth_fail(hdcp_ctrl); | |
| 1308 | 1308 | } else { |
| 1309 | − hdmi_hdcp_auth_done(hdcp_ctrl); | |
| 1309 | + msm_hdmi_hdcp_auth_done(hdcp_ctrl); | |
| 1310 | 1310 | } |
| 1311 | 1311 | } |
| 1312 | 1312 | |
| 1313 | −void hdmi_hdcp_on(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1313 | +void msm_hdmi_hdcp_on(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1314 | 1314 | { |
| 1315 | 1315 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 1316 | 1316 | u32 reg_val; |
| @@ -1335,7 +1335,7 @@ void hdmi_hdcp_on(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 18 unmodified lines | ||
| 1335 | 1335 | queue_work(hdmi->workq, &hdcp_ctrl->hdcp_auth_work); |
| 1336 | 1336 | } |
| 1337 | 1337 | |
| 1338 | −void hdmi_hdcp_off(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1338 | +void msm_hdmi_hdcp_off(struct hdmi_hdcp_ctrl *hdcp_ctrl) | |
| 1339 | 1339 | { |
| 1340 | 1340 | struct hdmi *hdmi = hdcp_ctrl->hdmi; |
| 1341 | 1341 | unsigned long flags; |
| @@ -1399,7 +1399,7 @@ void hdmi_hdcp_off(struct hdmi_hdcp_ctrl *hdcp_ctrl) · 57 unmodified lines | ||
| 1399 | 1399 | DBG("HDCP: Off"); |
| 1400 | 1400 | } |
| 1401 | 1401 | |
| 1402 | −struct hdmi_hdcp_ctrl *hdmi_hdcp_init(struct hdmi *hdmi) | |
| 1402 | +struct hdmi_hdcp_ctrl *msm_hdmi_hdcp_init(struct hdmi *hdmi) | |
| 1403 | 1403 | { |
| 1404 | 1404 | struct hdmi_hdcp_ctrl *hdcp_ctrl = NULL; |
| 1405 | 1405 | |
| @@ -1413,8 +1413,8 @@ struct hdmi_hdcp_ctrl *hdmi_hdcp_init(struct hdmi *hdmi) · 7 unmodified lines | ||
| 1413 | 1413 | if (!hdcp_ctrl) |
| 1414 | 1414 | return ERR_PTR(-ENOMEM); |
| 1415 | 1415 | |
| 1416 | − INIT_WORK(&hdcp_ctrl->hdcp_auth_work, hdmi_hdcp_auth_work); | |
| 1417 | − INIT_WORK(&hdcp_ctrl->hdcp_reauth_work, hdmi_hdcp_reauth_work); | |
| 1416 | + INIT_WORK(&hdcp_ctrl->hdcp_auth_work, msm_hdmi_hdcp_auth_work); | |
| 1417 | + INIT_WORK(&hdcp_ctrl->hdcp_reauth_work, msm_hdmi_hdcp_reauth_work); | |
| 1418 | 1418 | init_waitqueue_head(&hdcp_ctrl->auth_event_queue); |
| 1419 | 1419 | hdcp_ctrl->hdmi = hdmi; |
| 1420 | 1420 | hdcp_ctrl->hdcp_state = HDCP_STATE_INACTIVE; |
| @@ -1428,7 +1428,7 @@ struct hdmi_hdcp_ctrl *hdmi_hdcp_init(struct hdmi *hdmi) · 7 unmodified lines | ||
| 1428 | 1428 | return hdcp_ctrl; |
| 1429 | 1429 | } |
| 1430 | 1430 | |
| 1431 | −void hdmi_hdcp_destroy(struct hdmi *hdmi) | |
| 1431 | +void msm_hdmi_hdcp_destroy(struct hdmi *hdmi) | |
| 1432 | 1432 | { |
| 1433 | 1433 | if (hdmi && hdmi->hdcp_ctrl) { |
| 1434 | 1434 | kfree(hdmi->hdcp_ctrl); |
| @@ -97,7 +97,7 @@ static bool sw_done(struct hdmi_i2c_adapter *hdmi_i2c) · 96 unmodified lines | ||
| 97 | 97 | return hdmi_i2c->sw_done; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | −static int hdmi_i2c_xfer(struct i2c_adapter *i2c, | |
| 100 | +static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, | |
| 101 | 101 | struct i2c_msg *msgs, int num) |
| 102 | 102 | { |
| 103 | 103 | struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c); |
| @@ -216,17 +216,17 @@ static int hdmi_i2c_xfer(struct i2c_adapter *i2c, · 112 unmodified lines | ||
| 216 | 216 | return i; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | −static u32 hdmi_i2c_func(struct i2c_adapter *adapter) | |
| 219 | +static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter) | |
| 220 | 220 | { |
| 221 | 221 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | −static const struct i2c_algorithm hdmi_i2c_algorithm = { | |
| 225 | − .master_xfer = hdmi_i2c_xfer, | |
| 226 | − .functionality = hdmi_i2c_func, | |
| 224 | +static const struct i2c_algorithm msm_hdmi_i2c_algorithm = { | |
| 225 | + .master_xfer = msm_hdmi_i2c_xfer, | |
| 226 | + .functionality = msm_hdmi_i2c_func, | |
| 227 | 227 | }; |
| 228 | 228 | |
| 229 | −void hdmi_i2c_irq(struct i2c_adapter *i2c) | |
| 229 | +void msm_hdmi_i2c_irq(struct i2c_adapter *i2c) | |
| 230 | 230 | { |
| 231 | 231 | struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c); |
| 232 | 232 | |
| @@ -234,14 +234,14 @@ void hdmi_i2c_irq(struct i2c_adapter *i2c) · 1 unmodified line | ||
| 234 | 234 | wake_up_all(&hdmi_i2c->ddc_event); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | −void hdmi_i2c_destroy(struct i2c_adapter *i2c) | |
| 237 | +void msm_hdmi_i2c_destroy(struct i2c_adapter *i2c) | |
| 238 | 238 | { |
| 239 | 239 | struct hdmi_i2c_adapter *hdmi_i2c = to_hdmi_i2c_adapter(i2c); |
| 240 | 240 | i2c_del_adapter(i2c); |
| 241 | 241 | kfree(hdmi_i2c); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | −struct i2c_adapter *hdmi_i2c_init(struct hdmi *hdmi) | |
| 244 | +struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi) | |
| 245 | 245 | { |
| 246 | 246 | struct drm_device *dev = hdmi->dev; |
| 247 | 247 | struct hdmi_i2c_adapter *hdmi_i2c; |
| @@ -264,7 +264,7 @@ struct i2c_adapter *hdmi_i2c_init(struct hdmi *hdmi) · 16 unmodified lines | ||
| 264 | 264 | i2c->class = I2C_CLASS_DDC; |
| 265 | 265 | snprintf(i2c->name, sizeof(i2c->name), "msm hdmi i2c"); |
| 266 | 266 | i2c->dev.parent = &hdmi->pdev->dev; |
| 267 | − i2c->algo = &hdmi_i2c_algorithm; | |
| 267 | + i2c->algo = &msm_hdmi_i2c_algorithm; | |
| 268 | 268 | |
| 269 | 269 | ret = i2c_add_adapter(i2c); |
| 270 | 270 | if (ret) { |
| @@ -276,6 +276,6 @@ struct i2c_adapter *hdmi_i2c_init(struct hdmi *hdmi) · 5 unmodified lines | ||
| 276 | 276 | |
| 277 | 277 | fail: |
| 278 | 278 | if (i2c) |
| 279 | − hdmi_i2c_destroy(i2c); | |
| 279 | + msm_hdmi_i2c_destroy(i2c); | |
| 280 | 280 | return ERR_PTR(ret); |
| 281 | 281 | } |
| @@ -15,7 +15,7 @@ · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | #include "hdmi.h" |
| 17 | 17 | |
| 18 | −static int hdmi_phy_resource_init(struct hdmi_phy *phy) | |
| 18 | +static int msm_hdmi_phy_resource_init(struct hdmi_phy *phy) | |
| 19 | 19 | { |
| 20 | 20 | struct hdmi_phy_cfg *cfg = phy->cfg; |
| 21 | 21 | struct device *dev = &phy->pdev->dev; |
| @@ -62,7 +62,7 @@ static int hdmi_phy_resource_init(struct hdmi_phy *phy) · 40 unmodified lines | ||
| 62 | 62 | return 0; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | −int hdmi_phy_resource_enable(struct hdmi_phy *phy) | |
| 65 | +int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy) | |
| 66 | 66 | { |
| 67 | 67 | struct hdmi_phy_cfg *cfg = phy->cfg; |
| 68 | 68 | struct device *dev = &phy->pdev->dev; |
| @@ -87,7 +87,7 @@ int hdmi_phy_resource_enable(struct hdmi_phy *phy) · 18 unmodified lines | ||
| 87 | 87 | return ret; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | −void hdmi_phy_resource_disable(struct hdmi_phy *phy) | |
| 90 | +void msm_hdmi_phy_resource_disable(struct hdmi_phy *phy) | |
| 91 | 91 | { |
| 92 | 92 | struct hdmi_phy_cfg *cfg = phy->cfg; |
| 93 | 93 | struct device *dev = &phy->pdev->dev; |
| @@ -102,7 +102,7 @@ void hdmi_phy_resource_disable(struct hdmi_phy *phy) · 8 unmodified lines | ||
| 102 | 102 | pm_runtime_put_sync(dev); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | −void hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock) | |
| 105 | +void msm_hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock) | |
| 106 | 106 | { |
| 107 | 107 | if (!phy || !phy->cfg->powerup) |
| 108 | 108 | return; |
| @@ -110,7 +110,7 @@ void hdmi_phy_powerup(struct hdmi_phy *phy, unsigned long int pixclock) · 1 unmodified line | ||
| 110 | 110 | phy->cfg->powerup(phy, pixclock); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | −void hdmi_phy_powerdown(struct hdmi_phy *phy) | |
| 113 | +void msm_hdmi_phy_powerdown(struct hdmi_phy *phy) | |
| 114 | 114 | { |
| 115 | 115 | if (!phy || !phy->cfg->powerdown) |
| 116 | 116 | return; |
| @@ -118,17 +118,17 @@ void hdmi_phy_powerdown(struct hdmi_phy *phy) · 1 unmodified line | ||
| 118 | 118 | phy->cfg->powerdown(phy); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | −static int hdmi_phy_pll_init(struct platform_device *pdev, | |
| 121 | +static int msm_hdmi_phy_pll_init(struct platform_device *pdev, | |
| 122 | 122 | enum hdmi_phy_type type) |
| 123 | 123 | { |
| 124 | 124 | int ret; |
| 125 | 125 | |
| 126 | 126 | switch (type) { |
| 127 | 127 | case MSM_HDMI_PHY_8960: |
| 128 | − ret = hdmi_pll_8960_init(pdev); | |
| 128 | + ret = msm_hdmi_pll_8960_init(pdev); | |
| 129 | 129 | break; |
| 130 | 130 | case MSM_HDMI_PHY_8996: |
| 131 | − ret = hdmi_pll_8996_init(pdev); | |
| 131 | + ret = msm_hdmi_pll_8996_init(pdev); | |
| 132 | 132 | break; |
| 133 | 133 | /* |
| 134 | 134 | * we don't have PLL support for these, don't report an error for now |
| @@ -143,7 +143,7 @@ static int hdmi_phy_pll_init(struct platform_device *pdev, · 8 unmodified lines | ||
| 143 | 143 | return ret; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | −static int hdmi_phy_probe(struct platform_device *pdev) | |
| 146 | +static int msm_hdmi_phy_probe(struct platform_device *pdev) | |
| 147 | 147 | { |
| 148 | 148 | struct device *dev = &pdev->dev; |
| 149 | 149 | struct hdmi_phy *phy; |
| @@ -165,66 +165,66 @@ static int hdmi_phy_probe(struct platform_device *pdev) · 15 unmodified lines | ||
| 165 | 165 | |
| 166 | 166 | phy->pdev = pdev; |
| 167 | 167 | |
| 168 | − ret = hdmi_phy_resource_init(phy); | |
| 168 | + ret = msm_hdmi_phy_resource_init(phy); | |
| 169 | 169 | if (ret) |
| 170 | 170 | return ret; |
| 171 | 171 | |
| 172 | 172 | pm_runtime_enable(&pdev->dev); |
| 173 | 173 | |
| 174 | − ret = hdmi_phy_resource_enable(phy); | |
| 174 | + ret = msm_hdmi_phy_resource_enable(phy); | |
| 175 | 175 | if (ret) |
| 176 | 176 | return ret; |
| 177 | 177 | |
| 178 | − ret = hdmi_phy_pll_init(pdev, phy->cfg->type); | |
| 178 | + ret = msm_hdmi_phy_pll_init(pdev, phy->cfg->type); | |
| 179 | 179 | if (ret) { |
| 180 | 180 | dev_err(dev, "couldn't init PLL\n"); |
| 181 | − hdmi_phy_resource_disable(phy); | |
| 181 | + msm_hdmi_phy_resource_disable(phy); | |
| 182 | 182 | return ret; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | − hdmi_phy_resource_disable(phy); | |
| 185 | + msm_hdmi_phy_resource_disable(phy); | |
| 186 | 186 | |
| 187 | 187 | platform_set_drvdata(pdev, phy); |
| 188 | 188 | |
| 189 | 189 | return 0; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | −static int hdmi_phy_remove(struct platform_device *pdev) | |
| 192 | +static int msm_hdmi_phy_remove(struct platform_device *pdev) | |
| 193 | 193 | { |
| 194 | 194 | pm_runtime_disable(&pdev->dev); |
| 195 | 195 | |
| 196 | 196 | return 0; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | −static const struct of_device_id hdmi_phy_dt_match[] = { | |
| 199 | +static const struct of_device_id msm_hdmi_phy_dt_match[] = { | |
| 200 | 200 | { .compatible = "qcom,hdmi-phy-8660", |
| 201 | − .data = &hdmi_phy_8x60_cfg }, | |
| 201 | + .data = &msm_hdmi_phy_8x60_cfg }, | |
| 202 | 202 | { .compatible = "qcom,hdmi-phy-8960", |
| 203 | − .data = &hdmi_phy_8960_cfg }, | |
| 203 | + .data = &msm_hdmi_phy_8960_cfg }, | |
| 204 | 204 | { .compatible = "qcom,hdmi-phy-8974", |
| 205 | − .data = &hdmi_phy_8x74_cfg }, | |
| 205 | + .data = &msm_hdmi_phy_8x74_cfg }, | |
| 206 | 206 | { .compatible = "qcom,hdmi-phy-8084", |
| 207 | − .data = &hdmi_phy_8x74_cfg }, | |
| 207 | + .data = &msm_hdmi_phy_8x74_cfg }, | |
| 208 | 208 | { .compatible = "qcom,hdmi-phy-8996", |
| 209 | − .data = &hdmi_phy_8996_cfg }, | |
| 209 | + .data = &msm_hdmi_phy_8996_cfg }, | |
| 210 | 210 | {} |
| 211 | 211 | }; |
| 212 | 212 | |
| 213 | −static struct platform_driver hdmi_phy_platform_driver = { | |
| 214 | − .probe = hdmi_phy_probe, | |
| 215 | − .remove = hdmi_phy_remove, | |
| 213 | +static struct platform_driver msm_hdmi_phy_platform_driver = { | |
| 214 | + .probe = msm_hdmi_phy_probe, | |
| 215 | + .remove = msm_hdmi_phy_remove, | |
| 216 | 216 | .driver = { |
| 217 | 217 | .name = "msm_hdmi_phy", |
| 218 | − .of_match_table = hdmi_phy_dt_match, | |
| 218 | + .of_match_table = msm_hdmi_phy_dt_match, | |
| 219 | 219 | }, |
| 220 | 220 | }; |
| 221 | 221 | |
| 222 | −void __init hdmi_phy_driver_register(void) | |
| 222 | +void __init msm_hdmi_phy_driver_register(void) | |
| 223 | 223 | { |
| 224 | − platform_driver_register(&hdmi_phy_platform_driver); | |
| 224 | + platform_driver_register(&msm_hdmi_phy_platform_driver); | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | −void __exit hdmi_phy_driver_unregister(void) | |
| 227 | +void __exit msm_hdmi_phy_driver_unregister(void) | |
| 228 | 228 | { |
| 229 | − platform_driver_unregister(&hdmi_phy_platform_driver); | |
| 229 | + platform_driver_unregister(&msm_hdmi_phy_platform_driver); | |
| 230 | 230 | } |
| @@ -51,7 +51,7 @@ static const char * const hdmi_phy_8960_clk_names[] = { · 50 unmodified lines | ||
| 51 | 51 | "slave_iface_clk", |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | −const struct hdmi_phy_cfg hdmi_phy_8960_cfg = { | |
| 54 | +const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg = { | |
| 55 | 55 | .type = MSM_HDMI_PHY_8960, |
| 56 | 56 | .powerup = hdmi_phy_8960_powerup, |
| 57 | 57 | .powerdown = hdmi_phy_8960_powerdown, |
| @@ -704,7 +704,7 @@ static struct clk_init_data pll_init = { · 703 unmodified lines | ||
| 704 | 704 | .num_parents = ARRAY_SIZE(hdmi_pll_parents), |
| 705 | 705 | }; |
| 706 | 706 | |
| 707 | −int hdmi_pll_8996_init(struct platform_device *pdev) | |
| 707 | +int msm_hdmi_pll_8996_init(struct platform_device *pdev) | |
| 708 | 708 | { |
| 709 | 709 | struct device *dev = &pdev->dev; |
| 710 | 710 | struct hdmi_pll_8996 *pll; |
| @@ -757,7 +757,7 @@ static const char * const hdmi_phy_8996_clk_names[] = { · 46 unmodified lines | ||
| 757 | 757 | "ref_clk", |
| 758 | 758 | }; |
| 759 | 759 | |
| 760 | −const struct hdmi_phy_cfg hdmi_phy_8996_cfg = { | |
| 760 | +const struct hdmi_phy_cfg msm_hdmi_phy_8996_cfg = { | |
| 761 | 761 | .type = MSM_HDMI_PHY_8996, |
| 762 | 762 | .reg_names = hdmi_phy_8996_reg_names, |
| 763 | 763 | .num_regs = ARRAY_SIZE(hdmi_phy_8996_reg_names), |
| @@ -131,7 +131,7 @@ static void hdmi_phy_8x60_powerdown(struct hdmi_phy *phy) · 130 unmodified lines | ||
| 131 | 131 | HDMI_8x60_PHY_REG2_PD_DESER); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | −const struct hdmi_phy_cfg hdmi_phy_8x60_cfg = { | |
| 134 | +const struct hdmi_phy_cfg msm_hdmi_phy_8x60_cfg = { | |
| 135 | 135 | .type = MSM_HDMI_PHY_8x60, |
| 136 | 136 | .powerup = hdmi_phy_8x60_powerup, |
| 137 | 137 | .powerdown = hdmi_phy_8x60_powerdown, |
| @@ -45,7 +45,7 @@ static const char * const hdmi_phy_8x74_clk_names[] = { · 44 unmodified lines | ||
| 45 | 45 | "alt_iface_clk" |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | −const struct hdmi_phy_cfg hdmi_phy_8x74_cfg = { | |
| 48 | +const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg = { | |
| 49 | 49 | .type = MSM_HDMI_PHY_8x74, |
| 50 | 50 | .powerup = hdmi_phy_8x74_powerup, |
| 51 | 51 | .powerdown = hdmi_phy_8x74_powerdown, |
| @@ -426,7 +426,7 @@ static struct clk_init_data pll_init = { · 425 unmodified lines | ||
| 426 | 426 | .num_parents = ARRAY_SIZE(hdmi_pll_parents), |
| 427 | 427 | }; |
| 428 | 428 | |
| 429 | −int hdmi_pll_8960_init(struct platform_device *pdev) | |
| 429 | +int msm_hdmi_pll_8960_init(struct platform_device *pdev) | |
| 430 | 430 | { |
| 431 | 431 | struct device *dev = &pdev->dev; |
| 432 | 432 | struct hdmi_pll_8960 *pll; |
| @@ -326,7 +326,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms, · 325 unmodified lines | ||
| 326 | 326 | |
| 327 | 327 | if (priv->hdmi) { |
| 328 | 328 | /* Construct bridge/connector for HDMI: */ |
| 329 | − ret = hdmi_modeset_init(priv->hdmi, dev, encoder); | |
| 329 | + ret = msm_hdmi_modeset_init(priv->hdmi, dev, encoder); | |
| 330 | 330 | if (ret) { |
| 331 | 331 | dev_err(dev->dev, "failed to initialize HDMI: %d\n", ret); |
| 332 | 332 | return ret; |
| @@ -284,7 +284,7 @@ static int modeset_init_intf(struct mdp5_kms *mdp5_kms, int intf_num) · 283 unmodified lines | ||
| 284 | 284 | break; |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | − ret = hdmi_modeset_init(priv->hdmi, dev, encoder); | |
| 287 | + ret = msm_hdmi_modeset_init(priv->hdmi, dev, encoder); | |
| 288 | 288 | break; |
| 289 | 289 | case INTF_DSI: |
| 290 | 290 | { |
| @@ -1121,7 +1121,7 @@ static int __init msm_drm_register(void) · 1120 unmodified lines | ||
| 1121 | 1121 | DBG("init"); |
| 1122 | 1122 | msm_dsi_register(); |
| 1123 | 1123 | msm_edp_register(); |
| 1124 | − hdmi_register(); | |
| 1124 | + msm_hdmi_register(); | |
| 1125 | 1125 | adreno_register(); |
| 1126 | 1126 | return platform_driver_register(&msm_platform_driver); |
| 1127 | 1127 | } |
| @@ -1130,7 +1130,7 @@ static void __exit msm_drm_unregister(void) · 2 unmodified lines | ||
| 1130 | 1130 | { |
| 1131 | 1131 | DBG("fini"); |
| 1132 | 1132 | platform_driver_unregister(&msm_platform_driver); |
| 1133 | − hdmi_unregister(); | |
| 1133 | + msm_hdmi_unregister(); | |
| 1134 | 1134 | adreno_unregister(); |
| 1135 | 1135 | msm_edp_unregister(); |
| 1136 | 1136 | msm_dsi_unregister(); |
| @@ -243,10 +243,10 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev); · 242 unmodified lines | ||
| 243 | 243 | void msm_fbdev_free(struct drm_device *dev); |
| 244 | 244 | |
| 245 | 245 | struct hdmi; |
| 246 | −int hdmi_modeset_init(struct hdmi *hdmi, struct drm_device *dev, | |
| 246 | +int msm_hdmi_modeset_init(struct hdmi *hdmi, struct drm_device *dev, | |
| 247 | 247 | struct drm_encoder *encoder); |
| 248 | −void __init hdmi_register(void); | |
| 249 | −void __exit hdmi_unregister(void); | |
| 248 | +void __init msm_hdmi_register(void); | |
| 249 | +void __exit msm_hdmi_unregister(void); | |
| 250 | 250 | |
| 251 | 251 | struct msm_edp; |
| 252 | 252 | void __init msm_edp_register(void); |