From patchwork Tue Apr 14 17:41:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 6217271 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 47BC1BF4A6 for ; Tue, 14 Apr 2015 17:42:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DDF220274 for ; Tue, 14 Apr 2015 17:42:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5AF412021F for ; Tue, 14 Apr 2015 17:42:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C30276E734; Tue, 14 Apr 2015 10:42:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 24E0D6E733 for ; Tue, 14 Apr 2015 10:42:51 -0700 (PDT) Received: by wgso17 with SMTP id o17so20499671wgs.1 for ; Tue, 14 Apr 2015 10:42:50 -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=1zIEP0CmpX9vTyLxvzvX6jSg5CYHA2hOWKgw/8Jb93g=; b=YgDrCjUomaiSAb8Ppo9KurNoiTsqys9/a9FUAg2+sRpASFZSygSft0Qj1FqKOJTtIY EuyhzemRSiTsHWhrQK/P6H0PF8MVb44V3pNeEtjnxZHm8AyKsG3c2xr0bV+VLs6oJf0+ EgwYorgfToP7FkhWBHdjk4Q0aZz4NpOhCO2uNSE6E1k/s1GAokyBZTTUqnIV0SJnGkhH rJJ1yktzMEf5ppwyQyUmOQf5/QcW+JanED0msW7dRA5t5gS2beGeEHSOpcZCikohLoPP 3CS0FNu7YqZtbE6Ep7ikxK8vh6KLCoaycLNVdfMBHkj3hwiFVgK0GoTaOddr+62QfDDn m0oA== X-Received: by 10.180.84.201 with SMTP id b9mr5114328wiz.49.1429033370597; Tue, 14 Apr 2015 10:42:50 -0700 (PDT) Received: from twisty.fritz.box (x4d02f99b.dyn.telefonica.de. [77.2.249.155]) by mx.google.com with ESMTPSA id fs9sm2473603wjc.34.2015.04.14.10.42.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 10:42:49 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/tegra: Don't use vblank_disable_immediate on incapable driver. Date: Tue, 14 Apr 2015 19:41:42 +0200 Message-Id: <1429033302-16353-3-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429033302-16353-1-git-send-email-mario.kleiner.de@gmail.com> References: <1429033302-16353-1-git-send-email-mario.kleiner.de@gmail.com> Cc: Dave Airlie , Thierry Reding 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 Tegra would not only need a hardware vblank counter that increments at leading edge of vblank, but also support for instantaneous high precision vblank timestamp queries, ie. a proper implementation of dev->driver->get_vblank_timestamp(). Without these, there can be off-by-one errors during vblank disable/enable if the scanout is inside vblank at en/disable time, and additionally clients will never see any useable vblank timestamps when querying via drmWaitVblank ioctl. This would negatively affect swap scheduling under X11 and Wayland. Signed-off-by: Mario Kleiner Cc: Thierry Reding Cc: Dave Airlie --- drivers/gpu/drm/tegra/drm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 1833abd..bfad15a 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -173,7 +173,6 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) drm->irq_enabled = true; /* syncpoints are used for full 32-bit hardware VBLANK counters */ - drm->vblank_disable_immediate = true; drm->max_vblank_count = 0xffffffff; err = drm_vblank_init(drm, drm->mode_config.num_crtc);