public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, Thomas Wood <thomas.wood@intel.com>
Subject: Re: [PATCH] drm/i915: Don't call intel_plane_restore() when the prop value didn't change
Date: Mon, 1 Sep 2014 16:16:59 +0100	[thread overview]
Message-ID: <20140901151659.GG1118@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1409584105-28778-1-git-send-email-ville.syrjala@linux.intel.com>

On Mon, Sep 01, 2014 at 06:08:25PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> No point in calling intel_plane_restore() in .set_property() if the
> value didn't change.
> 
> More importantly this papers over a bug where the current primary plane
> code forgets to update the user coordinates we store under intel_plane
> unless the primary plane .update_plane() hook is actually called. This
> means we have 0 in the coordinates straight after boot and any call
> to intel_restore_plane() (such as from restore_fbdev_mode()) will
> actually turn off the primary plane. This mess needs to be fixed properly
> but that's a bigger task and the first step there is killing off
> intel_pipe_set_base() and just calling the primary plane
> .update_plane() hook. For the immediate problem of black screen after
> boot this small patch is enough to hide it.
> 
> The problem originates from these two commits:
>  commit 3a5f87c286515c54ff5c52c3e64d0c522b7570c0
>  Author: Thomas Wood <thomas.wood@intel.com>
>  Date:   Wed Aug 20 14:45:00 2014 +0100
> 
>     drm: fix plane rotation when restoring fbdev configuration
> 
>  commit d91a2cb8e5104233c02bbde539bd4ee455ec12ac
>  Author: Sonika Jindal <sonika.jindal@intel.com>
>  Date:   Fri Aug 22 14:06:04 2014 +0530
> 
>     drm/i915: Add 180 degree primary plane rotation support
> 
> Cc: Thomas Wood <thomas.wood@intel.com>
> Cc: Sonika Jindal <sonika.jindal@intel.com>
> Tested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

-- 
Damien

> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index fd5f271..cf596cd 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1232,6 +1232,9 @@ int intel_plane_set_property(struct drm_plane *plane,
>  		if (hweight32(val & 0xf) != 1)
>  			return -EINVAL;
>  
> +		if (intel_plane->rotation == val)
> +			return 0;
> +
>  		old_val = intel_plane->rotation;
>  		intel_plane->rotation = val;
>  		ret = intel_plane_restore(plane);
> -- 
> 1.8.5.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2014-09-01 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 15:08 [PATCH] drm/i915: Don't call intel_plane_restore() when the prop value didn't change ville.syrjala
2014-09-01 15:16 ` Damien Lespiau [this message]
2014-09-02  7:20   ` Damien Lespiau

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=20140901151659.GG1118@strange.amr.corp.intel.com \
    --to=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.wood@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox