From: Damien Lespiau 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 Message-ID: <20140901151659.GG1118@strange.amr.corp.intel.com> References: <1409584105-28778-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 98B25892EA for ; Mon, 1 Sep 2014 08:18:09 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1409584105-28778-1-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org, Thomas Wood List-Id: intel-gfx@lists.freedesktop.org On Mon, Sep 01, 2014 at 06:08:25PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > 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 > Date: Wed Aug 20 14:45:00 2014 +0100 > = > drm: fix plane rotation when restoring fbdev configuration > = > commit d91a2cb8e5104233c02bbde539bd4ee455ec12ac > Author: Sonika Jindal > Date: Fri Aug 22 14:06:04 2014 +0530 > = > drm/i915: Add 180 degree primary plane rotation support > = > Cc: Thomas Wood > Cc: Sonika Jindal > Tested-by: Mika Kuoppala > Signed-off-by: Ville Syrj=E4l=E4 Reviewed-by: Damien Lespiau -- = 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/i= ntel_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 *plan= e, > if (hweight32(val & 0xf) !=3D 1) > return -EINVAL; > = > + if (intel_plane->rotation =3D=3D val) > + return 0; > + > old_val =3D intel_plane->rotation; > intel_plane->rotation =3D val; > ret =3D 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