From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev Date: Fri, 24 May 2013 11:20:21 +0200 Message-ID: <20130524092021.GF15743@phenom.ffwll.local> References: <1368006922-24957-1-git-send-email-ville.syrjala@linux.intel.com> <1368006922-24957-3-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 mail-ea0-f175.google.com (mail-ea0-f175.google.com [209.85.215.175]) by gabe.freedesktop.org (Postfix) with ESMTP id A7A2CE5DE8 for ; Fri, 24 May 2013 02:20:26 -0700 (PDT) Received: by mail-ea0-f175.google.com with SMTP id h10so2394642eaj.6 for ; Fri, 24 May 2013 02:20:25 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1368006922-24957-3-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, May 08, 2013 at 12:55:17PM +0300, ville.syrjala@linux.intel.com wro= te: > 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? -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/i915/= 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_crt= c *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.hea= d) > 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_cr= tc *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