From patchwork Thu Apr 18 06:01:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 10906557 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 A5B3914DB for ; Thu, 18 Apr 2019 06:02:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D1ED28BE4 for ; Thu, 18 Apr 2019 06:02:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FC6C28BE6; Thu, 18 Apr 2019 06:02:16 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 3840028BE4 for ; Thu, 18 Apr 2019 06:02:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DFD96E0C6; Thu, 18 Apr 2019 06:02:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id CBC176E0C6 for ; Thu, 18 Apr 2019 06:02:12 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id k17so1322274wrx.10 for ; Wed, 17 Apr 2019 23:02:12 -0700 (PDT) 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=pImnskEl6QTDzCduGy9wYh2RVgu+ck9CFq6m4Y326J0=; b=SSBcW7P9eJYvBOM6JbV/dLLmcvFg8VFHZ648QhMpZC9yj1CyvprQ6RI11juagYBg6W 2grsgFZjv4xzhNA3U9PGw/t/K3QJRCMGK/5fiLgoV4Hp1Hpf0SUiGdbg8O8wPBi7ttrG OyrqOEgorWaqlwnwR+h59yo2wWB8O8qbY/RIe2EBLzuneHYExCLE7UzoBV+Rjrn0Pkqo UjiAgfRq9Q4N+V+N/368kgKFYYLwe6cWyYWnFj4CNxkHX9PEvK69hY3oeWNkSB3RqCD/ G0gj8gTuOlMMWGjXvWcyY53n/xCxhf82A4/gib3JUnTJekjT/n7Hoc93S94G5Ji4+FfU Ypmw== X-Gm-Message-State: APjAAAUIM3sEkwHqe+xUnIk5hAd3pZxiJaNQOl0grr/4+iM55iCbt76Z HjSKP/IDJamFkFx2jqPp9mAQvbrA X-Google-Smtp-Source: APXvYqzFwA+GEr1viqd8iHvRecnS7m/HdGDN8w6yN5p72DUam7GRDtnQ1OhXmnz4gpNjUPnwmXShzg== X-Received: by 2002:adf:f051:: with SMTP id t17mr38293829wro.73.1555567331319; Wed, 17 Apr 2019 23:02:11 -0700 (PDT) Received: from twisty.localdomain ([2a01:c23:7856:4600:55b4:804e:196c:cde9]) by smtp.gmail.com with ESMTPSA id s16sm860049wrw.58.2019.04.17.23.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 23:02:10 -0700 (PDT) From: Mario Kleiner To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: Fix timestamp docs for variable refresh properties. Date: Thu, 18 Apr 2019 08:01:57 +0200 Message-Id: <20190418060157.18968-1-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.17.1 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=pImnskEl6QTDzCduGy9wYh2RVgu+ck9CFq6m4Y326J0=; b=MjCjyTOaE6uYiglUeN5o1BHtYrmcVVJ7gPqWSWMfYfgLakPQ9eSBfwiWv3KpuE3NiY Ez3qhditnX6haPWPa8oqouZ395WiTMBNYwwrjmlvxlpIhMqImr3DTboqc0jfYdPgIL6n +5UomrjKDK6TBInp8DZ+bb/e06KiyeC2iDMPNmGlHTd+1guYIxZfswycZnTacDuynTT2 nO4iCfwRvOBszaq0kI38hu/1xGS01XFzsAh55DIhu9QNr5hPlBZAA/Sc1tLkneMsXkci pg2hWwM+a/mt9KELrDWxFJOKncPHBCM0gcfRzgv8KIOyYfX08ibCjZi7oyIduPNH/Avz gMow== 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: nicholas.kazlauskas@amd.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP As discussed with Nicholas and Daniel Vetter (patchwork link to discussion below), the VRR timestamping behaviour produced utterly useless and bogus vblank/pageflip timestamps. We have found a way to fix this and provide sane behaviour. As of Linux 5.2, the amdgpu driver will be able to provide exactly the same vblank / pageflip timestamp semantic in variable refresh rate mode as in standard fixed refresh rate mode. This is achieved by deferring core vblank handling (drm_crtc_handle_vblank()) until the end of front porch, and also defer the sending of pageflip completion events until end of front porch, when we can safely compute correct pageflip/vblank timestamps. The same approach will be possible for other VRR capable kms drivers, so we can actually have sane and useful timestamps in VRR mode. This patch removes the section of the docs that describes the broken timestamp behaviour present in Linux 5.0/5.1. Fixes: ab7a664f7a2d ("drm: Document variable refresh properties") Link: https://patchwork.freedesktop.org/patch/285333/ Signed-off-by: Mario Kleiner Acked-by: Daniel Vetter Reviewed-by: Nicholas Kazlauskas --- drivers/gpu/drm/drm_connector.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 2355124849db..b34c3d38bf15 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1416,12 +1416,6 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); * * The driver may place further restrictions within these minimum * and maximum bounds. - * - * The semantics for the vertical blank timestamp differ when - * variable refresh rate is active. The vertical blank timestamp - * is defined to be an estimate using the current mode's fixed - * refresh rate timings. The semantics for the page-flip event - * timestamp remain the same. */ /**