From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
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 [thread overview]
Message-ID: <20130524093823.GE5004@intel.com> (raw)
In-Reply-To: <20130524092021.GF15743@phenom.ffwll.local>
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 wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > 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älä <ville.syrjala@linux.intel.com>
>
> 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/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_crtc *crtc)
> > }
> > }
> >
> > +static bool fbdev_active_on_crtc(const struct drm_crtc *crtc)
> > +{
> > + const struct drm_i915_private *dev_priv = crtc->dev->dev_private;
> > +
> > + return dev_priv->fbdev && dev_priv->fbdev->helper.fb == crtc->fb;
> > +}
> > +
> > static void intel_enable_planes(struct drm_crtc *crtc)
> > {
> > struct drm_device *dev = crtc->dev;
> > enum pipe pipe = 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.head)
> > if (intel_plane->pipe == 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 = 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älä
Intel OTC
next prev parent reply other threads:[~2013-05-24 9:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 9:55 [PATCH 0/7] drm/i915: fbdev mode restoration improvements ville.syrjala
2013-05-08 9:55 ` [PATCH 1/7] drm: Add fb_helper->restore_fbdev_mode hook ville.syrjala
2013-05-08 12:42 ` Laurent Pinchart
2013-05-08 13:39 ` [PATCH v2] " ville.syrjala
2013-05-08 13:46 ` Ville Syrjälä
2013-05-08 13:52 ` Laurent Pinchart
2013-05-08 9:55 ` [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev ville.syrjala
2013-05-24 9:20 ` Daniel Vetter
2013-05-24 9:38 ` Ville Syrjälä [this message]
2013-05-08 9:55 ` [PATCH 3/7] drm/i915: Fix fbdev sprite disable code ville.syrjala
2013-05-24 9:21 ` Daniel Vetter
2013-05-24 9:35 ` Daniel Vetter
2013-05-24 9:59 ` Ville Syrjälä
2013-05-24 15:14 ` Daniel Vetter
2013-05-24 17:06 ` Ville Syrjälä
2013-05-24 20:24 ` Daniel Vetter
2013-05-08 9:55 ` [PATCH 4/7] drm/i915: Use a custom restore_fbdev_mode hook ville.syrjala
2013-05-08 9:55 ` [PATCH 5/7] drm/i915: Use container_of() in the fbdev code ville.syrjala
2013-05-08 9:55 ` [PATCH 6/7] drm/i915: s/drm_i915_private_t/struct drm_i915_private/ ville.syrjala
2013-05-08 9:55 ` [PATCH 7/7] drm: Remove some unused stuff from drm_plane ville.syrjala
2013-05-08 12:41 ` Laurent Pinchart
2013-05-08 13:40 ` [PATCH v2] " ville.syrjala
2013-05-08 13:52 ` Laurent Pinchart
2013-06-19 1:02 ` Laurent Pinchart
2013-05-23 13:38 ` [Intel-gfx] [PATCH 7/7] " Imre Deak
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=20130524093823.GE5004@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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.