From 3c94952c38cefce6fde11b0cb44d7f961237faa8 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 11 Sep 2018 09:15:42 +0200 Subject: [PATCH] staging: vboxvideo: Skip currrent crtc when updating crtcs In vbox_crtc_set_base_and_mode() we update all the crtcs when the single_framebuffer setting changes, including the one on which vbox_crtc_set_base_and_mode() was called, so we end up doing vbox_do_modeset() on it twice. This commit skips the crtc on which we are updating in the loop to update the other crtcs. This commit also removes the vbox_set_view() call from the loop, vbox_set_view() does not depend on the single_framebuffer setting and it was being called on the passed in crtc parameter and not on the crtci local iterator value (typo), so it was a no-op already. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vboxvideo/vbox_mode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c index 47de136..e7d70ce 100644 --- a/drivers/staging/vboxvideo/vbox_mode.c +++ b/drivers/staging/vboxvideo/vbox_mode.c @@ -287,7 +287,8 @@ static int vbox_crtc_set_base_and_mode(struct drm_crtc *crtc, list_for_each_entry(crtci, &vbox->dev->mode_config.crtc_list, head) { - vbox_set_view(crtc); + if (crtci == crtc) + continue; vbox_do_modeset(crtci, &crtci->mode); } } -- 2.7.4