Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp657356pxv; Thu, 15 Jul 2021 12:40:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPB1fpWrnSxFwNb5tBDvuQFnVI1AvEwId1DSVTz9Zzn/R4dHAFncmlST+gGX7IaisWHIr2 X-Received: by 2002:a5e:d80e:: with SMTP id l14mr4408673iok.79.1626378015203; Thu, 15 Jul 2021 12:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378015; cv=none; d=google.com; s=arc-20160816; b=WuHRzFbS5sDrRYJXfbPnEPFOerAr27I3KajKWbC8TLAo9ssdtEwgdAo5IhQm4xBmqE ZSSeWKbuC34xk4buf6a2GeVOnHnKTI+8DUokgzOfFw7rUUGJQCCEN+EHwfliZ/wGKz1A 5VSHa+C/dsE71aPt+ewoWB1xEfLB1zRs4Lw/yP0mF1ZFt3hmlBTcQ1z9cR5Saa6PgzdB aqRJvH1OTZn09Hw6gTPeX+KaGhGVg0hVN9auqE+a2VDQPByqrlXdxbNpQSPvq8dTSr/d QHt569EZbS1X+0RFSaoMX7CQEtzJYvN8mbxUmzpNrD7evgQSxe98iUQKBZp1j9FGin3L g/0A== 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=5ePlV8eZqRHjYx3ZMKU5pCqSDNqszFqpE3VGvSfa9ME=; b=UpTJdzKnap4n439PseMYiK6r4OWjaSWvet3D9HtWgjxEBMWojLFOM7ogvCkfA10gbQ XXbR3q2a9Rt927CopiNCLArsyzaLKXcgFkpl5/p8zTLS3Tmv2ieGEoa5wN1vbVG924Hj J0Ncm/MFalZ1NfHa7l5OdSnOM6huu5gc5YHtugKizd+a8dnRAfTdnipFZ2OZqrzhK+nn 50ZDWhlEi17QRNpz6h+YOnrFmkYBUTUxA+R/n1jYLVYupIBAEWnEvhaldrAZMz0OrkAo ZzKHjM7SSsoFT1B78JPG1JKLck0eGlYMoXI5Dac/sCFtr4g8GzkrbcCtq+H9+2tyIEUS COaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C3ClqWWX; 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 l23si7673297jaf.47.2021.07.15.12.40.02; Thu, 15 Jul 2021 12:40:15 -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=C3ClqWWX; 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 S238711AbhGOTls (ORCPT + 99 others); Thu, 15 Jul 2021 15:41:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:51090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244624AbhGOTO7 (ORCPT ); Thu, 15 Jul 2021 15:14:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F15261408; Thu, 15 Jul 2021 19:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376253; bh=a9XVL2KJ0JroVTPxy1S9ksp1mr+U+sM7H6KVZIxwG1A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C3ClqWWXebZkboT4Q/d6c0iV5rtCbX6RwrwCS9v8NiJVO/gIB832rKh7h2qW+WuB7 ScD064D/AyZSUw/YeKhnifnKtVm2YKECxIDFx2Dd65bSKHWsB4GAQAc2QQ8r86rYvg SOwGOAR83A/Lpb1h8/ZKzIYhhBcpmSnmqmlZe1gQ= 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.13 191/266] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 Date: Thu, 15 Jul 2021 20:39:06 +0200 Message-Id: <20210715182644.634870525@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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 @@ -386,13 +386,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