[PATCH v10 17/17] drm/exynos: split exynos_crtc->dpms in enable() and disable()
Gustavo Padovan
gustavo at padovan.org
Wed Jun 3 06:20:55 PDT 2015
Hi Inki,
2015-06-03 Inki Dae <inki.dae at samsung.com>:
> Hi,
>
> On 2015년 06월 02일 00:04, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> >
> > To follow more closely the new atomic API we split the dpms()
> > helper into the enable() and disable() helper to get exactly the
> > same semantics.
> >
> > Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> > ---
> > drivers/gpu/drm/exynos/exynos7_drm_decon.c | 87 ++++++------------------------
> > drivers/gpu/drm/exynos/exynos_drm_crtc.c | 8 +--
> > drivers/gpu/drm/exynos/exynos_drm_drv.h | 6 ++-
> > drivers/gpu/drm/exynos/exynos_drm_fimd.c | 69 +++++-------------------
> > drivers/gpu/drm/exynos/exynos_drm_vidi.c | 53 +++++++-----------
> > drivers/gpu/drm/exynos/exynos_mixer.c | 26 +++------
> > 6 files changed, 62 insertions(+), 187 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > index f29e4be..d659ba2 100644
> > --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> > @@ -603,75 +603,39 @@ static void decon_init(struct decon_context *ctx)
> > writel(VIDCON1_VCLK_HOLD, ctx->regs + VIDCON1(0));
> > }
> >
> > -static int decon_poweron(struct decon_context *ctx)
> > +static void decon_enable(struct exynos_drm_crtc *crtc)
> > {
> > - int ret;
> > + struct decon_context *ctx = crtc->ctx;
> >
> > if (!ctx->suspended)
> > - return 0;
> > + return;
> >
> > ctx->suspended = false;
> >
> > pm_runtime_get_sync(ctx->dev);
> >
> > - ret = clk_prepare_enable(ctx->pclk);
> > - if (ret < 0) {
> > - DRM_ERROR("Failed to prepare_enable the pclk [%d]\n", ret);
> > - goto pclk_err;
> > - }
> > -
> > - ret = clk_prepare_enable(ctx->aclk);
> > - if (ret < 0) {
> > - DRM_ERROR("Failed to prepare_enable the aclk [%d]\n", ret);
> > - goto aclk_err;
> > - }
> > -
> > - ret = clk_prepare_enable(ctx->eclk);
> > - if (ret < 0) {
> > - DRM_ERROR("Failed to prepare_enable the eclk [%d]\n", ret);
> > - goto eclk_err;
> > - }
> > -
> > - ret = clk_prepare_enable(ctx->vclk);
> > - if (ret < 0) {
> > - DRM_ERROR("Failed to prepare_enable the vclk [%d]\n", ret);
> > - goto vclk_err;
> > - }
> > + clk_prepare_enable(ctx->pclk);
> > + clk_prepare_enable(ctx->aclk);
> > + clk_prepare_enable(ctx->eclk);
> > + clk_prepare_enable(ctx->vclk);
>
> Merged this patch series to exynos-drm-next. However, this patch
> especially above codes is required for more clean-up. Even though
> decon_enable function never return error number, I think its internal
> codes should be considered for some exception cases to check where an
> error occurred at. So could you post the clean-up patch?
Thanks for merging the patches! I will send follow-up patches shortly to
add checks and errors messages back.
Gustavo
More information about the dri-devel
mailing list