From patchwork Fri May 6 17:26:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 9034931 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50B8B9FB96 for ; Fri, 6 May 2016 17:26:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EAE1203A4 for ; Fri, 6 May 2016 17:26:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 112F2203A9 for ; Fri, 6 May 2016 17:26:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38C546EB1B; Fri, 6 May 2016 17:26:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id F3A066EB1B for ; Fri, 6 May 2016 17:26:36 +0000 (UTC) Received: by mail-wm0-x232.google.com with SMTP id n129so66070024wmn.1 for ; Fri, 06 May 2016 10:26:36 -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=ETfPK9uxjHLGbrkp0Y0g3gnwdXryqd7OPo/TcYngSHQ=; b=MGXe1UKtpOODvi/kHy6TMGR2WZM7gnyGMb7S6N9+uxYrWpLzCV8KOUxhfV5+JVPhTV v+/8RBjNaXjjiffOfDusyNijel3qKZYM4RSd4T/2bm/A+B+uWG4GaZsO7GyxnJe41Ft7 Uy1SEaDa1PnQl0e2jNkmF/Nir/M9szVCfmO7ZEHFxm3lPQQPB+3R1JB++2Y32DYXcNiA x3uIzH0EFzIrz8D5q7TkqhV29F+T83tarK8fR64TTdxzp/1pcffIox/V+jGZtpewiv7h xMNL8DObFmhdSgdI3vUCWFZKt5FgcjlWpSC2z2b0KJlhh/JDOk867EFRK2lSSHavGxcD QvIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ETfPK9uxjHLGbrkp0Y0g3gnwdXryqd7OPo/TcYngSHQ=; b=D+FdqM04E31go1OF88HlHHhdnUquUFQ16xnw4C7Lc0shQSjN7i6w05T7LswkxMaNRu e/lLv/+cngX5V4VeKBMssj5g0AuWN0rq806CVs3orVKE7I35kuetdaKBloHwED4QmLFz TFi8dUHsUPUmlTx5R0ZA/hlLAwRwDPkYeAANKEus/7ZPW8EPKS1flzM46I1PPP9Zog/U YTSRaJ8ZoXXH7X7W/rvVpaJghgxAZMYyD7rVhbq0+2vhFEPF8OCFFaqt7g21F/cezCJu 9vsa3e4zn6j3/b66GUV1LK8MjoYyfJtsLT0j9Ihii8WmG+g65jK5KmPfynvCiY9e2wwX /q/A== X-Gm-Message-State: AOPr4FW5it/912k7xYPV69zZ3BXmeWS6/5JS5Iu5dVLf+B/noBDdAQV/D0hnfi0tiAEJHQ== X-Received: by 10.194.87.103 with SMTP id w7mr21205109wjz.13.1462555595578; Fri, 06 May 2016 10:26:35 -0700 (PDT) Received: from twisty.cin.medizin.uni-tuebingen.de (cin-11.medizin.uni-tuebingen.de. [134.2.118.242]) by smtp.gmail.com with ESMTPSA id g197sm9428955wme.15.2016.05.06.10.26.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 10:26:34 -0700 (PDT) From: Mario Kleiner To: eric@anholt.net Subject: [PATCH 1/2] drm/vc4: Fix get_vblank_counter with proper no-op for Linux 4.4+ Date: Fri, 6 May 2016 19:26:05 +0200 Message-Id: <1462555566-27612-2-git-send-email-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1462555566-27612-1-git-send-email-mario.kleiner.de@gmail.com> References: <1462555566-27612-1-git-send-email-mario.kleiner.de@gmail.com> Cc: dri-devel@lists.freedesktop.org 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=-6.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 get_vblank_counter hooked up to drm_vblank_count() which alway was non-sensical but didn't hurt in the past. Since Linux 4.4 it triggers a WARN_ON_ONCE in drm_update_vblank_count on first vblank irq disable, so fix it by hooking to drm_vblank_no_hw_counter(). Tested against Raspian kernel 4.4.8 tree on RPi 2B. Signed-off-by: Mario Kleiner Cc: Eric Anholt Reviewed-by: Eric Anholt --- drivers/gpu/drm/vc4/vc4_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index b7d2ff0..962d0d7 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -90,7 +90,7 @@ static struct drm_driver vc4_drm_driver = { .enable_vblank = vc4_enable_vblank, .disable_vblank = vc4_disable_vblank, - .get_vblank_counter = drm_vblank_count, + .get_vblank_counter = drm_vblank_no_hw_counter, #if defined(CONFIG_DEBUG_FS) .debugfs_init = vc4_debugfs_init,