Commit 3c8639ce authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

The callback struct drm_driver.get_scanout_position() is deprecated in
favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert vc4
over.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123135943.24140-18-tzimmermann@suse.de
parent 87b09c62
...@@ -84,13 +84,14 @@ static const struct debugfs_reg32 crtc_regs[] = { ...@@ -84,13 +84,14 @@ static const struct debugfs_reg32 crtc_regs[] = {
VC4_REG32(PV_HACT_ACT), VC4_REG32(PV_HACT_ACT),
}; };
bool vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id, static bool vc4_crtc_get_scanout_position(struct drm_crtc *crtc,
bool in_vblank_irq, int *vpos, int *hpos, bool in_vblank_irq,
ktime_t *stime, ktime_t *etime, int *vpos, int *hpos,
const struct drm_display_mode *mode) ktime_t *stime, ktime_t *etime,
const struct drm_display_mode *mode)
{ {
struct drm_device *dev = crtc->dev;
struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_dev *vc4 = to_vc4_dev(dev);
struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id);
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
u32 val; u32 val;
int fifo_lines; int fifo_lines;
...@@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { ...@@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = {
.atomic_flush = vc4_crtc_atomic_flush, .atomic_flush = vc4_crtc_atomic_flush,
.atomic_enable = vc4_crtc_atomic_enable, .atomic_enable = vc4_crtc_atomic_enable,
.atomic_disable = vc4_crtc_atomic_disable, .atomic_disable = vc4_crtc_atomic_disable,
.get_scanout_position = vc4_crtc_get_scanout_position,
}; };
static const struct vc4_crtc_data pv0_data = { static const struct vc4_crtc_data pv0_data = {
......
...@@ -190,7 +190,6 @@ static struct drm_driver vc4_drm_driver = { ...@@ -190,7 +190,6 @@ static struct drm_driver vc4_drm_driver = {
.irq_postinstall = vc4_irq_postinstall, .irq_postinstall = vc4_irq_postinstall,
.irq_uninstall = vc4_irq_uninstall, .irq_uninstall = vc4_irq_uninstall,
.get_scanout_position = vc4_crtc_get_scanoutpos,
.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos, .get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
......
...@@ -743,10 +743,6 @@ void vc4_bo_remove_from_purgeable_pool(struct vc4_bo *bo); ...@@ -743,10 +743,6 @@ void vc4_bo_remove_from_purgeable_pool(struct vc4_bo *bo);
/* vc4_crtc.c */ /* vc4_crtc.c */
extern struct platform_driver vc4_crtc_driver; extern struct platform_driver vc4_crtc_driver;
bool vc4_crtc_get_scanoutpos(struct drm_device *dev, unsigned int crtc_id,
bool in_vblank_irq, int *vpos, int *hpos,
ktime_t *stime, ktime_t *etime,
const struct drm_display_mode *mode);
void vc4_crtc_handle_vblank(struct vc4_crtc *crtc); void vc4_crtc_handle_vblank(struct vc4_crtc *crtc);
void vc4_crtc_txp_armed(struct drm_crtc_state *state); void vc4_crtc_txp_armed(struct drm_crtc_state *state);
void vc4_crtc_get_margins(struct drm_crtc_state *state, void vc4_crtc_get_margins(struct drm_crtc_state *state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment