Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/i915: Introduce accurate frontbuffer tracking
Date: Wed, 18 Jun 2014 17:55:31 +0200	[thread overview]
Message-ID: <20140618155531.GK5821@phenom.ffwll.local> (raw)
In-Reply-To: <20140618145544.GQ31023@nuc-i3427.alporthouse.com>

On Wed, Jun 18, 2014 at 03:55:44PM +0100, Chris Wilson wrote:
> On Wed, Jun 18, 2014 at 03:01:25PM +0200, Daniel Vetter wrote:
> > +void i915_gem_update_fb_bits(struct drm_i915_gem_object *old,
> > +			     struct drm_i915_gem_object *new,
> > +			     unsigned frontbuffer_bits);
> > +
> 
> Time to be a nuisance:
> 
> i915_gem_object_track_fb()
> 
> The key part is that is operates on the object. The other is just to try
> and shorten the name as compensation.

Hm, I've thought the i915_gem part is a giveaway - I'm not too fond of the
i915_gem_obj prefix since it's so long ...

> > @@ -1062,6 +1065,7 @@ intel_disable_plane(struct drm_plane *plane)
> >  	struct drm_device *dev = plane->dev;
> >  	struct intel_plane *intel_plane = to_intel_plane(plane);
> >  	struct intel_crtc *intel_crtc;
> > +	enum pipe pipe;
> >  
> >  	if (!plane->fb)
> >  		return 0;
> > @@ -1070,6 +1074,7 @@ intel_disable_plane(struct drm_plane *plane)
> >  		return -EINVAL;
> >  
> >  	intel_crtc = to_intel_crtc(plane->crtc);
> > +	pipe = intel_crtc->pipe;
> >  
> >  	if (intel_crtc->active) {
> >  		bool primary_was_enabled = intel_crtc->primary_enabled;
> > @@ -1088,6 +1093,8 @@ intel_disable_plane(struct drm_plane *plane)
> >  
> >  		mutex_lock(&dev->struct_mutex);
> >  		intel_unpin_fb_obj(intel_plane->obj);
> > +		i915_gem_update_fb_bits(intel_plane->obj, NULL,
> > +					INTEL_FRONTBUFFER_SPRITE(pipe));
> 
> Introducing a local here for a one off, or was checkpatch in an angry
> mood with INTEL_FRONTBUFFER_SPRITE(intel_crtc->pipe) ?

Just a case of shortening the line a bit, it looks terribly ugly imo. I
hope we can prettify this once we have a bit more unified nuclear flip
logic for all planes.

> That's all I spotted, the logic looks fine. But just remind me,
> i915_gem_object_track_fb() did do a lockdep_assert_held(&dev->struct_mutex)?

Yeah, both when new or old are non-NULL, as a prep for per-object locking.
If we ever get there ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-06-18 15:55 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 11:59 [PATCH 00/16] PSR rework and accurate frontbuffer tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 01/16] drm/i915: Drop unecessary complexity from psr_inactivate Daniel Vetter
2014-06-18 11:59 ` [PATCH 02/16] drm/i915: Ditch intel_edp_psr_update Daniel Vetter
2014-06-18 11:59 ` [PATCH 03/16] drm/i915: Run psr_setup unconditionally Daniel Vetter
2014-06-18 11:59 ` [PATCH 04/16] drm/i915: Drop schedule_back from psr_exit Daniel Vetter
2014-06-18 11:59 ` [PATCH 05/16] drm/i915: Add a FIXME about drrs/psr interactions Daniel Vetter
2014-06-18 11:59 ` [PATCH 06/16] drm/i915: Track the psr dp connector in dev_priv->psr.enabled Daniel Vetter
2014-06-18 11:59 ` [PATCH 07/16] drm/i915: Don't try to disable psr harder from the work item Daniel Vetter
2014-06-18 11:59 ` [PATCH 08/16] drm/i915: Lock down psr sw/hw state tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 09/16] drm/i915: More checks for psr.enabled Daniel Vetter
2014-06-18 12:27   ` Chris Wilson
2014-06-18 12:41     ` Daniel Vetter
2014-06-18 12:46       ` Chris Wilson
2014-06-18 13:03         ` Daniel Vetter
2014-06-18 11:59 ` [PATCH 10/16] drm/i915: Add locking to psr code Daniel Vetter
2014-06-18 11:59 ` [PATCH 11/16] drm/i915: Introduce accurate frontbuffer tracking Daniel Vetter
2014-06-18 12:20   ` Chris Wilson
2014-06-18 13:01   ` [PATCH] " Daniel Vetter
2014-06-18 14:55     ` Chris Wilson
2014-06-18 15:55       ` Daniel Vetter [this message]
2014-06-18 15:58         ` Chris Wilson
2014-06-18 16:05           ` Daniel Vetter
2014-06-18 16:14             ` Chris Wilson
2014-06-18 21:28     ` Daniel Vetter
2014-06-19  7:29       ` Chris Wilson
2014-06-18 13:05   ` [PATCH] drm/i915: Properly track domain of the fbcon fb Daniel Vetter
2014-06-18 14:57     ` Chris Wilson
2014-06-18 15:57       ` Daniel Vetter
2014-06-18 16:15         ` Chris Wilson
2014-06-18 11:59 ` [PATCH 12/16] drm/i915: Use new frontbuffer bits to increase pll clock Daniel Vetter
2014-06-18 14:46   ` Chris Wilson
2014-06-18 11:59 ` [PATCH 13/16] drm/i915: Properly track domain of the fbcon fb Daniel Vetter
2014-06-18 12:10   ` Chris Wilson
2014-06-18 12:44     ` Daniel Vetter
2014-06-18 13:09   ` [PATCH] " Daniel Vetter
2014-06-18 11:59 ` [PATCH 14/16] drm/i915: Track frontbuffer invalidation/flushing Daniel Vetter
2014-06-18 14:43   ` Chris Wilson
2014-06-19 12:41   ` [PATCH] " Daniel Vetter
2014-06-19 13:02     ` Chris Wilson
2014-06-19 13:54       ` Daniel Vetter
2014-06-19 14:01     ` Daniel Vetter
2014-06-19 15:12       ` Chris Wilson
2014-06-19 16:15         ` Daniel Vetter
2014-06-18 11:59 ` [PATCH 15/16] drm/i915: Fix up PSR frontbuffer tracking Daniel Vetter
2014-06-18 11:59 ` [PATCH 16/16] drm/i915: Improve PSR debugfs output Daniel Vetter
2014-06-18 12:46   ` [PATCH] drm/i915: Print obj->frontbuffer_bits in " Daniel Vetter
2014-06-18 14:50     ` Chris Wilson
2014-06-18 16:00       ` Daniel Vetter
2014-06-18 14:51   ` [PATCH 16/16] drm/i915: Improve PSR " Chris Wilson
2014-06-18 16:02     ` Daniel Vetter
2014-06-18 13:08 ` [PATCH] drm/i915: Remove redundant HAS_PSR checks Daniel Vetter

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=20140618155531.GK5821@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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