aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_vtg.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-09-24 18:35:38 +0200
committerVincent Abriou <vincent.abriou@st.com>2015-11-03 13:04:53 +0100
commit2388693e10026ec0be2f7de0bb8fcb5a9bc119f9 (patch)
tree2b8995ec23b4e545c8150db58979b86fb69655ba /drivers/gpu/drm/sti/sti_vtg.c
parentdrm/sti: Store correct CRTC index in events (diff)
downloadlinux-dev-2388693e10026ec0be2f7de0bb8fcb5a9bc119f9.tar.xz
linux-dev-2388693e10026ec0be2f7de0bb8fcb5a9bc119f9.zip
drm/sti: Use drm_crtc_vblank_*() API
Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct drm_crtc. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_vtg.c')
-rw-r--r--drivers/gpu/drm/sti/sti_vtg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index aa8097137701..4d8a918db6f5 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -79,7 +79,7 @@ LIST_HEAD(vtg_lookup);
* @irq: VTG irq
* @type: VTG type (main or aux)
* @notifier_list: notifier callback
- * @crtc_id: the crtc id for vblank event
+ * @crtc: the CRTC for vblank event
* @slave: slave vtg
* @link: List node to link the structure in lookup list
*/
@@ -90,7 +90,7 @@ struct sti_vtg {
int irq;
u32 irq_status;
struct raw_notifier_head notifier_list;
- int crtc_id;
+ struct drm_crtc *crtc;
struct sti_vtg *slave;
struct list_head link;
};
@@ -283,13 +283,13 @@ u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x)
}
EXPORT_SYMBOL(sti_vtg_get_pixel_number);
-int sti_vtg_register_client(struct sti_vtg *vtg,
- struct notifier_block *nb, int crtc_id)
+int sti_vtg_register_client(struct sti_vtg *vtg, struct notifier_block *nb,
+ struct drm_crtc *crtc)
{
if (vtg->slave)
- return sti_vtg_register_client(vtg->slave, nb, crtc_id);
+ return sti_vtg_register_client(vtg->slave, nb, crtc);
- vtg->crtc_id = crtc_id;
+ vtg->crtc = crtc;
return raw_notifier_chain_register(&vtg->notifier_list, nb);
}
EXPORT_SYMBOL(sti_vtg_register_client);
@@ -311,7 +311,7 @@ static irqreturn_t vtg_irq_thread(int irq, void *arg)
event = (vtg->irq_status & VTG_IRQ_TOP) ?
VTG_TOP_FIELD_EVENT : VTG_BOTTOM_FIELD_EVENT;
- raw_notifier_call_chain(&vtg->notifier_list, event, &vtg->crtc_id);
+ raw_notifier_call_chain(&vtg->notifier_list, event, vtg->crtc);
return IRQ_HANDLED;
}