Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2672022pxj; Mon, 31 May 2021 07:56:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZlrf19j0Gdps3rVOOnAGZ8IdvrdpPvZX4i7Re98k0ZBejvp3XbB+ewuKIPhetjvAlhphO X-Received: by 2002:a92:7510:: with SMTP id q16mr17445995ilc.291.1622472993471; Mon, 31 May 2021 07:56:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622472993; cv=none; d=google.com; s=arc-20160816; b=fF3YExOfuYW/vOEBj6ik9MtiBz7abNewog6T6qNlG0go515tzqMIB6dK0Ri/ktqUmQ WMSZjxNqTx+bH/J9Ps2i4WFVXnXO0KxUNoJ+ULJgnL0ahLbYtUrrekm9sNdFnHqRBue4 XrvjMz1z5c7SpZ1elR4B8kV4i0duCk15bkoZ7ATg1QpdYdRJtp9wBky/aWUGj2CLkGrQ MtcC5DCDmPMkrruHoF6homW+mvjdK4Ettnpc8VLj9HelI5tQvBtqwgRr+3RPRgGKEAEi CariyRkOz+ZoSzX4azORCXvaRij+ytBqqs5wZ/Vmiij/bDzn9l5Z4llNZgO1huTc64i1 zU8g== 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=8AQqSl0+Or0zGUcvfcPwighyjV7uEOXGLqDm/ZgWfpQ=; b=Cd57ixVvDUT7HD8jnca4YuMTpX6pW4yEAHZd2Y0NLA3538fSNebGmtxMV/C9FUYm45 2BiNu6ZJyYeV/HjuRbclV160ZtVGYs05mcpY/z6qJ70AM/5puezoml+3WxD2uaIWhOnd hV3h9/fq5v4lu0+n0UN0s5qI5qaP1Lze3nsJZhfkutyTaTDJiRBP1VAX6V5dBZHP1k81 a8qLKtq8ex+RTzhal0qPsm7Q93QQCJN+2SvpwRRw8V8iMpiD8ree4Y6Lh+p1AGHTrTeJ oo87WFpXfU+y6ILtbCluVpDaTfT53o+JfdLj9uKp1xuRqWNgInETPRMUmNeE0LOL6pdq w4Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bj3mYa00; 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 y3si16422213jad.12.2021.05.31.07.56.20; Mon, 31 May 2021 07:56:33 -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=Bj3mYa00; 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 S232754AbhEaO50 (ORCPT + 99 others); Mon, 31 May 2021 10:57:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:37786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233304AbhEaOEZ (ORCPT ); Mon, 31 May 2021 10:04:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77F0C61955; Mon, 31 May 2021 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468285; bh=o19B04rDSAAxX/tFaxndazizN7mBByLIkn3rVKEeiCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bj3mYa00D8JXhSn/yxHn5G6cJEypJZ8Vq7mzWFq6PkLVtktMGw1vuEKoQHApEdysu idUHE6v6SOuJpr22a7/5pXqRT2v7lMlpYVDrfLWUwxqCeS/Mf+W5lKlIWpTEb4FopH OM5Qnk/u2XkZpZ6MMA0NyUTewXofxBYWeo9qE94E= 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.10 185/252] drm/amdgpu: stop touching sched.ready in the backend Date: Mon, 31 May 2021 15:14:10 +0200 Message-Id: <20210531130704.291953609@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 845306f63cdb..63b350182389 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 3a0dff53654d..9259e35f0f55 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 2a485052e3ab..1bd330d43147 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -476,11 +476,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 b5f8f3d731cb..700621ddc02e 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c @@ -346,7 +346,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)) @@ -361,12 +361,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