All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yakir Yang <ykk@rock-chips.com>
To: Sean Paul <seanpaul@chromium.org>,
	mark.yao@rock-chips.com, dri-devel@lists.freedesktop.org
Cc: marcheu@chromium.org, dianders@chromium.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v2 4/6] drm/rockchip: A couple small fixes to psr
Date: Wed, 17 Aug 2016 10:34:46 +0800	[thread overview]
Message-ID: <03d77274-1ada-9fc8-00ef-3f2af9da6d00@rock-chips.com> (raw)
In-Reply-To: <1471396276-8222-5-git-send-email-seanpaul@chromium.org>


On 08/17/2016 09:11 AM, Sean Paul wrote:
> A few things that need tidying up, no functional changes.
>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Yakir Yang <ykk@rock-chips.com>
> ---
>
> Changes in v2:
> 	- Introduced
>
>   drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 19 +++++++------------
>   1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> index 5bd54f2..c6ac5d0 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c
> @@ -62,27 +62,25 @@ static void psr_set_state_locked(struct psr_drv *psr, enum psr_state state)
>   	 * Allowed finite state machine:
>   	 *
>   	 *   PSR_ENABLE  < = = = = = >  PSR_FLUSH
> -	  *      | ^                        |
> -	  *      | |                        |
> -	  *      v |                        |
> +	 *       | ^                        |
> +	 *       | |                        |
> +	 *       v |                        |
>   	 *   PSR_DISABLE < - - - - - - - - -
>   	 */
> -
> -	/* Forbid no state change */
>   	if (state == psr->state)
>   		return;
>   
> -	/* Forbid DISABLE change to FLUSH */
> +	/* Requesting a flush when disabled is a noop */
>   	if (state == PSR_FLUSH && psr->state == PSR_DISABLE)
>   		return;
>   
>   	psr->state = state;
>   
> -	/* Allow but no need hardware change, just need assign the state */
> +	/* Already disabled in flush, change the state, but not the hardware */
>   	if (state == PSR_DISABLE && psr->state == PSR_FLUSH)
>   		return;
>   
> -	/* Refact to hardware state change */
> +	/* Actually commit the state change to hardware */
>   	switch (psr->state) {
>   	case PSR_ENABLE:
>   		psr->set(psr->encoder, true);
> @@ -109,10 +107,7 @@ static void psr_flush_handler(unsigned long data)
>   	struct psr_drv *psr = (struct psr_drv *)data;
>   	unsigned long flags;
>   
> -	if (!psr)
> -		return;
> -
> -	/* State changed between flush time, then keep it */
> +	/* If the state has changed since we initiated the flush, do nothing */
>   	spin_lock_irqsave(&psr->lock, flags);
>   	if (psr->state == PSR_FLUSH)
>   		psr_set_state_locked(psr, PSR_ENABLE);


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-08-17  2:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  1:11 [PATCH v2 0/6] drm/rockchip: Some patches to update the PSR series Sean Paul
2016-08-17  1:11 ` [PATCH v2 1/6] drm/rockchip: Convert psr_list_mutex to spinlock and use it Sean Paul
2016-08-17  2:29   ` Yakir Yang
2016-08-17  1:11 ` [PATCH v2 2/6] drm/rockchip: Don't use a delayed worker for psr state changes Sean Paul
2016-08-17  2:31   ` Yakir Yang
2016-08-17  1:11 ` [PATCH v2 3/6] drm/rockchip: Use a spinlock to protect psr state Sean Paul
2016-08-17  2:33   ` Yakir Yang
2016-08-17  1:11 ` [PATCH v2 4/6] drm/rockchip: A couple small fixes to psr Sean Paul
2016-08-17  2:34   ` Yakir Yang [this message]
2016-08-17  1:11 ` [PATCH v2 5/6] drm/rockchip: Improve analogix-dp psr handling Sean Paul
2016-08-17  2:35   ` Yakir Yang
2016-08-17  1:11 ` [PATCH v2 6/6] drm/rockchip: Enable vblank without event Sean Paul
2016-08-17  3:27   ` Yakir Yang
2016-08-17  2:41 ` [PATCH v2 0/6] drm/rockchip: Some patches to update the PSR series Yakir Yang
2016-08-17  2:45   ` Sean Paul
2016-08-17  3:20     ` Yakir Yang
2016-08-17  2:45   ` Yakir Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03d77274-1ada-9fc8-00ef-3f2af9da6d00@rock-chips.com \
    --to=ykk@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=marcheu@chromium.org \
    --cc=mark.yao@rock-chips.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.