[PATCH 09/16] drm/irq: Use unsigned int pipe in public API
Vincent ABRIOU
vincent.abriou at st.com
Thu Oct 1 07:46:32 PDT 2015
On 09/24/2015 06:35 PM, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> This continues the pattern started in commit cc1ef118fc09 ("drm/irq:
> Make pipe unsigned and name consistent"). This is applied to the public
> APIs and driver callbacks, so pretty much all drivers need to be updated
> to match the new prototypes.
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Russell King <rmk+kernel at arm.linux.org.uk>
> Cc: Inki Dae <inki.dae at samsung.com>
> Cc: Jianwei Wang <jianwei.wang.chn at gmail.com>
> Cc: Alison Wang <alison.wang at freescale.com>
> Cc: Patrik Jakobsson <patrik.r.jakobsson at gmail.com>
> Cc: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: Ben Skeggs <bskeggs at redhat.com>
> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Mark Yao <mark.yao at rock-chips.com>
> Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
> Cc: Vincent Abriou <vincent.abriou at st.com>
> Cc: Thomas Hellstrom <thellstrom at vmware.com>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
[...]
> drivers/gpu/drm/sti/sti_crtc.c | 16 ++++++------
> drivers/gpu/drm/sti/sti_crtc.h | 4 +--
[...]
> diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c
> index 81c56ea9d87f..c6fb8dee11de 100644
> --- a/drivers/gpu/drm/sti/sti_crtc.c
> +++ b/drivers/gpu/drm/sti/sti_crtc.c
> @@ -299,7 +299,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,
> return 0;
> }
>
> -int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)
> +int sti_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe)
> {
> struct sti_private *dev_priv = dev->dev_private;
> struct sti_compositor *compo = dev_priv->compo;
> @@ -307,9 +307,9 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)
>
> DRM_DEBUG_DRIVER("\n");
>
> - if (sti_vtg_register_client(crtc == STI_MIXER_MAIN ?
> + if (sti_vtg_register_client(pipe == STI_MIXER_MAIN ?
> compo->vtg_main : compo->vtg_aux,
> - vtg_vblank_nb, crtc)) {
> + vtg_vblank_nb, pipe)) {
> DRM_ERROR("Cannot register VTG notifier\n");
> return -EINVAL;
> }
> @@ -318,7 +318,7 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)
> }
> EXPORT_SYMBOL(sti_crtc_enable_vblank);
>
> -void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc)
> +void sti_crtc_disable_vblank(struct drm_device *drm_dev, unsigned int pipe)
> {
> struct sti_private *priv = drm_dev->dev_private;
> struct sti_compositor *compo = priv->compo;
> @@ -326,14 +326,14 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc)
>
> DRM_DEBUG_DRIVER("\n");
>
> - if (sti_vtg_unregister_client(crtc == STI_MIXER_MAIN ?
> + if (sti_vtg_unregister_client(pipe == STI_MIXER_MAIN ?
> compo->vtg_main : compo->vtg_aux, vtg_vblank_nb))
> DRM_DEBUG_DRIVER("Warning: cannot unregister VTG notifier\n");
>
> /* free the resources of the pending requests */
> - if (compo->mixer[crtc]->pending_event) {
> - drm_vblank_put(drm_dev, crtc);
> - compo->mixer[crtc]->pending_event = NULL;
> + if (compo->mixer[pipe]->pending_event) {
> + drm_vblank_put(drm_dev, pipe);
> + compo->mixer[pipe]->pending_event = NULL;
> }
> }
> EXPORT_SYMBOL(sti_crtc_disable_vblank);
> diff --git a/drivers/gpu/drm/sti/sti_crtc.h b/drivers/gpu/drm/sti/sti_crtc.h
> index 51963e6ddbe7..3f2d89a3634d 100644
> --- a/drivers/gpu/drm/sti/sti_crtc.h
> +++ b/drivers/gpu/drm/sti/sti_crtc.h
> @@ -13,8 +13,8 @@ struct sti_mixer;
>
> int sti_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer,
> struct drm_plane *primary, struct drm_plane *cursor);
> -int sti_crtc_enable_vblank(struct drm_device *dev, int crtc);
> -void sti_crtc_disable_vblank(struct drm_device *dev, int crtc);
> +int sti_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe);
> +void sti_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe);
> int sti_crtc_vblank_cb(struct notifier_block *nb,
> unsigned long event, void *data);
> bool sti_crtc_is_main(struct drm_crtc *drm_crtc);
Tested on top of next-20151001.
You can add my Ack-by on this patch
Ack-by: Vincent Abriou <vincent.abriou at st.com>
Vincent
More information about the dri-devel
mailing list