Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp634643pxv; Thu, 15 Jul 2021 12:04:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEwfZ0180mrpm/Vpr+56hD13ELHzGADdZ9R4l7Rigj+SAo4KaYrwKtEnX7ypCwgGoNIW1Y X-Received: by 2002:a05:6402:51c9:: with SMTP id r9mr9042152edd.326.1626375878620; Thu, 15 Jul 2021 12:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375878; cv=none; d=google.com; s=arc-20160816; b=Ney7a4LE3xdmB+Mt2Jyjg7EIWPEyrxVVrh1TLzPyszJAUzuRJYSaCfmJ/qva0Vzrpk GFILfKuzM9+tjDYfCe7atpUPpJiAsZtTksRrIHRcxs4/0Ma4xM2a3ScFHDQ6jjrLUnjv VhsAoWNBVCW99/zMSX1DXUwT5M/bdRBaCvYluo8hZGdO1qFEWJTQ1/IEpinNfvPOuSqT uMxKJTiifQR6uaeNnDOPP4QC01rBq7AepxST4DW5kFfH+eoUl0mnJEIEgwfL7lJLSVky llY+NhDryiSz/JOzEWULyHiXB1bWgP63jNpXAuy+XLy1sIIeXAnqeS54BskdhOoGb/Lt zt9w== 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=qay6tROFQ7wCggyBvZZFqCMVODAmg2wqFz4VpYnk8WQ=; b=TWxe0M3HxFxiY/0ByLg7xw7diBGyETMMVDIcSJRzzRjUd2fVEcR5XCpQthxhyD+D5/ gaXsgzNgfW6DHg0WJZX5iE+fgMQKvWTd5oF8MZ2Y5S4cjtdw1TbWQGaT/u/7Gju9MoG1 148foKwUcVQuu0sC47Pc33Skq7mcsCJRnLMPDSR0rAt8rVXPsO4scIo13JCQ2J3IHm6R s86o/rPiZiRlDKZdDClyOs/Cs8VEvfpUP659+mddxlPhPko9um4jjyi/Zr/uaFgaypfy 139Ipos6S8Zow6lsKFPrL5zXaiconf/SdxCS1LWzAVoHvMXCkIdHGOxu2kkMWJehQg4F Ndwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ESPqdgn4; 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 m7si8415117edq.604.2021.07.15.12.04.15; Thu, 15 Jul 2021 12:04:38 -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=ESPqdgn4; 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 S242299AbhGOTF0 (ORCPT + 99 others); Thu, 15 Jul 2021 15:05:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242304AbhGOSz6 (ORCPT ); Thu, 15 Jul 2021 14:55:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C90F613CA; Thu, 15 Jul 2021 18:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375183; bh=A4fkhWVz99NIUQ8loIoU09gIJ3czNtlDyfWaePm15HQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESPqdgn4nufm34md/8yeRvj+j0L6jmxhgJB6hj10TpHQyu0hFWFlNA/JfjowEXXoX 1e/PmNQkekN30rsSKkg/wChLzjAvFAwgRqHF+ETykMkZe8T748ROcjybMGapahF7Dy pukrF9EfUAa9gZHTnODRkhqajseRRbrjWLpe+nFs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jianmin Lv , Tiezhu Yang , Alex Deucher Subject: [PATCH 5.10 152/215] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 Date: Thu, 15 Jul 2021 20:38:44 +0200 Message-Id: <20210715182626.440333643@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@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: Tiezhu Yang commit c1bfd74bfef77bcefc88d12eaf8996c0dfd51331 upstream. On the Loongson64 platform used with Radeon GPU, shutdown or reboot failed when console=tty is in the boot cmdline. radeon_suspend_kms() puts the hw in the suspend state, especially set fb state as FBINFO_STATE_SUSPENDED: if (fbcon) { console_lock(); radeon_fbdev_set_suspend(rdev, 1); console_unlock(); } Then avoid to do any more fb operations in the related functions: if (p->state != FBINFO_STATE_RUNNING) return; So call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 to fix this issue, it looks like some kind of workaround like powerpc. Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Tiezhu Yang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/radeon/radeon_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -416,13 +416,13 @@ radeon_pci_shutdown(struct pci_dev *pdev if (radeon_device_is_virtual()) radeon_pci_remove(pdev); -#ifdef CONFIG_PPC64 +#if defined(CONFIG_PPC64) || defined(CONFIG_MACH_LOONGSON64) /* * Some adapters need to be suspended before a * shutdown occurs in order to prevent an error - * during kexec. - * Make this power specific becauase it breaks - * some non-power boards. + * during kexec, shutdown or reboot. + * Make this power and Loongson specific because + * it breaks some other boards. */ radeon_suspend_kms(pci_get_drvdata(pdev), true, true, false); #endif