From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [Intel-gfx] [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev Date: Fri, 24 May 2013 12:38:23 +0300 Message-ID: <20130524093823.GE5004@intel.com> References: <1368006922-24957-1-git-send-email-ville.syrjala@linux.intel.com> <1368006922-24957-3-git-send-email-ville.syrjala@linux.intel.com> <20130524092021.GF15743@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20130524092021.GF15743@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, May 24, 2013 at 11:20:21AM +0200, Daniel Vetter wrote: > On Wed, May 08, 2013 at 12:55:17PM +0300, ville.syrjala@linux.intel.com w= rote: > > From: Ville Syrj=E4l=E4 > > = > > Check if the CRTC framebuffer matches the fbdev helper's framebuffer, > > and if it does, doen't enable cursors/sprites. > > = > > Signed-off-by: Ville Syrj=E4l=E4 > = > This one here had conflicts. But it also feels redundant with patch 3, > since that one should make sure that we won't ever have a cursor/sprite > stuck around forever. > = > Of course it's a bit ugly since the cursor might flash shortly, but for > now I'll brush that off with our lack of atomic modesetting. > = > Or did I miss something subtly? My initial idea was to avoid the flashing. However, now that I think about it a bit more, we do call set_config from the fb_helper set_par/pan_display hooks, which could then end up enabling sprites/cursors w/ fbdev. So either we need to keep this patch, or maybe provide custom set_par/pan_display to turn off sprites/cursors as well. > -Daniel > > --- > > drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > = > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 94d6604..cfe2803 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -3264,12 +3264,23 @@ static void ironlake_pfit_enable(struct intel_c= rtc *crtc) > > } > > } > > = > > +static bool fbdev_active_on_crtc(const struct drm_crtc *crtc) > > +{ > > + const struct drm_i915_private *dev_priv =3D crtc->dev->dev_private; > > + > > + return dev_priv->fbdev && dev_priv->fbdev->helper.fb =3D=3D crtc->fb; > > +} > > + > > static void intel_enable_planes(struct drm_crtc *crtc) > > { > > struct drm_device *dev =3D crtc->dev; > > enum pipe pipe =3D to_intel_crtc(crtc)->pipe; > > struct intel_plane *intel_plane; > > = > > + /* don't enable sprite planes for fbdev */ > > + if (fbdev_active_on_crtc(crtc)) > > + return; > > + > > list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.h= ead) > > if (intel_plane->pipe =3D=3D pipe) > > intel_plane_restore(&intel_plane->base); > > @@ -6522,6 +6533,10 @@ static void intel_crtc_update_cursor(struct drm_= crtc *crtc, > > u32 base, pos; > > bool visible; > > = > > + /* don't enable cursors for fbdev */ > > + if (on && fbdev_active_on_crtc(crtc)) > > + return; > > + > > pos =3D 0; > > = > > if (on && crtc->enabled && crtc->fb) { > > -- = > > 1.8.1.5 > > = > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > = > -- = > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- = Ville Syrj=E4l=E4 Intel OTC