drm/mgag200: Fix VBLANK interrupt handling
Subsystems (3)
Thomas Zimmermann
maintainerPATCH 1/1 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.
--- drivers/gpu/drm/mgag200/mgag200_g200er.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200se.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/mgag200/mgag200_g200er.c +4 -1
@@ -209,6 +209,8 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = {
@@ -216,7 +218,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200er_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200er_crtc_funcs = {
drivers/gpu/drm/mgag200/mgag200_g200ev.c +4 -1
@@ -210,6 +210,8 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = {
@@ -217,7 +219,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200ev_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200ev_crtc_funcs = {
drivers/gpu/drm/mgag200/mgag200_g200se.c +4 -1
@@ -341,6 +341,8 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = {
@@ -348,7 +350,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200se_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200se_crtc_funcs = {
Signature · 1 line
2.45.2
Hi,
Quoted 6 lines · Thomas Zimmermann
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]>
LGTM,
Signature · 2 lines
Best regards, Sui
Thomas Zimmermann
maintainerAm 31.07.24 um 13:29 schrieb Sui Jingfeng:
Quoted 9 lines
Hi,
Quoted 5 lines · Thomas Zimmermann
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.
Quoted 8 lines
Quoted 1 line
Signed-off-by Thomas Zimmermann <[email protected]>LGTM,
Acked-by [email protected]
Thanks!
Signature · 7 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Quoted 4 lines · Thomas Zimmermann
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.
Thanks, it looks good to me.
Quoted 84 lines
Signed-off-by Thomas Zimmermann <[email protected]>Fixes 89c6ea2006e2 ("drm/mgag200: Add vblank support")Fixes d5070c9b2944 ("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]>--- drivers/gpu/drm/mgag200/mgag200_g200er.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200ev.c | 5 ++++- drivers/gpu/drm/mgag200/mgag200_g200se.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-)drivers/gpu/drm/mgag200/mgag200_g200er.c +4
-1@@ -209,6 +209,8 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = {@@ -216,7 +218,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200er_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200er_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200er_crtc_funcs = {drivers/gpu/drm/mgag200/mgag200_g200ev.c +4
-1@@ -210,6 +210,8 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = {@@ -217,7 +219,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200ev_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200ev_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200ev_crtc_funcs = {drivers/gpu/drm/mgag200/mgag200_g200se.c +4
-1@@ -341,6 +341,8 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,if (mdev->info->sync_bmc)mgag200_bmc_start_scanout (mdev); + +drm_crtc_vblank_on (crtc); }static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = {@@ -348,7 +350,8 @@ static const struct drm_crtc_helper_funcs mgag200_g200se_crtc_helper_funcs = { .atomic_check = mgag200_crtc_helper_atomic_check, .atomic_flush = mgag200_crtc_helper_atomic_flush, .atomic_enable = mgag200_g200se_crtc_helper_atomic_enable, - .atomic_disable = mgag200_crtc_helper_atomic_disable + .atomic_disable = mgag200_crtc_helper_atomic_disable, + .get_scanout_position = mgag200_crtc_helper_get_scanout_position, };static const struct drm_crtc_funcs mgag200_g200se_crtc_funcs = {