From patchwork Fri Oct 16 07:12:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 317802 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp1191330ilm; Fri, 16 Oct 2020 00:13:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV+Tu88eITNwPsrHezsWYgiZJl9gN+Msfi1rIbFyhv40eyK9zBlf6+78M6F3Id35zEV616 X-Received: by 2002:a65:67d0:: with SMTP id b16mr2041022pgs.335.1602832387908; Fri, 16 Oct 2020 00:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602832387; cv=none; d=google.com; s=arc-20160816; b=FGVHEbYtj4dix9KCONKuOAY05ijKVqkclrXGMVgOscPLwN7l65dU1OpZCCZrTWemqf IhdpetORpQR7QGTd9pbfsJV7dFaKSlMC/W+Q1z7iUzsN9P0WlE7LLjSFyaeb3KjqSa5R 5y1WONfoOoAu8e9JKUySJaiRhTBZNe+fSY5laoDrjderjrsqEK/OLpzVZuNrAUml9ZXQ HvKBjSBfU6rBg+Vuyw822q9gqY59OT5AZw5K3+OCb9YIDZKiM5M7kGUPv6oEBvw6A5C6 Wog3JMK0gJmBJzvTcNy7sz80DvtJYjxRnFHHZE3zIc4CFG4T59ACTlZ7s90ARTh+2u9m T51g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=Mv9uexswF8I+tSzdcBMDtphFgP+0c/RlhZc6NN3GcwI=; b=alHDi7Fm1kbe0Pn6NZ7yUllN4eaLxgsIj8rmBqD840kIIRLoDIkQjUH+ZvR23M1n7W +WA8iVYLViAQJ7BLcN91+QsGahXs861ylSyDJF5+1UQ0kPaQxatQ0KLLONxGUuXHgd4B Nn6H6EE7ObJOAquq+6RLgUM++2tuFKRnCDh1X7gWK7avk/1Ugc7GZGBsuRMx7wOqmgqs mSbu+u6eSYP60EpNJYr6uNqyJjAot2C7QaC0SkJNqT+YvOYhoqGoJhBDf9/Q5hLWnDHb OAXh4/ghM8J/vNiisIhz3R3+ecs9OP3LY42iry7q2XbPq17QYyb64WGIbKHwf9+uOiTk oTvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Adc8hCSg; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id y206si1479592pfb.183.2020.10.16.00.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 00:13:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Adc8hCSg; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A30D76EA7C; Fri, 16 Oct 2020 07:13:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9846E6EA7C for ; Fri, 16 Oct 2020 07:13:03 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id l18so893697pgg.0 for ; Fri, 16 Oct 2020 00:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=cCtw9OFU3rtww1isHIEEcnmW7Zwg3NtpL46BN8HaGKc=; b=Adc8hCSgfLi+wo8dAry+ZnREP8hg6NKFlr+XNEwqPKajYvpxKQhVsOd5tP2kpfAQml +J3Bd806sQHX6JTcFRy9yLio7Ya6pAZbEmK6uKv/S4wc9uNDKs8eVJcVB5he/tTtraiQ rhsCxG0ulP5RpsrM+Cup+250sJp5/IokycFqtXeAkHsygkZKudrIIFDqyGL0tPE03ORJ lTNbIVo1kdnPVvdjlf27mwvet59zMLXO+yGsONs2kLFBak0rHRp7zDaTSJkwIKEbBWBa AXSrGEHT5lgODcGoDf4bherpayhmXVPlzT9wePWtPNx3QiYXJBRnMuyJfvaAnJ1kiIJv WdUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cCtw9OFU3rtww1isHIEEcnmW7Zwg3NtpL46BN8HaGKc=; b=d1xEmuGQgqYNSRJhTORIm/1hFOoi4ZBiJUWuhpaEC4WRFYkLYVTt1TMw89xSLSbvGv WCDPByaZH1gdJ8BAkhA4Y3Ql6AD2+3M94oGr1s65uvdKcLKIQZQhLFeUL3HJTrzHpLF4 tcoyBPXplyzbd6qziUuqTq1fmzLPakRMOf80w2GMOT2iiscqgCOyIZ+hjyYxpshMaSMn oQM38pKPk5KM8yfMwqC48mUYj4eXuFLFPS3Mbp0LjgJ7aFhpoPOaF8K0bFBYrc0ZHGNY YmZnDySwYkg80qb3IJVUWWkad3hG1Dqd93PORvyqdmV21sCCHa8OB+FCEKv6AyilBEH2 Zn8g== X-Gm-Message-State: AOAM533AEacSlRgz1GN7g9XFF3S6ZCFx1DIVx/BKeV7+Zkn2YZjePNBr IbMVGptzngsV3ozeG888IKackh4aQD39g1KP X-Received: by 2002:a63:c70c:: with SMTP id n12mr1972958pgg.102.1602832382907; Fri, 16 Oct 2020 00:13:02 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id 14sm1479977pfy.192.2020.10.16.00.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 00:13:02 -0700 (PDT) From: Shawn Guo To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/drm_vblank: use drm_warn_once() to warn undefined mode timing Date: Fri, 16 Oct 2020 15:12:54 +0800 Message-Id: <20201016071254.2681-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Zimmermann , Sean Paul MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit 5caa0feafcc6 ("drm/vblank: Lock down vblank->hwmode more") added WARN_ON_ONCE() for atomic drivers to warn the case that vsync is enabled before a mode has been set on CRTC. This happens sometimes during the initial mode setting of a CRTC. It also happens on Android running HWC2 backed with drm_hwcomposer, where HWC2::SetVsyncEnabled could be called before the atomic mode setting on CRTC happens. In this case, there is nothing really bad to happen as kernel function returns as no-op. So using WARN() version might be overkilled, considering some user space crash reporting services may treat kernel WARNINGS as crashes. Let's drop WARN_ON_ONCE() and change drm_dbg_core() to drm_warn_once() for warning undefined mode timing. Signed-off-by: Shawn Guo --- drivers/gpu/drm/drm_vblank.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index b18e1efbbae1..5f7c4a923e8a 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -717,9 +717,9 @@ drm_crtc_vblank_helper_get_vblank_timestamp_internal( * Happens during initial modesetting of a crtc. */ if (mode->crtc_clock == 0) { - drm_dbg_core(dev, "crtc %u: Noop due to uninitialized mode.\n", - pipe); - drm_WARN_ON_ONCE(dev, drm_drv_uses_atomic_modeset(dev)); + drm_warn_once(dev, "crtc %u: Noop due to uninitialized mode.\n", + pipe); + return false; }