From patchwork Sat Jun 27 16:03:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roland.rucky@gmail.com X-Patchwork-Id: 11630355 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03A5A14E3 for ; Sun, 28 Jun 2020 20:36:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2785206F2 for ; Sun, 28 Jun 2020 20:36:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ubKOJchd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2785206F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 217CB6E3AC; Sun, 28 Jun 2020 20:36:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C0B06E0DF for ; Sat, 27 Jun 2020 16:04:00 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id q15so11456585wmj.2 for ; Sat, 27 Jun 2020 09:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:user-agent:mime-version; bh=V/kNcWSsn3VamUoD9hnBR1ZDREGD7+pBJsLP9ilHYj4=; b=ubKOJchdEvUhS4G+9+tAYKBbYzEE59YaaYTz6VK6vDjJIU9y9tIGPgJsk4w/lcRtCt v+fwxtdtBxi8X8DiPhonMyN8UdZiYR2AVePDY3+baJGOaTgUkoMaLQ6NiOMxrABsK51l B3lnALY7cho54gWWcXqzNWa5fTbPi84l9r1zSZiO9w+HLcaU5bq+yEagIciZNTkDXTBv mJ1OgpezDnHfOYW7R7z5BRercCJVMBqnGG1ohQMFbQ3NC98FONMd9hrsEuqBh7RiLh5/ R+fDnGj1qbIXUIpnJIpZZYhMzqft/HNvO3uaQZGZerICM5HUvqzgbCNa9UNVr+9odIeL /zag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:user-agent :mime-version; bh=V/kNcWSsn3VamUoD9hnBR1ZDREGD7+pBJsLP9ilHYj4=; b=P43KD7e89NV4OXVlWfY4LfOEHeW8bWOoqIrhFA+mf7kXagFVsd5EZVWh31w4CDrKLJ ia8y8udLg1F3GYz7QPNZf8g+ItcM/pwtIgQ2C9SF15HNdh2bpHxYx1/rn4PFlV2VOTEh 9/xqAx/tT8mfwvZWYh+e4agMOj4RcIls58W9cNWCJT+lgBewMZYiwG3AopeEI7T3a17q tWmWvzd8Wev32pKwHphqBwK+6PLv43U4SNDFHztP2/n7AJ2mMEzWymF7fIvz68GQG/Uo mnAN3ArMvAU3UaxiXKIRdgncsFnfn6T+CV5CYaMTA1pax8xBNHt5WBabsZoK3RZ31ZYT M0nA== X-Gm-Message-State: AOAM533PuKAEJXMnnil9udAPTnESm7VRQJJoyJbv8sM/KrXw9LkXpLmP xRaM7A2c3TTY2UvNydzw5Q0= X-Google-Smtp-Source: ABdhPJxFzd/vZF6XlUserDl8etexgcD4wdlZZRxIL/0wDLd96ZaBfZetv+Pkvcr8M0NNzAkRnlfFBA== X-Received: by 2002:a1c:b182:: with SMTP id a124mr8325766wmf.114.1593273838875; Sat, 27 Jun 2020 09:03:58 -0700 (PDT) Received: from rolandryzen (cpe90-146-109-250.liwest.at. [90.146.109.250]) by smtp.gmail.com with ESMTPSA id f16sm22234770wmh.27.2020.06.27.09.03.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jun 2020 09:03:57 -0700 (PDT) Message-ID: Subject: amdgpu freezes kernel after kernel 5.7.6 changes From: roland.rucky@gmail.com To: harry.wentland@amd.com Date: Sat, 27 Jun 2020 18:03:56 +0200 User-Agent: Evolution 3.36.3 MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 28 Jun 2020 20:36:36 +0000 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: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Not sure if I am contacting the correct person, Since I updated to kernel 5.7.6, my system started to freeze randomly. After a couple of freezes, I noticed, that they always happen when playing games, or during videoplayback in e.g. firefox. I reverted to the previous kernel 5.7.5, and all issues are gone. Next I started to revert and test single commits between the two kernel versions, which affect amdgpu. If I revert the changes listed below, the kernel does not freeze any more. Sadly I can`t get any crash reports / logs. Even the magic sysrq key does not work, when the system is frozen. I will also attach a patch, which includes all reverted commits. List of changes I reverted: ----------------------------------------------------------------------- commit 6674508ba1a2ea6caca5de2bcb25bc00a050fd0a Author: Harry Wentland Date: Thu May 28 09:44:44 2020 -0400 Revert "drm/amd/display: disable dcn20 abm feature for bring up" commit 14ed1c908a7a623cc0cbf0203f8201d1b7d31d16 upstream. This reverts commit 96cb7cf13d8530099c256c053648ad576588c387. This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems. Cc: Alexander Monakov Cc: Hersen Wu Cc: Anthony Koo Cc: Michael Chiu Signed-off-by: Harry Wentland Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Reported-and-tested-by: Alexander Monakov Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman commit_planes_for_stream( dc, srf_updates, Details: * Kernel: 5.7.6 * GPU: radeon 5700XT * CPU: ryzen 3800X * running on swaywm(wayland) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index f9f02e08054b..7fc15b82fe48 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1334,7 +1334,7 @@ static int dm_late_init(void *handle) unsigned int linear_lut[16]; int i; struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu; - bool ret; + bool ret = false; for (i = 0; i < 16; i++) linear_lut[i] = 0xFFFF * i / 15; @@ -1350,10 +1350,13 @@ static int dm_late_init(void *handle) */ params.min_abm_backlight = 0x28F; - ret = dmcu_load_iram(dmcu, params); + /* todo will enable for navi10 */ + if (adev->asic_type <= CHIP_RAVEN) { + ret = dmcu_load_iram(dmcu, params); - if (!ret) - return -EINVAL; + if (!ret) + return -EINVAL; + } return detect_mst_link_for_all_connectors(adev->ddev); } diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 4acaf4be8a81..47431ca6986d 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1011,17 +1011,9 @@ static void program_timing_sync( } } - /* set first unblanked pipe as master */ + /* set first pipe with plane as master */ for (j = 0; j < group_size; j++) { - bool is_blanked; - - if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked) - is_blanked = - pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp); - else - is_blanked = - pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg); - if (!is_blanked) { + if (pipe_set[j]->plane_state) { if (j == 0) break; @@ -1042,17 +1034,9 @@ static void program_timing_sync( status->timing_sync_info.master = false; } - /* remove any other unblanked pipes as they have already been synced */ + /* remove any other pipes with plane as they have already been synced */ for (j = j + 1; j < group_size; j++) { - bool is_blanked; - - if (pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked) - is_blanked = - pipe_set[j]->stream_res.opp->funcs->dpg_is_blanked(pipe_set[j]->stream_res.opp); - else - is_blanked = - pipe_set[j]->stream_res.tg->funcs->is_blanked(pipe_set[j]->stream_res.tg); - if (!is_blanked) { + if (pipe_set[j]->plane_state) { group_size--; pipe_set[j] = pipe_set[group_size]; j--; @@ -2533,12 +2517,6 @@ void dc_commit_updates_for_stream(struct dc *dc, copy_stream_update_to_stream(dc, context, stream, stream_update); - if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) { - DC_ERROR("Mode validation failed for stream update!\n"); - dc_release_state(context); - return; - } - commit_planes_for_stream( dc, srf_updates,