From patchwork Mon May 4 04:29:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 6323141 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 660E0BEEE1 for ; Mon, 4 May 2015 04:30:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A33D0202B8 for ; Mon, 4 May 2015 04:30:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B9866202AE for ; Mon, 4 May 2015 04:30:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 160396E225; Sun, 3 May 2015 21:30:26 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by gabe.freedesktop.org (Postfix) with ESMTP id B373E6E225 for ; Sun, 3 May 2015 21:30:24 -0700 (PDT) Received: by widdi4 with SMTP id di4so107873326wid.0 for ; Sun, 03 May 2015 21:30:24 -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=tltnZRoF5+w9TB3tuFGG7Z6XXwJiGJOfOPW5+6O7AWE=; b=Hew7GziTbtNV5+0vinVZNxqWo46xA7eL5M+DiEEqnKBcNMg0johLZ5SFgvP7NnJ3AQ dA/zOiLbr6XXCoNrZfzem65pVTpS3+rHYrdgbSiEBoXbNsf3OSN9tj04sfVSfnowW0zZ CCWSOAKXDm1RL5QzoFkU9jryZVtVVg/PFBMrTLxlnoBskUWy6644rIhFtKF2tSVQ4v1j DuD//pIfxdABrVMDOnqWQt0g+dxAcF3ThBLgaOLjh4I9Z0cTrNLNqGnyS7N442edIKqV TO1PQvu8YevXw/1zJaPWF9KdyMsVfqXg3hMNpiVTzVT+bYIsewURgPziwHZjAgM9WrTn VBxQ== X-Received: by 10.180.223.100 with SMTP id qt4mr15824441wic.1.1430713824194; Sun, 03 May 2015 21:30:24 -0700 (PDT) Received: from twisty.fritz.box (x5f72bba3.dyn.telefonica.de. [95.114.187.163]) by mx.google.com with ESMTPSA id ub1sm18634482wjc.43.2015.05.03.21.30.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 May 2015 21:30:23 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/5] drm/qxl: Fix qxl_noop_get_vblank_counter() Date: Mon, 4 May 2015 06:29:47 +0200 Message-Id: <1430713787-29687-5-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430713787-29687-1-git-send-email-mario.kleiner.de@gmail.com> References: <1430713787-29687-1-git-send-email-mario.kleiner.de@gmail.com> Cc: Dave Airlie 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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 This breaks under the vblank timestamp cleanup patch by Daniel Vetter. Also it is pointless to return anything but zero (or any other constant) if the function doesn't actually query a hw vblank counter. The bogus return of the current drm vblank counter via direct readout or via drm_vblank_count() is found in many of the new kms drivers, but it does exactly nothing different from returning any arbitrary constant - it's a no operation. Let's simply return 0 - Easy and fast. Signed-off-by: Mario Kleiner Cc: Dave Airlie --- drivers/gpu/drm/qxl/qxl_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 1d9b80c..577dc45 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -198,7 +198,7 @@ static int qxl_pm_restore(struct device *dev) static u32 qxl_noop_get_vblank_counter(struct drm_device *dev, int crtc) { - return dev->vblank[crtc].count.counter; + return 0; } static int qxl_noop_enable_vblank(struct drm_device *dev, int crtc)