search for: clk_disable_unprepar

Displaying 20 results from an estimated 30 matches for "clk_disable_unprepar".

Did you mean: clk_disable_unprepare
2017 May 20
2
[PATCH] drm: remove NULL pointer check for clk_disable_unprepare
.../drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 9a9c407..70efe04 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1481,23 +1481,18 @@ static int etnaviv_gpu_clk_enable(struct etnaviv_gpu *gpu) return 0; disable_clk_core: - if (gpu->clk_core) - clk_disable_unprepare(gpu->clk_core); + clk_disable_unprepare(gpu->clk_core); disable_clk_bus: - if (gpu->clk_bus) - clk_disable_unprepare(gpu->clk_bus); + clk_disable_unprepare(gpu->clk_bus); return ret; } static int etnaviv_gpu_clk_disable(struct etnaviv_gpu *gpu) { - if (gpu->clk_shader)...
2017 May 20
0
[PATCH] drm: remove NULL pointer check for clk_disable_unprepare
...> >> All clock consumers can safely call clk_disable(_unprepare) without >> NULL pointer check. >> >> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com> > > > Sorry, I retract this patch. > > Krzysztof pointed out > cleanups only for clk_disable_unprepare() will lose the code symmetry. > > NULL pointer checks for clk_prepare_enable() should be > removed to keep the code symmetrical. > > This is possible for common-clock framework because > clk_prepare_enable() is also a no-op for a NULL clk input. > But it is not necessarily tr...
2017 May 20
0
[PATCH] drm: remove NULL pointer check for clk_disable_unprepare
...and this is now > tree-wide consistent. > > All clock consumers can safely call clk_disable(_unprepare) without > NULL pointer check. > > Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com> Sorry, I retract this patch. Krzysztof pointed out cleanups only for clk_disable_unprepare() will lose the code symmetry. NULL pointer checks for clk_prepare_enable() should be removed to keep the code symmetrical. This is possible for common-clock framework because clk_prepare_enable() is also a no-op for a NULL clk input. But it is not necessarily true for non-common clock implement...
2016 Apr 01
1
[PATCH] tegra: acquire and enable reference clock if needed
...t) goto err_clk; + if (tdev->clk_ref) { + ret = clk_prepare_enable(tdev->clk_ref); + if (ret) + goto err_clk_ref; + } ret = clk_prepare_enable(tdev->clk_pwr); if (ret) goto err_clk_pwr; @@ -57,6 +62,9 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) err_clamp: clk_disable_unprepare(tdev->clk_pwr); err_clk_pwr: + if (tdev->clk_ref) + clk_disable_unprepare(tdev->clk_ref); +err_clk_ref: clk_disable_unprepare(tdev->clk); err_clk: regulator_disable(tdev->vdd); @@ -71,6 +79,8 @@ nvkm_device_tegra_power_down(struct nvkm_device_tegra *tdev) udelay(10); cl...
2014 Jun 26
0
[PATCH v3 1/3] drm/nouveau: support for probing platform devices
...lk_set_rate(gpu->clk_pwr, 204000000); + udelay(10); + + reset_control_assert(gpu->rst); + udelay(10); + + err = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); + if (err) + goto err_clamp; + udelay(10); + + reset_control_deassert(gpu->rst); + udelay(10); + + return 0; + +err_clamp: + clk_disable_unprepare(gpu->clk_pwr); +err_clk_pwr: + clk_disable_unprepare(gpu->clk); +err_clk: + regulator_disable(gpu->vdd); +err_power: + return err; +} + +static int nouveau_platform_power_down(struct nouveau_platform_gpu *gpu) +{ + int err; + + reset_control_assert(gpu->rst); + udelay(10); + + clk_disa...
2017 Jun 09
0
[PATCH 2/3] drm/nouveau/tegra: Don't leave GPU in reset
...3d42cdbbe9c0..189ed80e21ff 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -82,9 +82,6 @@ nvkm_device_tegra_power_down(struct nvkm_device_tegra *tdev) { int ret; - reset_control_assert(tdev->rst); - udelay(10); - clk_disable_unprepare(tdev->clk_pwr); if (tdev->clk_ref) clk_disable_unprepare(tdev->clk_ref); -- 2.13.0
2014 Jun 26
6
[PATCH v3 0/3] drm/nouveau: support for probing platform devices
This series adds support for probing platform devices on Nouveau, as well as the DT bindings for GK20A. It doesn't enable the GPU yet on Tegra boards since a few extra things need to be supported before that. This version is mostly identical to v2 but fixes an important issue: the drvdata must be set to the drm_device for sysfs to work, so the platform device structure now includes the
2014 Jun 13
3
[PATCH v2 0/3] drm/nouveau: support for probing platform devices
This series adds support for probing platform devices on Nouveau, as well as the DT bindings for GK20A. It doesn't enable the GPU yet on Tegra boards since a few extra things need to be supported before that. Thanks to the input received for v1, this version is more self-contained and shares less stuff between nouveau_drm and nouveau_platform. The major change is that nouveau_platform is now
2014 Jun 26
2
[PATCH v3 1/3] drm/nouveau: support for probing platform devices
...ol_assert(gpu->rst); > + udelay(10); > + > + err = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); > + if (err) > + goto err_clamp; > + udelay(10); > + > + reset_control_deassert(gpu->rst); > + udelay(10); > + > + return 0; > + > +err_clamp: > + clk_disable_unprepare(gpu->clk_pwr); > +err_clk_pwr: > + clk_disable_unprepare(gpu->clk); > +err_clk: > + regulator_disable(gpu->vdd); > +err_power: > + return err; > +} > + > +static int nouveau_platform_power_down(struct nouveau_platform_gpu *gpu) > +{ > + int err; > + &gt...
2020 Mar 05
0
[PATCH 18/22] drm/vc4: Use simple encoder
...nector = @@ -1453,7 +1444,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) vc4_hdmi_connector_destroy(hdmi->connector); #endif err_destroy_encoder: - vc4_hdmi_encoder_destroy(hdmi->encoder); + drm_encoder_cleanup(hdmi->encoder); err_unprepare_hsm: clk_disable_unprepare(hdmi->hsm_clock); pm_runtime_disable(dev); @@ -1472,7 +1463,7 @@ static void vc4_hdmi_unbind(struct device *dev, struct device *master, cec_unregister_adapter(hdmi->cec_adap); vc4_hdmi_connector_destroy(hdmi->connector); - vc4_hdmi_encoder_destroy(hdmi->encoder); + drm_encoder_...
2017 Jun 09
4
[PATCH 1/3] drm/nouveau/tegra: Skip manual unpowergating when not necessary
On Tegra186, powergating is handled by the BPMP power domain provider and the "legacy" powergating API is not available. Therefore skip these calls if we are attached to a power domain. Signed-off-by: Mikko Perttunen <mperttunen at nvidia.com> --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git
2016 Aug 26
0
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...break; + } + } + + return 0; + +err_put_clks: + while (--clk >= 0) + clk_put(slim_rproc->clks[clk]); + + return err; +} + +static void slim_clk_disable(struct st_slim_rproc *slim_rproc) +{ + int clk; + + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) + clk_disable_unprepare(slim_rproc->clks[clk]); +} + +static int slim_clk_enable(struct st_slim_rproc *slim_rproc) +{ + int clk, ret; + + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) { + ret = clk_prepare_enable(slim_rproc->clks[clk]); + if (ret) + goto err_disable_clks; +...
2016 Feb 12
0
[PATCH 15/17] drm/rockchip: removed optional dummy encoder mode_fixup function.
...--git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f8f8f29..7766206 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -875,13 +875,6 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder) clk_disable_unprepare(dsi->pclk); } -static bool dw_mipi_dsi_encoder_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void dw_mipi_dsi_encoder_commit(struct drm_encoder *encoder) { struct dw_mipi_dsi...
2016 Feb 15
0
[PATCH v2 15/17] drm/rockchip: removed optional dummy encoder mode_fixup function.
...--git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f8f8f29..7766206 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -875,13 +875,6 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder) clk_disable_unprepare(dsi->pclk); } -static bool dw_mipi_dsi_encoder_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void dw_mipi_dsi_encoder_commit(struct drm_encoder *encoder) { struct dw_mipi_dsi...
2016 Feb 12
0
[PATCH 15/17] drm/rockchip: removed optional dummy encoder mode_fixup function.
...--git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f8f8f29..7766206 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -875,13 +875,6 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder) clk_disable_unprepare(dsi->pclk); } -static bool dw_mipi_dsi_encoder_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - return true; -} - static void dw_mipi_dsi_encoder_commit(struct drm_encoder *encoder) { struct dw_mipi_dsi...
2016 Aug 30
4
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...e (--clk >= 0) > + clk_put(slim_rproc->clks[clk]); > + > + return err; > +} > + > +static void slim_clk_disable(struct st_slim_rproc *slim_rproc) > +{ > + int clk; > + > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) > + clk_disable_unprepare(slim_rproc->clks[clk]); > +} > + > +static int slim_clk_enable(struct st_slim_rproc *slim_rproc) > +{ > + int clk, ret; > + > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) { > + ret = clk_prepare_enable(slim_rproc->clks[clk]); &...
2016 Aug 30
4
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...e (--clk >= 0) > + clk_put(slim_rproc->clks[clk]); > + > + return err; > +} > + > +static void slim_clk_disable(struct st_slim_rproc *slim_rproc) > +{ > + int clk; > + > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) > + clk_disable_unprepare(slim_rproc->clks[clk]); > +} > + > +static int slim_clk_enable(struct st_slim_rproc *slim_rproc) > +{ > + int clk, ret; > + > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) { > + ret = clk_prepare_enable(slim_rproc->clks[clk]); &...
2016 Aug 30
0
[PATCH v8 01/18] remoteproc: st_slim_rproc: add a slimcore rproc driver
...lks[clk]); > > + > > + return err; > > +} > > + > > +static void slim_clk_disable(struct st_slim_rproc *slim_rproc) > > +{ > > + int clk; > > + > > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) > > + clk_disable_unprepare(slim_rproc->clks[clk]); > > +} > > + > > +static int slim_clk_enable(struct st_slim_rproc *slim_rproc) > > +{ > > + int clk, ret; > > + > > + for (clk = 0; clk < ST_SLIM_MAX_CLK && slim_rproc->clks[clk]; clk++) { > > + ret = clk_pre...
2018 Apr 26
0
[Intel-gfx] [PATCH] drm/core: Remove drm_dev_unref() and it's uses
...ble_clk: > @@ -371,7 +371,7 @@ static int fsl_dcu_drm_remove(struct platform_device *pdev) > struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev); > > drm_dev_unregister(fsl_dev->drm); > - drm_dev_unref(fsl_dev->drm); > + drm_dev_put(fsl_dev->drm); > clk_disable_unprepare(fsl_dev->clk); > clk_unregister(fsl_dev->pix_clk); > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index d4f6f1f9df5b..ec878c7e3f75 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++...
2018 Apr 26
5
[PATCH] drm/core: Remove drm_dev_unref() and it's uses
...egister(fsl_dev->pix_clk); disable_clk: @@ -371,7 +371,7 @@ static int fsl_dcu_drm_remove(struct platform_device *pdev) struct fsl_dcu_drm_device *fsl_dev = platform_get_drvdata(pdev); drm_dev_unregister(fsl_dev->drm); - drm_dev_unref(fsl_dev->drm); + drm_dev_put(fsl_dev->drm); clk_disable_unprepare(fsl_dev->clk); clk_unregister(fsl_dev->pix_clk); diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index d4f6f1f9df5b..ec878c7e3f75 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hi...