Skip to content

Commit

Permalink
drm/mgag200: Fix VBLANK interrupt handling
Browse files Browse the repository at this point in the history
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 <tzimmermann@suse.de>
Fixes: 89c6ea2 ("drm/mgag200: Add vblank support")
Fixes: d5070c9 ("drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240731071004.519566-1-tzimmermann@suse.de
  • Loading branch information
Thomas Zimmermann committed Aug 1, 2024
1 parent a755947 commit 6c9e14e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/mgag200/mgag200_g200er.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@ 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 = {
.mode_valid = mgag200_crtc_helper_mode_valid,
.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 = {
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/mgag200/mgag200_g200ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,17 @@ 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 = {
.mode_valid = mgag200_crtc_helper_mode_valid,
.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 = {
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/mgag200/mgag200_g200se.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,17 @@ 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 = {
.mode_valid = mgag200_crtc_helper_mode_valid,
.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 = {
Expand Down

0 comments on commit 6c9e14e

Please sign in to comment.