From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mario Kleiner Subject: Re: [PATCH 3/3] drm: Use vblank_disable_and_save in drm_vblank_cleanup() Date: Thu, 07 Aug 2014 17:13:07 +0200 Message-ID: <53E39783.4090201@gmail.com> References: <1407288166-19881-1-git-send-email-mario.kleiner.de@gmail.com> <1407288166-19881-4-git-send-email-mario.kleiner.de@gmail.com> <20140806105141.GQ4193@intel.com> <20140806135719.GM8727@phenom.ffwll.local> <53E2CD57.2090307@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by gabe.freedesktop.org (Postfix) with ESMTP id D05516E0A6 for ; Thu, 7 Aug 2014 08:13:10 -0700 (PDT) Received: by mail-wi0-f178.google.com with SMTP id hi2so5206655wib.17 for ; Thu, 07 Aug 2014 08:13:09 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Dave Airlie , dri-devel , stable List-Id: dri-devel@lists.freedesktop.org On 08/07/2014 08:50 AM, Daniel Vetter wrote: > On Thu, Aug 7, 2014 at 2:50 AM, Mario Kleiner > wrote: >> I'm not sure about all the new embedded drivers, if they have hw vblank >> counters? > Quick grep says a lot don't have it or at least not implemented - they > use drm_vblank_count. Thinking about this, should we use that as a > signal to also set dev->vblnka_disable_allowed = false in > drm_vblank_init? > -Daniel dev->vblank_disable_allowed = false; is already the default set in drm_vblank_init(). I think it was the idea of that flag that drivers which support a somewhat correct vblank dis/enable (= have useable hw vblank counters) opt-in to the vblank disable after some idle time by setting it to true. The strange thing is that unconditional dev->vblank_disable_allowed = true in drm_vblank_post_modeset()? It's there since the first introduction of the flag. The i915, gma500, armada and exynos drivers explicitely set the flag to true to opt-in to the auto vblank disable. radeon gets it implicitely set by calling the vblank_post_modeset function. Tegra also gets it via the post_modeset, and nouveau on old cards with nv04 display engine. armada, exynos and tegra don't have proper hw vblank counter queries, but opt-in, so those will lose vblank counts whenever vblank irqs get turned off. It's a bit all over the place. -mario