diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-09-15 10:53:46 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-10-16 11:47:46 +0200 |
commit | a87e3159d488a125838eb6b8694549afca5e03be (patch) | |
tree | c83f46dd7725e66c2a61951a8e6ecf3af7e19d82 | |
parent | 03f716f61e5560fee2c9c40db2a1ae318053c03d (diff) | |
download | linux-stable-a87e3159d488a125838eb6b8694549afca5e03be.tar.gz linux-stable-a87e3159d488a125838eb6b8694549afca5e03be.tar.bz2 linux-stable-a87e3159d488a125838eb6b8694549afca5e03be.zip |
drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()
Move the shmob_drm_crtc_finish_page_flip() function up, to avoid having
to move it during the modification in the next change.
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/4c87bb31403d142f8f146176cb859a10a28a3601.1694767209.git.geert+renesas@glider.be
-rw-r--r-- | drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c index f55b5263e611..0adf5d33ba31 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c @@ -36,6 +36,26 @@ */ /* ----------------------------------------------------------------------------- + * Page Flip + */ + +void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) +{ + struct drm_pending_vblank_event *event; + struct drm_device *dev = scrtc->base.dev; + unsigned long flags; + + spin_lock_irqsave(&dev->event_lock, flags); + event = scrtc->event; + scrtc->event = NULL; + if (event) { + drm_crtc_send_vblank_event(&scrtc->base, event); + drm_crtc_vblank_put(&scrtc->base); + } + spin_unlock_irqrestore(&dev->event_lock, flags); +} + +/* ----------------------------------------------------------------------------- * CRTC */ @@ -364,22 +384,6 @@ static const struct drm_crtc_helper_funcs crtc_helper_funcs = { .mode_set_base = shmob_drm_crtc_mode_set_base, }; -void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) -{ - struct drm_pending_vblank_event *event; - struct drm_device *dev = scrtc->base.dev; - unsigned long flags; - - spin_lock_irqsave(&dev->event_lock, flags); - event = scrtc->event; - scrtc->event = NULL; - if (event) { - drm_crtc_send_vblank_event(&scrtc->base, event); - drm_crtc_vblank_put(&scrtc->base); - } - spin_unlock_irqrestore(&dev->event_lock, flags); -} - static int shmob_drm_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event, |