Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/mdp4: Don't manage DSI PLL regulators in MDP driver

The MDP4 driver tries to request and set voltages for regulators required
by the DSI PLLs.

Firstly, the MDP4 driver shouldn't manage the DSI regulators, this should
be handled in the DSI driver. Secondly, it shouldn't try to set a fixed
voltage for regulators. Voltage constraints should be specified on the
regulator via DT and managed by the regulator core.

Remove all the DSI PLL regulator related code from the MDP4 driver. It's
managed in the DSI driver for MSM8960/APQ8064 already.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Archit Taneja and committed by
Rob Clark
ed19075b 1d15c165

-36
-34
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c
··· 50 50 51 51 mdp4_kms->rev = minor; 52 52 53 - if (mdp4_kms->dsi_pll_vdda) { 54 - if ((mdp4_kms->rev == 2) || (mdp4_kms->rev == 4)) { 55 - ret = regulator_set_voltage(mdp4_kms->dsi_pll_vdda, 56 - 1200000, 1200000); 57 - if (ret) { 58 - dev_err(dev->dev, 59 - "failed to set dsi_pll_vdda voltage: %d\n", ret); 60 - goto out; 61 - } 62 - } 63 - } 64 - 65 - if (mdp4_kms->dsi_pll_vddio) { 66 - if (mdp4_kms->rev == 2) { 67 - ret = regulator_set_voltage(mdp4_kms->dsi_pll_vddio, 68 - 1800000, 1800000); 69 - if (ret) { 70 - dev_err(dev->dev, 71 - "failed to set dsi_pll_vddio voltage: %d\n", ret); 72 - goto out; 73 - } 74 - } 75 - } 76 - 77 53 if (mdp4_kms->rev > 1) { 78 54 mdp4_write(mdp4_kms, REG_MDP4_CS_CONTROLLER0, 0x0707ffff); 79 55 mdp4_write(mdp4_kms, REG_MDP4_CS_CONTROLLER1, 0x03073f3f); ··· 460 484 ret = PTR_ERR(mdp4_kms->mmio); 461 485 goto fail; 462 486 } 463 - 464 - mdp4_kms->dsi_pll_vdda = 465 - devm_regulator_get_optional(&pdev->dev, "dsi_pll_vdda"); 466 - if (IS_ERR(mdp4_kms->dsi_pll_vdda)) 467 - mdp4_kms->dsi_pll_vdda = NULL; 468 - 469 - mdp4_kms->dsi_pll_vddio = 470 - devm_regulator_get_optional(&pdev->dev, "dsi_pll_vddio"); 471 - if (IS_ERR(mdp4_kms->dsi_pll_vddio)) 472 - mdp4_kms->dsi_pll_vddio = NULL; 473 487 474 488 /* NOTE: driver for this regulator still missing upstream.. use 475 489 * _get_exclusive() and ignore the error if it does not exist
-2
drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h
··· 37 37 38 38 void __iomem *mmio; 39 39 40 - struct regulator *dsi_pll_vdda; 41 - struct regulator *dsi_pll_vddio; 42 40 struct regulator *vdd; 43 41 44 42 struct clk *clk;