On Wed, May 14, 2014 at 08:51:10PM +0200, Daniel Vetter wrote: > We need to start somewhere ... With this the only places left in i915 > where we use pipe integers is in the interrupt handling code. And > there it actually makes some amount of sense. Very much welcome addition. Some minor comments below. > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > --- > drivers/gpu/drm/drm_irq.c | 81 ++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/i915/intel_display.c | 22 +++++----- Perhaps move the i915 changes into a separate commit? > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c [...] > /** > + * drm_crtc_vblank_get - get a reference count on vblank events > + * @dev: drm device > + * @crtc: which CRTC to own > + * > + * Acquire a reference count on vblank events to avoid having them disabled > + * while in use. > + * > + * This is the native kms version of drm_vblank_off(). > + * > + * Returns: > + * Zero on success, nonzero on failure. > + */ > +int drm_crtc_vblank_get(struct drm_device *dev, struct drm_crtc *crtc) > +{ > + return drm_vblank_get(dev, drm_crtc_index(crtc)); > +} > +EXPORT_SYMBOL(drm_crtc_vblank_get); This seems slightly backwards. Since drm_vblank_get() is what's being deprecated here, wouldn't it make more sense to write drm_crtc_vblank_get() in terms of struct drm_crtc and make drm_vblank_get() call that instead? I can't seem to find a helper to get the CRTC from an index, but it seems like that wouldn't be hard to do. I guess it doesn't matter all that much either way, though, since we could equally well make that change when drm_vblank_get() is dropped, in which case at least there's no longer a need for the reverse lookup. I'd still prefer to have i915 changes in a separate commit, but otherwise: Reviewed-by: Thierry Reding <treding@xxxxxxxxxx>
Attachment:
pgpIElCWI7r9q.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx