diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2016-09-06 09:42:25 +0200 |
---|---|---|
committer | Vincent Abriou <vincent.abriou@st.com> | 2016-09-20 11:32:06 +0200 |
commit | ffdbb82ca4e01b468871dc683e6c3ae169995f0a (patch) | |
tree | 487c25b7b58ae393d36633ed8b4eb078d089dbd8 /drivers/gpu/drm/sti/sti_crtc.c | |
parent | ae2178503d4237047db4afb5888aa7c8e8b820fb (diff) | |
download | linux-ffdbb82ca4e01b468871dc683e6c3ae169995f0a.tar.gz linux-ffdbb82ca4e01b468871dc683e6c3ae169995f0a.tar.bz2 linux-ffdbb82ca4e01b468871dc683e6c3ae169995f0a.zip |
drm/sti: use vtg array instead of vtg_main/aux
This is more generic and more consistent with the other members of the
sti_compositor struct.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_crtc.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_crtc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c index 2f41cbe03a38..96afe68cbdf7 100644 --- a/drivers/gpu/drm/sti/sti_crtc.c +++ b/drivers/gpu/drm/sti/sti_crtc.c @@ -86,8 +86,7 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) goto pix_error; } - sti_vtg_set_config(mixer->id == STI_MIXER_MAIN ? - compo->vtg_main : compo->vtg_aux, &crtc->mode); + sti_vtg_set_config(compo->vtg[mixer->id], &crtc->mode); if (sti_mixer_active_video_area(mixer, &crtc->mode)) { DRM_ERROR("Can't set active video area\n"); @@ -297,12 +296,11 @@ int sti_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe) struct sti_compositor *compo = dev_priv->compo; struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb[pipe]; struct drm_crtc *crtc = &compo->mixer[pipe]->drm_crtc; + struct sti_vtg *vtg = compo->vtg[pipe]; DRM_DEBUG_DRIVER("\n"); - if (sti_vtg_register_client(pipe == STI_MIXER_MAIN ? - compo->vtg_main : compo->vtg_aux, - vtg_vblank_nb, crtc)) { + if (sti_vtg_register_client(vtg, vtg_vblank_nb, crtc)) { DRM_ERROR("Cannot register VTG notifier\n"); return -EINVAL; } @@ -316,11 +314,11 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, unsigned int pipe) struct sti_compositor *compo = priv->compo; struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb[pipe]; struct drm_crtc *crtc = &compo->mixer[pipe]->drm_crtc; + struct sti_vtg *vtg = compo->vtg[pipe]; DRM_DEBUG_DRIVER("\n"); - if (sti_vtg_unregister_client(pipe == STI_MIXER_MAIN ? - compo->vtg_main : compo->vtg_aux, vtg_vblank_nb)) + if (sti_vtg_unregister_client(vtg, vtg_vblank_nb)) DRM_DEBUG_DRIVER("Warning: cannot unregister VTG notifier\n"); /* free the resources of the pending requests */ |