From patchwork Tue Jan 29 16:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10786563 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 416D21390 for ; Tue, 29 Jan 2019 16:16:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FDB52D25D for ; Tue, 29 Jan 2019 16:16:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 237BE2D2D9; Tue, 29 Jan 2019 16:16:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C5E062D25D for ; Tue, 29 Jan 2019 16:16:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 026806E83B; Tue, 29 Jan 2019 16:16:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF3806E83B for ; Tue, 29 Jan 2019 16:16:13 +0000 (UTC) Received: by mail-yb1-xb42.google.com with SMTP id 2so8372643ybw.4 for ; Tue, 29 Jan 2019 08:16:13 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=aIjHAV+36KMgkDiuku9xyhyhmKkL2eqGMAiFNl4QEJ0=; b=uLdRSuXZNHWRY+HlFfAPwKTdHvJCAyF13nTAKjURsPAVS/mRCLskTvYPnUuPiVPbvA lbpOG32nZs8oalodtqX7zXyn69oJrCBzlTu8ApRsxk0R6FvTvLVU5JMYgcu3hgHwlXhr 0UzrL28AckVq0wLwkzMW0g+0NXJ/94pFg68ovVvHroTCO/0CMdAMFE89ucUiB8XvtbV3 3k7lBRSa0LgH28Vr7Bu6v8DAdT++aAmeP1YNnuB0dZrMLvnx8H/di+SoRXPY7dDPzIoe HoiTJK40iq6WzBO9ONNTQJA6qD3NuajFpwoN0J7RrFanqqGJ31yC/t9ft7R6dNHhw4B/ MkfQ== X-Gm-Message-State: AJcUukcoaWaWXD1h0sq9lH9UY97HGjDkapGE6k+hzuUxoQ4h0Fcp6/SQ n21ZF+8s+nnbWF+E936EyIEOA+b6VwJI0A== X-Google-Smtp-Source: ALg8bN79Oay9fHAPRucHh0yHmMzYIXmGGkmLSyTXllC3A0FCnZVkQj10I3HLglRszCOGa9wshV55Kg== X-Received: by 2002:a25:ac2:: with SMTP id 185mr25290335ybk.349.1548778572581; Tue, 29 Jan 2019 08:16:12 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id y1sm13648387ywe.86.2019.01.29.08.16.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jan 2019 08:16:12 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/TODO: Add vrefresh replacement to the todo Date: Tue, 29 Jan 2019 11:15:51 -0500 Message-Id: <20190129161611.241599-1-sean@poorly.run> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-doc@vger.kernel.org, Maxime Ripard , David Airlie , Sean Paul , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul Suggested-by: Daniel Vetter Signed-off-by: Sean Paul Reviewed-by: Sam Ravnborg --- Documentation/gpu/todo.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 38360ede12215..7fc30380eaf6c 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -262,6 +262,21 @@ As a reference, take a look at the conversions already completed in drm core. Contact: Sean Paul, respective driver maintainers +Convert direct mode.vrefresh accesses to use drm_mode_vrefresh() +---------------------------------------------------------------- + +drm_display_mode.vrefresh isn't guaranteed to be populated. As such, using it +is risky and has been known to cause div-by-zero bugs. Fortunately, drm core +has helper which will use mode.vrefresh if it's !0 and will calculate it from +the timings when it's 0. + +Use simple search/replace, or (more fun) cocci to replace instances of direct +vrefresh access with a call to the helper. Check out +https://lists.freedesktop.org/archives/dri-devel/2019-January/205186.html for +inspiration. + +Contact: Sean Paul + Core refactorings =================