From patchwork Sun Nov 21 15:59:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 345821 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oALG36RX005499 for ; Sun, 21 Nov 2010 16:03:27 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EAA2FA08F6 for ; Sun, 21 Nov 2010 08:03:05 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qw0-f49.google.com (mail-qw0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AE9CA09AE for ; Sun, 21 Nov 2010 07:59:19 -0800 (PST) Received: by mail-qw0-f49.google.com with SMTP id 9so929777qwc.36 for ; Sun, 21 Nov 2010 07:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=41KOGcOk42LzVIOhXXoQEh+PbBoAJObWMfVDCCJ3Ynw=; b=i+Q4Kdg7AP93G/0hq8PuY5BZAZwTIlneTVONmFgCaDPIZLXdmIclK6U+LlYgwh/6Qs sTaIrqRt3A70LX5OSUuxH0Veth1XbbZ7QbHt5TBxPHN3Hs0m3Y+6ygTJ8zBwDaLomxYB CDINBLOYJMe99XwaeSKd4/dQeXg74V23Zl5Jc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Jr40QuHw6WpFtvjlBkejijSOyMQ+zA68BCdMEep69nN/G7GNwSuejzR1HmFDdytoDn lYCGJCXKYdYnBLIYq19H+qBViTJkZv3F7FnjCZZsIG9967hO/n34nfnxvBiJ3D7kEiuB /cw92S75GwXlx+1ItS6ci/+KHnJWDPfR/pBC8= Received: by 10.224.199.196 with SMTP id et4mr4139924qab.271.1290355158828; Sun, 21 Nov 2010 07:59:18 -0800 (PST) Received: from localhost.localdomain (static-74-96-105-7.washdc.fios.verizon.net [74.96.105.7]) by mx.google.com with ESMTPS id u2sm2277565qcq.43.2010.11.21.07.59.17 (version=SSLv3 cipher=RC4-MD5); Sun, 21 Nov 2010 07:59:18 -0800 (PST) From: Alex Deucher To: airlied@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] kms/radeon: Use high precision timestamps for pageflip completion events. Date: Sun, 21 Nov 2010 10:59:03 -0500 Message-Id: <1290355143-15948-3-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1290355143-15948-1-git-send-email-alexdeucher@gmail.com> References: <1290355143-15948-1-git-send-email-alexdeucher@gmail.com> Cc: Mario Kleiner X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 21 Nov 2010 16:03:27 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index f6493f4..15f24f2 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -259,8 +259,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) /* wakeup userspace */ if (work->event) { e = work->event; - do_gettimeofday(&now); - e->event.sequence = drm_vblank_count(rdev->ddev, radeon_crtc->crtc_id); + e->event.sequence = drm_vblank_count_and_time(rdev->ddev, crtc_id, &now); e->event.tv_sec = now.tv_sec; e->event.tv_usec = now.tv_usec; list_add_tail(&e->base.link, &e->base.file_priv->event_list);