Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2749018pxj; Mon, 31 May 2021 09:45:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoakR3oYp/5cCBgcz+wXoZrAUl7UsR3pQ2x0NVJfhvtEagLOTOcHgDOmgkUZ5eWdQpUBLa X-Received: by 2002:a92:d8c3:: with SMTP id l3mr12704733ilo.31.1622479556625; Mon, 31 May 2021 09:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622479556; cv=none; d=google.com; s=arc-20160816; b=a5ej23npBBD70J6bQmPhRCqMzpx7NPaaYqXMKMhirqfjMrNwyFwBif+GU6/B3NDOiY 8zLyzd0uWZyeOqJBdxGHtLYvbNSqyUYqmHUsrmDkoKNegWX6r/7WkIgnasvbxM7WfLcx U3mC3K5i3ELg7Q/546/VYh03aZ91Aq27sLnuuE4Cgah8sG3SgJ3LYPhAt1WrwY8WimpE rT0RxCiGBG9prake4l9KRO3EMPHKvj4P4FT1tjgeoFC3mwhfyrd8DptqkMMFYmCUja1P BzezGXm2715dPlQEDufVZWXuCxpxe7s4NCU8k89ETGDBALxwk9vNYV6n4b8nMcsGgEg9 S6XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eNAECVcbyTrw7Hqe2o/JIrFaz3ye8bj1rO5sAICF3BM=; b=K3qLxlJ7i6nO3YES3Sd29qhMg3M8Lig+hdUvH6VwO/h6by3R0i7MHN3AhDpR4+Fsl1 lA/uY/Uae3Lu3HuOH4uh3AyMXG0IB/975DXI9cFmHe3usguK0yd1N4TIG55uoGdI7n/Y X/vpkRPcNhM4e2nAmhm0/IvXIemwQQ1Bn2jDGmCgoUx/cpWyF7zGRTSkFZtooovpYbB3 Y9otlffMOkCdOmDX+fOd1CN0bsSZcHwX80PNHVvpCKpL+Xtrt37X41UH1LV6tj2qe1W9 lec0sbAFO8yYfG99TUBP4x82Uojk7X/pX1Mvl5+R7DCXXfLVA/G0+VcGc+fWcEZCwA8F 5/7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G+jF2tbb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f184si14188813jac.102.2021.05.31.09.45.43; Mon, 31 May 2021 09:45:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=G+jF2tbb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232055AbhEaQqs (ORCPT + 99 others); Mon, 31 May 2021 12:46:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:47898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233045AbhEaOzT (ORCPT ); Mon, 31 May 2021 10:55:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86C2661CB6; Mon, 31 May 2021 13:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469578; bh=PzC1/aHqCfv71WlG8DDX9grk2xusdWHpo+JrJJTeOp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G+jF2tbbHM1QeozK6q8m1rV53EyDTFnL+2fAfyxMYR4TjrHYQoJlriTZ7jza7EcNv EnSGMXFkms5oP3/zRE2mK64is8E+P9leTjOrw/HA8M88xBHw8QI57XEwC9etfnsJqN cIY2vOK9QfDZj4YDunQqZLeVCvyM8rMlTGRqu3B8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin Subject: [PATCH 5.12 216/296] drm/amdgpu: stop touching sched.ready in the backend Date: Mon, 31 May 2021 15:14:31 +0200 Message-Id: <20210531130711.107040431@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian König [ Upstream commit a2b4785f01280a4291edb9fda69032fc2e4bfd3f ] This unfortunately comes up in regular intervals and breaks GPU reset for the engine in question. The sched.ready flag controls if an engine can't get working during hw_init, but should never be set to false during hw_fini. v2: squash in unused variable fix (Alex) Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 2 -- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 -- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 5 ----- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 8 +------- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c index c6724a0e0c43..dc947c8ffe21 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c @@ -198,8 +198,6 @@ static int jpeg_v2_5_hw_fini(void *handle) if (adev->jpeg.cur_state != AMD_PG_STATE_GATE && RREG32_SOC15(JPEG, i, mmUVD_JRBC_STATUS)) jpeg_v2_5_set_powergating_state(adev, AMD_PG_STATE_GATE); - - ring->sched.ready = false; } return 0; diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c index e8fbb2a0de34..1d354245678d 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c @@ -166,8 +166,6 @@ static int jpeg_v3_0_hw_fini(void *handle) RREG32_SOC15(JPEG, 0, mmUVD_JRBC_STATUS)) jpeg_v3_0_set_powergating_state(adev, AMD_PG_STATE_GATE); - ring->sched.ready = false; - return 0; } diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c index 690a5090475a..32c6aa03d267 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -470,11 +470,6 @@ static void sdma_v5_2_gfx_stop(struct amdgpu_device *adev) ib_cntl = REG_SET_FIELD(ib_cntl, SDMA0_GFX_IB_CNTL, IB_ENABLE, 0); WREG32(sdma_v5_2_get_reg_offset(adev, i, mmSDMA0_GFX_IB_CNTL), ib_cntl); } - - sdma0->sched.ready = false; - sdma1->sched.ready = false; - sdma2->sched.ready = false; - sdma3->sched.ready = false; } /** diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c index 9b844e9fb16f..ebbc04ff5da0 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c @@ -368,7 +368,7 @@ static int vcn_v3_0_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_ring *ring; - int i, j; + int i; for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { if (adev->vcn.harvest_config & (1 << i)) @@ -383,12 +383,6 @@ static int vcn_v3_0_hw_fini(void *handle) vcn_v3_0_set_powergating_state(adev, AMD_PG_STATE_GATE); } } - ring->sched.ready = false; - - for (j = 0; j < adev->vcn.num_enc_rings; ++j) { - ring = &adev->vcn.inst[i].ring_enc[j]; - ring->sched.ready = false; - } } return 0; -- 2.30.2