From patchwork Thu Apr 18 03:51:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 10906455 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 B2989161F for ; Thu, 18 Apr 2019 03:51:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B08928BE1 for ; Thu, 18 Apr 2019 03:51:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F43928BE6; Thu, 18 Apr 2019 03:51:52 +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 4848B28BE1 for ; Thu, 18 Apr 2019 03:51:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3EA46E0BC; Thu, 18 Apr 2019 03:51:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id C14DE6E0BB; Thu, 18 Apr 2019 03:51:48 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id a184so1032453wma.2; Wed, 17 Apr 2019 20:51:48 -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:in-reply-to :references; bh=+s5zZebVbm3q8RmRllG8UW8bQ86n6OW0eFbTMHp0kxM=; b=IHNYT/hdrgCbV/25o39K2ovnb0RBWh0v7rFNDNaNnrWjCYXWQORr2mQoSByOMgv720 kauCzYmCFzVcXBC3tJed5vM5lhlZyvTeUXZ+kOV7IxnmkKFA54vz+jk7T5+whXk9wcEj vsF4aHndKjrHnR1HbMJFQrLAPG1wCEKCd2N/IdpePJpNtXSAAo1/Dm9IQJMxIgBq94iq i16t5SNMTYjc7rJv8AnfdNa5bbokI/6f7nWGA0qKyqo+bTohVV1ZfXiMypuvNkp/5hrH KDUUiGoov75VSyrSZRaNVcfA+LB2OrDBQj8JaWdfxeHz2PNE2X3rii63XKse48NHDenQ scSQ== X-Gm-Message-State: APjAAAVpgBJpSg8jGeCo8Gr8zYAYD0xi340OQhn+y8l8Hyh8wcC3ryVi FPG4ETqLwrYjboXaVXDLyTOp/ffO X-Google-Smtp-Source: APXvYqxjJMugn5S5ziyfClsLac+q5q4P8480DB/fNjVrxBk1/bv5zMYYXrpqNjThoMHSO0xINtEC7g== X-Received: by 2002:a7b:c00e:: with SMTP id c14mr1226483wmb.110.1555559507337; Wed, 17 Apr 2019 20:51:47 -0700 (PDT) Received: from twisty.localdomain ([2a01:c23:7856:4600:55b4:804e:196c:cde9]) by smtp.gmail.com with ESMTPSA id x192sm665054wmf.48.2019.04.17.20.51.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 20:51:46 -0700 (PDT) From: Mario Kleiner To: amd-gfx@lists.freedesktop.org Subject: [PATCH 1/4] drm/amd/display: Add some debug output for VRR BTR. Date: Thu, 18 Apr 2019 05:51:19 +0200 Message-Id: <20190418035122.15791-2-mario.kleiner.de@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190418035122.15791-1-mario.kleiner.de@gmail.com> References: <20190418035122.15791-1-mario.kleiner.de@gmail.com> 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:in-reply-to:references; bh=+s5zZebVbm3q8RmRllG8UW8bQ86n6OW0eFbTMHp0kxM=; b=eYBQ0B4uMyHjs92tI07xmmAl5VF5sB5rFH/GgLxsG2iH3nNb3OzjBtHK9BaOySS9Ls XLtinhGGXCP4FJHFnMOMJZjh0H8vG5o49+g0ZRcKKF5VhYAhjIC3+PuO+6O40bt/b3sO z0R0Gpt5NAq+SOo1rnTUEvJ65doiwC7i10we85it93Y2ceTwtQ1DQ6p1k/ZwuRhDTz18 dJ0ngYXV/em8PejlJTjrVfFxtlkRFQk+gNqVNWR0F+Tt1gDN9E4kAChmPLkYd9RKbqU0 w6nzZWfg+pSPBcjd+m82j4vx7F/xy5+J3Vk8WtatJjeW05cbbOcH9++kAYEmatxs9Gr0 QuCA== 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, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Helps with debugging issues with low framerate compensation. Signed-off-by: Mario Kleiner --- .../amd/display/modules/freesync/freesync.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 3d867e34f8b3..71274683da04 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -1041,6 +1041,11 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync, average_render_time_in_us += last_render_time_in_us; average_render_time_in_us /= DC_PLANE_UPDATE_TIMES_MAX; + DRM_DEBUG_DRIVER("vrr flip: avg %d us, last %d us, max %d us\n", + average_render_time_in_us, + last_render_time_in_us, + in_out_vrr->max_duration_in_us); + if (in_out_vrr->btr.btr_enabled) { apply_below_the_range(core_freesync, stream, @@ -1053,6 +1058,10 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync, in_out_vrr); } + DRM_DEBUG_DRIVER("vrr btr_active:%d - num %d of dur %d us\n", + in_out_vrr->btr.btr_active, + in_out_vrr->btr.frames_to_insert, + in_out_vrr->btr.inserted_duration_in_us); } } @@ -1090,11 +1099,17 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, in_out_vrr->btr.inserted_duration_in_us); in_out_vrr->adjust.v_total_max = in_out_vrr->adjust.v_total_min; + DRM_DEBUG_DRIVER("btr start: c=%d, vtotal=%d\n", + in_out_vrr->btr.frames_to_insert, + in_out_vrr->adjust.v_total_min); } if (in_out_vrr->btr.frame_counter > 0) in_out_vrr->btr.frame_counter--; + DRM_DEBUG_DRIVER("btr upd: count %d\n", + in_out_vrr->btr.frame_counter); + /* Restore FreeSync */ if (in_out_vrr->btr.frame_counter == 0) { in_out_vrr->adjust.v_total_min = @@ -1103,6 +1118,9 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, in_out_vrr->adjust.v_total_max = calc_v_total_from_refresh(stream, in_out_vrr->min_refresh_in_uhz); + DRM_DEBUG_DRIVER("btr end: vtotal_min=%d/max=%d\n", + in_out_vrr->adjust.v_total_min, + in_out_vrr->adjust.v_total_max); } }