Re: [PATCH] drm/rockchip: Fix up bug in psr state machine

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

 



On Wed, Sep 7, 2016 at 3:12 AM, Sean Paul <seanpaul@xxxxxxxxxxxx> wrote:
> The ->set() callback would always be called when transitioning
> from FLUSH->DISABLE since we assign state to psr->state right
> above the skip condition.
>
> Reported-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx>
> Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx>

Reviewed-by: Daniel Kurtz <djkurtz@xxxxxxxxxxxx>


> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> index c6ac5d0..cb17709 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> @@ -74,11 +74,13 @@ static void psr_set_state_locked(struct psr_drv *psr, enum psr_state state)
>         if (state == PSR_FLUSH && psr->state == PSR_DISABLE)
>                 return;
>
> -       psr->state = state;
> -
>         /* Already disabled in flush, change the state, but not the hardware */
> -       if (state == PSR_DISABLE && psr->state == PSR_FLUSH)
> +       if (state == PSR_DISABLE && psr->state == PSR_FLUSH) {
> +               psr->state = state;
>                 return;
> +       }
> +
> +       psr->state = state;
>
>         /* Actually commit the state change to hardware */
>         switch (psr->state) {
> --
> 2.8.0.rc3.226.g39d4020
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux