From patchwork Wed Aug 12 15:00:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 7002481 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80CB1C05AC for ; Wed, 12 Aug 2015 15:01:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B154D2067D for ; Wed, 12 Aug 2015 15:01:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9635C20461 for ; Wed, 12 Aug 2015 15:01:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7F066E3D5; Wed, 12 Aug 2015 08:01:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA1926E3D5 for ; Wed, 12 Aug 2015 08:01:37 -0700 (PDT) Received: by pdbfa8 with SMTP id fa8so8237811pdb.1 for ; Wed, 12 Aug 2015 08:01:37 -0700 (PDT) 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=Ld2kiFzT2LBfw0+zT84qI5WbmFKg595R9Gu/u38J5r0=; b=1C763ArsTf4hLVMcHs9voxy16VPUUIXCoy1GNdMrTPU3FHe46SYvBVIl/CSle/XEqm r09Ax5MmfZLn3iiYwm3wnjbu6gRKbvl7yskIUYB5vIaBwlm43nEpGmF1OaB7SmqGuw59 YXTKHoABOeCSVKtikDcNFcuxkNql+ySdncifKKrX2rv9ZbC44NbB8xeVhBYTQ2ab4hAB qUuqnFPxoEVO4o+SeEe/d4yZtSIl2ARIq3l7vtbB4hRjntWqJo4sVrlS35Ko3HV7roJ9 fCnM4szg6rayLoj5g+mSAiAOYD6XgOxwfI3vpQ7Af1CtHx8KzWz8yYibGIeZH/1GNb14 l9RQ== X-Received: by 10.70.49.1 with SMTP id q1mr34792109pdn.118.1439391697551; Wed, 12 Aug 2015 08:01:37 -0700 (PDT) Received: from localhost (port-17141.pppoe.wtnet.de. [46.59.128.142]) by smtp.gmail.com with ESMTPSA id hg3sm6757791pbb.52.2015.08.12.08.01.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 08:01:36 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/13] drm/bochs: Store correct CRTC index in events Date: Wed, 12 Aug 2015 17:00:25 +0200 Message-Id: <1439391635-29166-3-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1439391635-29166-1-git-send-email-thierry.reding@gmail.com> References: <1439391635-29166-1-git-send-email-thierry.reding@gmail.com> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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;