From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: [PATCH 02/13] drm/bochs: Store correct CRTC index in events Date: Tue, 16 Dec 2014 17:53:24 +0100 Message-ID: <1418748815-15434-2-git-send-email-thierry.reding@gmail.com> References: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> Return-path: Received: from mail-pa0-f54.google.com ([209.85.220.54]:56740 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbaLPQxo (ORCPT ); Tue, 16 Dec 2014 11:53:44 -0500 Received: by mail-pa0-f54.google.com with SMTP id fb1so14506677pad.27 for ; Tue, 16 Dec 2014 08:53:44 -0800 (PST) In-Reply-To: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: dri-devel@lists.freedesktop.org Cc: Daniel Vetter , Inki Dae , Philipp Zabel , Gerd Hoffmann , Mark Yao , Benjamin Gaignard , linux-samsung-soc@vger.kernel.org From: Thierry Reding Previously a negative pipe caused a special case to be triggered for drivers that didn't have proper VBLANK support. The trigger for this special case is now independent of the pipe, so the correct CRTC index can now be stored in events. Cc: Gerd Hoffmann Signed-off-by: Thierry Reding --- drivers/gpu/drm/bochs/bochs_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 26bcd03a8cb6..c219c1de3722 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -113,13 +113,14 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc, struct bochs_device *bochs = container_of(crtc, struct bochs_device, crtc); struct drm_framebuffer *old_fb = crtc->primary->fb; + unsigned int pipe = drm_crtc_index(crtc); unsigned long irqflags; crtc->primary->fb = fb; bochs_crtc_mode_set_base(crtc, 0, 0, old_fb); if (event) { spin_lock_irqsave(&bochs->dev->event_lock, irqflags); - drm_send_vblank_event(bochs->dev, -1, event); + drm_send_vblank_event(bochs->dev, pipe, event); spin_unlock_irqrestore(&bochs->dev->event_lock, irqflags); } return 0; -- 2.1.3