Skip to content

Commit 6c9e14e

Browse files
committed
drm/mgag200: Fix VBLANK interrupt handling
Fix support for VBLANK interrupts on G200ER, G200EV and G200SE, which use a slightly different implementation than the others. The original commits forgot to update the custom helpers when adding interrupt handling for VBLANK events. Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 89c6ea2 ("drm/mgag200: Add vblank support") Fixes: d5070c9 ("drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp") Cc: Thomas Zimmermann <[email protected]> Cc: Jocelyn Falempe <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Acked-by: Sui Jingfeng <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent a755947 commit 6c9e14e

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

drivers/gpu/drm/mgag200/mgag200_g200er.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,17 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,
209209

210210
if (mdev->info->sync_bmc)
211211
mgag200_bmc_start_scanout(mdev);
212+
213+
drm_crtc_vblank_on(crtc);
212214
}
213215

214216
static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = {
215217
.mode_valid = mgag200_crtc_helper_mode_valid,
216218
.atomic_check = mgag200_crtc_helper_atomic_check,
217219
.atomic_flush = mgag200_crtc_helper_atomic_flush,
218220
.atomic_enable = mgag200_g200er_crtc_helper_atomic_enable,
219-
.atomic_disable = mgag200_crtc_helper_atomic_disable
221+
.atomic_disable = mgag200_crtc_helper_atomic_disable,
222+
.get_scanout_position = mgag200_crtc_helper_get_scanout_position,
220223
};
221224

222225
static const struct drm_crtc_funcs mgag200_g200er_crtc_funcs = {

drivers/gpu/drm/mgag200/mgag200_g200ev.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,17 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,
210210

211211
if (mdev->info->sync_bmc)
212212
mgag200_bmc_start_scanout(mdev);
213+
214+
drm_crtc_vblank_on(crtc);
213215
}
214216

215217
static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = {
216218
.mode_valid = mgag200_crtc_helper_mode_valid,
217219
.atomic_check = mgag200_crtc_helper_atomic_check,
218220
.atomic_flush = mgag200_crtc_helper_atomic_flush,
219221
.atomic_enable = mgag200_g200ev_crtc_helper_atomic_enable,
220-
.atomic_disable = mgag200_crtc_helper_atomic_disable
222+
.atomic_disable = mgag200_crtc_helper_atomic_disable,
223+
.get_scanout_position = mgag200_crtc_helper_get_scanout_position,
221224
};
222225

223226
static const struct drm_crtc_funcs mgag200_g200ev_crtc_funcs = {

drivers/gpu/drm/mgag200/mgag200_g200se.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,17 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,
341341

342342
if (mdev->info->sync_bmc)
343343
mgag200_bmc_start_scanout(mdev);
344+
345+
drm_crtc_vblank_on(crtc);
344346
}
345347

346348
static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = {
347349
.mode_valid = mgag200_crtc_helper_mode_valid,
348350
.atomic_check = mgag200_crtc_helper_atomic_check,
349351
.atomic_flush = mgag200_crtc_helper_atomic_flush,
350352
.atomic_enable = mgag200_g200se_crtc_helper_atomic_enable,
351-
.atomic_disable = mgag200_crtc_helper_atomic_disable
353+
.atomic_disable = mgag200_crtc_helper_atomic_disable,
354+
.get_scanout_position = mgag200_crtc_helper_get_scanout_position,
352355
};
353356

354357
static const struct drm_crtc_funcs mgag200_g200se_crtc_funcs = {

0 commit comments

Comments
 (0)