From: Daniel Vetter <daniel@ffwll.ch>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3] drm: Store the plane's index
Date: Fri, 3 Jun 2016 00:02:56 +0200 [thread overview]
Message-ID: <20160602220256.GV7231@phenom.ffwll.local> (raw)
In-Reply-To: <20160527204319.GA19214@intel.com>
On Fri, May 27, 2016 at 01:43:19PM -0700, Matt Roper wrote:
> On Fri, May 27, 2016 at 08:05:00PM +0100, Chris Wilson wrote:
> > Currently the plane's index is determined by walking the list of all
> > planes in the mode and finding the position of that plane in the list. A
> > linear walk, especially a linear walk within a linear walk as frequently
> > conceived by i915.ko [O(N^2)] quickly comes to dominate profiles.
> >
> > The plane's index is constant for as long as no earlier planes are
> > removed from the list. For all drivers, planes are static, determined
> > at boot and then untouched until shutdown. In fact, there is no locking
> > provided to allow for dynamic removal of planes/encoders/crtcs.
> >
> > v2: Convert drm_crtc_index() and drm_encoder_index() as well.
> > v3: Stop adjusting the indices upon removal; consider the list
> > construct-only.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Matt Roper <matthew.d.roper@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> ...snip...
> > @@ -2337,7 +2369,18 @@ extern int drm_plane_init(struct drm_device *dev,
> > const uint32_t *formats, unsigned int format_count,
> > bool is_primary);
> > extern void drm_plane_cleanup(struct drm_plane *plane);
> > -extern unsigned int drm_plane_index(struct drm_plane *plane);
> > +
> > +/**
> > + * drm_plane_index - find the index of a registered plane
> > + * @plane: plane to find index for
> > + *
> > + * Given a registered plane, return the index of that CRTC within a DRM
>
> "index of that plane"
Fixed ..
>
> Otherwise,
>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
... and applied to drm-misc.
-Daniel
>
>
>
> Matt
>
> > + * device's list of planes.
> > + */
> > +static inline unsigned int drm_plane_index(struct drm_plane *plane)
> > +{
> > + return plane->index;
> > +}
> > extern struct drm_plane * drm_plane_from_index(struct drm_device *dev, int idx);
> > extern void drm_plane_force_disable(struct drm_plane *plane);
> > extern int drm_plane_check_pixel_format(const struct drm_plane *plane,
> > --
> > 2.8.1
> >
>
> --
> Matt Roper
> Graphics Software Engineer
> IoTG Platform Enabling & Development
> Intel Corporation
> (916) 356-2795
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-06-02 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 9:34 [PATCH] drm: Store the plane's index Chris Wilson
2016-05-26 10:02 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-05-26 11:27 ` [PATCH] " Ville Syrjälä
2016-05-26 12:17 ` Chris Wilson
2016-05-26 15:17 ` Matt Roper
2016-05-27 6:44 ` Daniel Vetter
2016-05-27 19:05 ` [PATCH v3] " Chris Wilson
2016-05-27 20:43 ` Matt Roper
2016-06-02 22:02 ` Daniel Vetter [this message]
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=20160602220256.GV7231@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@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