Commit a3c27df2 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/xen: Explicitly disable automatic sending of vblank event

The atomic helpers automatically send out fake VBLANK events if no
vblanking has been initialized. This would apply to xen, but xen has
its own vblank logic. To avoid interfering with the atomic helpers,
disable automatic vblank events explicitly.

v5:
	* update comment
v4:
	* separate commit from core vblank changes
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200129120531.6891-16-tzimmermann@suse.de
parent 2a735ad3
...@@ -220,6 +220,24 @@ static bool display_send_page_flip(struct drm_simple_display_pipe *pipe, ...@@ -220,6 +220,24 @@ static bool display_send_page_flip(struct drm_simple_display_pipe *pipe,
return false; return false;
} }
static int display_check(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state,
struct drm_crtc_state *crtc_state)
{
/*
* Xen doesn't initialize vblanking via drm_vblank_init(), so
* DRM helpers assume that it doesn't handle vblanking and start
* sending out fake VBLANK events automatically.
*
* As xen contains it's own logic for sending out VBLANK events
* in send_pending_event(), disable no_vblank (i.e., the xen
* driver has vblanking support).
*/
crtc_state->no_vblank = false;
return 0;
}
static void display_update(struct drm_simple_display_pipe *pipe, static void display_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_plane_state) struct drm_plane_state *old_plane_state)
{ {
...@@ -284,6 +302,7 @@ static const struct drm_simple_display_pipe_funcs display_funcs = { ...@@ -284,6 +302,7 @@ static const struct drm_simple_display_pipe_funcs display_funcs = {
.enable = display_enable, .enable = display_enable,
.disable = display_disable, .disable = display_disable,
.prepare_fb = drm_gem_fb_simple_display_pipe_prepare_fb, .prepare_fb = drm_gem_fb_simple_display_pipe_prepare_fb,
.check = display_check,
.update = display_update, .update = display_update,
}; };
......
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