Re: [PATCH 1/2] drm: rcar-du: Add Standby Mode support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hoan,

On Fri, Dec 14, 2018 at 8:25 AM Nguyen An Hoan <na-hoan@xxxxxxxxxxx> wrote:
> From: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>
>
> Add function support for Module Standby Mode
>
> Signed-off-by: Hoan Nguyen An <na-hoan@xxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -651,6 +651,32 @@ static void rcar_du_crtc_stop(struct rcar_du_crtc *rcrtc)
>         rcar_du_group_start_stop(rcrtc->group, false);
>  }
>
> +int rcar_du_crtc_standby(struct rcar_du_crtc *rcrtc)
> +{
> +       u32 val_reg;
> +       unsigned int i = 0;
> +
> +       /* Enter Standby mode */
> +       rcar_du_crtc_dsysr_clr_set(rcrtc, DSYSR_DRES | DSYSR_DEN, 0);
> +
> +       for(i = 100; i > 0; i--)
> +       {
> +               val_reg = rcar_du_crtc_read(rcrtc, DSSR);
> +               if(!(val_reg & DSSR_VBK))
> +                       break;
> +               udelay(10);
> +       }
> +
> +       if(!(i > 0))
> +               return -ETIMEDOUT;
> +
> +       /* Stop clock */
> +       clk_set_rate(rcrtc->extclock, 0);
> +       clk_set_rate(rcrtc->clock, 0);

That's not the API to stop a clock.
Why do you set the clock rates to 0?

> +
> +       return 0;
> +}

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux