Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033843AbbKFUnw (ORCPT ); Fri, 6 Nov 2015 15:43:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47275 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030449AbbKFTWG (ORCPT ); Fri, 6 Nov 2015 14:22:06 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Deucher Subject: [PATCH 4.2 044/110] drm/amdgpu: dont try to recreate sysfs entries on resume Date: Fri, 6 Nov 2015 11:18:51 -0800 Message-Id: <20151106191705.562477772@linuxfoundation.org> X-Mailer: git-send-email 2.6.2 In-Reply-To: <20151106191703.247930828@linuxfoundation.org> References: <20151106191703.247930828@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1653 Lines: 57 4.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alex Deucher commit c86f5ebfbd147d1a228ab89ee1658e18939bd7ad upstream. Fixes an error on resume caused by: fa022a9b65d2886486a022fd66b20c823cd76ad9 Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 5 +++++ 2 files changed, 6 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1583,6 +1583,7 @@ struct amdgpu_pm { u8 fan_max_rpm; /* dpm */ bool dpm_enabled; + bool sysfs_initialized; struct amdgpu_dpm dpm; const struct firmware *fw; /* SMC firmware */ uint32_t fw_version; --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -693,6 +693,9 @@ int amdgpu_pm_sysfs_init(struct amdgpu_d { int ret; + if (adev->pm.sysfs_initialized) + return 0; + if (adev->pm.funcs->get_temperature == NULL) return 0; adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev, @@ -721,6 +724,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_d return ret; } + adev->pm.sysfs_initialized = true; + return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/