From patchwork Tue Dec 16 16:53:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5502061 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D8A419F1D4 for ; Tue, 16 Dec 2014 16:53:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9C0A20A24 for ; Tue, 16 Dec 2014 16:53:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D43F020A1C for ; Tue, 16 Dec 2014 16:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751059AbaLPQxp (ORCPT ); Tue, 16 Dec 2014 11:53:45 -0500 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HRpJHLko7SsmodOSsEJa+8RMFX0X53Keb3IIOpg0KXY=; b=cPMBk0iADH7bx/K5xhD2AlwSdIhbRipYz2PTrWIjut01htWfXRu6C/cN4nVDv0TlbJ 6e2e1sgLuGxwhD6oljlndG8C0ndNpt/kzIRQaoyReAohiAgBcTTCbXhZjVM6YdwWAQd6 va1mF/o5M0MEdE/QwTTpfP3NBn/gQ9Rok/yNHvaEiXRYvJWJ9g+40lY5dgUrFTMxFpFR bR99+NDpHbqpXeQjoJ4SJPFNB7zHNrEQErA5+YTcx9bZDL/v3KmLVgOyH6gzyqMWTKSl kbW/F3Idlnvjh02uSLk8McGLJAVi6de/rgSFn9XMVjfMYYKhG5+W5aWhiXSJfEFoPbx0 8wgw== X-Received: by 10.70.47.195 with SMTP id f3mr61504380pdn.156.1418748824441; Tue, 16 Dec 2014 08:53:44 -0800 (PST) Received: from localhost ([216.228.120.20]) by mx.google.com with ESMTPSA id xo4sm1460499pbc.45.2014.12.16.08.53.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 08:53:43 -0800 (PST) From: Thierry Reding 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 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> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> References: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;