[PATCH 08/12] drm/irq: Add kms-native crtc interface functions
thierry.reding at gmail.com
Thu May 15 00:34:27 PDT 2014
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 at ffwll.ch>
> 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));
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
Reviewed-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: not available
More information about the dri-devel