All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Initialize drm_driver vblank funcs at compile time
Date: Wed, 19 Jun 2019 19:18:52 +0300	[thread overview]
Message-ID: <20190619161852.GA5942@intel.com> (raw)
In-Reply-To: <156086971035.31375.13192884909397662143@skylake-alporthouse-com>

On Tue, Jun 18, 2019 at 03:55:10PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-06-18 15:21:08)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Move the .get_vblank_timestamp() and .get_scanout_position()
> > initialization to happen at compile time. No point in delaying
> > it since we always assign the same functions.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c |  3 +++
> >  drivers/gpu/drm/i915/i915_irq.c | 11 ++++-------
> >  drivers/gpu/drm/i915/i915_irq.h |  5 +++++
> >  3 files changed, 12 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ea6b06109d5a..178e9872b905 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -3216,6 +3216,9 @@ static struct drm_driver driver = {
> >         .gem_prime_export = i915_gem_prime_export,
> >         .gem_prime_import = i915_gem_prime_import,
> >  
> > +       .get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
> > +       .get_scanout_position = i915_get_crtc_scanoutpos,
> 
> One might suggest intel_get_crtc_scanoutpos, and a push for it to be
> passed drm_crtc instead of dev + pipe.

I suppose. There's also a FIXME about moving it to the crtc_helper funcs
instead. Or could just remove the vfunc entirely and have each driver
pass it to drm_calc_vbltimestamp_from_scanoutpos(). Either that or
eliminate the .get_vblank_timestamp() vfunc instead since I believe
everyone who has that uses drm_calc_vbltimestamp_from_scanoutpos().

Anyways, looks like there's enough material there for a good few hours
of cursing.

> 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-06-19 16:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 14:21 [PATCH 0/3] drm/i915: Finish drm_driver vfunc cleanup Ville Syrjala
2019-06-18 14:21 ` [PATCH 1/3] drm/i915: Fix various tracepoints for gen2 Ville Syrjala
2019-06-18 14:46   ` Chris Wilson
2019-06-18 15:14     ` Ville Syrjälä
2019-06-18 14:21 ` [PATCH 2/3] drm/i915: Nuke drm_driver irq vfuncs Ville Syrjala
2019-06-18 14:54   ` Chris Wilson
2019-06-18 15:26     ` Ville Syrjälä
2019-06-18 14:21 ` [PATCH 3/3] drm/i915: Initialize drm_driver vblank funcs at compile time Ville Syrjala
2019-06-18 14:55   ` Chris Wilson
2019-06-19 16:18     ` Ville Syrjälä [this message]
2019-06-18 15:12 ` ✗ Fi.CI.BAT: failure for drm/i915: Finish drm_driver vfunc cleanup Patchwork

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=20190619161852.GA5942@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.