From patchwork Mon May 4 04:29:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 6323111 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 D4274BEEE1 for ; Mon, 4 May 2015 04:30:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB6512026C for ; Mon, 4 May 2015 04:30:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E89E720268 for ; Mon, 4 May 2015 04:30:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 548EA6E21D; Sun, 3 May 2015 21:30:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EEA66E21D for ; Sun, 3 May 2015 21:30:12 -0700 (PDT) Received: by widdi4 with SMTP id di4so107870214wid.0 for ; Sun, 03 May 2015 21:30:11 -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=m8dnxUpZSOrZ5pu9Yo5Ve0QwzQnOKcqTFCKlMEb4YtHGMvuIUnozofrUjQBb98GZRQ CzeIiyyzzXUCkxfqrS26r6MoE89oXhLnuNLad7UsrmF9Su/BefqBeoA4JeUuKjZDl16a Bc/wY56HnHss98vQfm/nE+zIzWQkskdrMJmJyBxJqbpWwPa9w0ynnBYe7kUKx14A0t/y Z/REl8YbCQUFm/roh7iVlRijqQBZsYT+sEoBKx3KfUjn93kWjxVRDj0SJGjZJ5Ncwt/k DWy9jpexV/JgItuKjicPvF832tsd+kwnjYboyYoNP0CXXm66ZtwmOZlx0DHiWlC3atGC 2JMA== X-Received: by 10.194.200.42 with SMTP id jp10mr37342002wjc.66.1430713811478; Sun, 03 May 2015 21:30:11 -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.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 May 2015 21:30:10 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/5] drm/tegra: Don't use vblank_disable_immediate on incapable driver. Date: Mon, 4 May 2015 06:29:44 +0200 Message-Id: <1430713787-29687-2-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 , 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);