* kernel NULL pointer dereference, IP: rs600_pm_prepare - huh?
@ 2015-09-30 0:36 Marcel Partap
2015-09-30 20:46 ` Alex Deucher
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Partap @ 2015-09-30 0:36 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
Hi,
friend send me this screenshot over whatsapp, complaining that her
system wouldn't start up since yesterday. What gives?
#Best Regards/MPartap
[-- Attachment #2: IMG-20150929-WA0018.jpg --]
[-- Type: image/jpeg, Size: 302173 bytes --]
[-- Attachment #3: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kernel NULL pointer dereference, IP: rs600_pm_prepare - huh?
2015-09-30 0:36 kernel NULL pointer dereference, IP: rs600_pm_prepare - huh? Marcel Partap
@ 2015-09-30 20:46 ` Alex Deucher
2015-09-30 20:47 ` Alex Deucher
2015-10-06 13:12 ` Marcel Partap
0 siblings, 2 replies; 4+ messages in thread
From: Alex Deucher @ 2015-09-30 20:46 UTC (permalink / raw)
To: Marcel Partap; +Cc: Maling list - DRI developers
On Tue, Sep 29, 2015 at 8:36 PM, Marcel Partap <mpartap@gmx.net> wrote:
> Hi,
> friend send me this screenshot over whatsapp, complaining that her
> system wouldn't start up since yesterday. What gives?
Looks like she installed some tool that attempts to change the power
state via sysfs during init which could happen before the driver has
finished loading. The attached kernel patch should fix it.
Alex
>
> #Best Regards/MPartap
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: kernel NULL pointer dereference, IP: rs600_pm_prepare - huh?
2015-09-30 20:46 ` Alex Deucher
@ 2015-09-30 20:47 ` Alex Deucher
2015-10-06 13:12 ` Marcel Partap
1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2015-09-30 20:47 UTC (permalink / raw)
To: Marcel Partap; +Cc: Maling list - DRI developers
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
On Wed, Sep 30, 2015 at 4:46 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Tue, Sep 29, 2015 at 8:36 PM, Marcel Partap <mpartap@gmx.net> wrote:
>> Hi,
>> friend send me this screenshot over whatsapp, complaining that her
>> system wouldn't start up since yesterday. What gives?
>
> Looks like she installed some tool that attempts to change the power
> state via sysfs during init which could happen before the driver has
> finished loading. The attached kernel patch should fix it.
Patch attached.
>
> Alex
>
>>
>> #Best Regards/MPartap
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>
[-- Attachment #2: 0001-drm-radeon-add-pm-sysfs-files-late.patch --]
[-- Type: text/x-patch, Size: 4961 bytes --]
From 3d4d4c36fc56330df05f7c03c754b01f502cd387 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Wed, 30 Sep 2015 16:45:52 -0400
Subject: [PATCH] drm/radeon: add pm sysfs files late
They were added relatively early in the driver init process
which meant that in some cases the driver was not finished
initializing before external tools tried to use them which
could result in a crash depending on the timing.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/radeon_display.c | 14 ++------
drivers/gpu/drm/radeon/radeon_pm.c | 63 ++++++++++++++++++++-------------
2 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index d2e9e9e..6743174 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1633,18 +1633,8 @@ int radeon_modeset_init(struct radeon_device *rdev)
radeon_fbdev_init(rdev);
drm_kms_helper_poll_init(rdev->ddev);
- if (rdev->pm.dpm_enabled) {
- /* do dpm late init */
- ret = radeon_pm_late_init(rdev);
- if (ret) {
- rdev->pm.dpm_enabled = false;
- DRM_ERROR("radeon_pm_late_init failed, disabling dpm\n");
- }
- /* set the dpm state for PX since there won't be
- * a modeset to call this.
- */
- radeon_pm_compute_clocks(rdev);
- }
+ /* do pm late init */
+ ret = radeon_pm_late_init(rdev);
return 0;
}
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 05751f3..44489cc 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -1326,14 +1326,6 @@ static int radeon_pm_init_old(struct radeon_device *rdev)
INIT_DELAYED_WORK(&rdev->pm.dynpm_idle_work, radeon_dynpm_idle_work_handler);
if (rdev->pm.num_power_states > 1) {
- /* where's the best place to put these? */
- ret = device_create_file(rdev->dev, &dev_attr_power_profile);
- if (ret)
- DRM_ERROR("failed to create device file for power profile\n");
- ret = device_create_file(rdev->dev, &dev_attr_power_method);
- if (ret)
- DRM_ERROR("failed to create device file for power method\n");
-
if (radeon_debugfs_pm_init(rdev)) {
DRM_ERROR("Failed to register debugfs file for PM!\n");
}
@@ -1391,20 +1383,6 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev)
goto dpm_failed;
rdev->pm.dpm_enabled = true;
- ret = device_create_file(rdev->dev, &dev_attr_power_dpm_state);
- if (ret)
- DRM_ERROR("failed to create device file for dpm state\n");
- ret = device_create_file(rdev->dev, &dev_attr_power_dpm_force_performance_level);
- if (ret)
- DRM_ERROR("failed to create device file for dpm state\n");
- /* XXX: these are noops for dpm but are here for backwards compat */
- ret = device_create_file(rdev->dev, &dev_attr_power_profile);
- if (ret)
- DRM_ERROR("failed to create device file for power profile\n");
- ret = device_create_file(rdev->dev, &dev_attr_power_method);
- if (ret)
- DRM_ERROR("failed to create device file for power method\n");
-
if (radeon_debugfs_pm_init(rdev)) {
DRM_ERROR("Failed to register debugfs file for dpm!\n");
}
@@ -1545,9 +1523,44 @@ int radeon_pm_late_init(struct radeon_device *rdev)
int ret = 0;
if (rdev->pm.pm_method == PM_METHOD_DPM) {
- mutex_lock(&rdev->pm.mutex);
- ret = radeon_dpm_late_enable(rdev);
- mutex_unlock(&rdev->pm.mutex);
+ if (rdev->pm.dpm_enabled) {
+ ret = device_create_file(rdev->dev, &dev_attr_power_dpm_state);
+ if (ret)
+ DRM_ERROR("failed to create device file for dpm state\n");
+ ret = device_create_file(rdev->dev, &dev_attr_power_dpm_force_performance_level);
+ if (ret)
+ DRM_ERROR("failed to create device file for dpm state\n");
+ /* XXX: these are noops for dpm but are here for backwards compat */
+ ret = device_create_file(rdev->dev, &dev_attr_power_profile);
+ if (ret)
+ DRM_ERROR("failed to create device file for power profile\n");
+ ret = device_create_file(rdev->dev, &dev_attr_power_method);
+ if (ret)
+ DRM_ERROR("failed to create device file for power method\n");
+
+ mutex_lock(&rdev->pm.mutex);
+ ret = radeon_dpm_late_enable(rdev);
+ mutex_unlock(&rdev->pm.mutex);
+ if (ret) {
+ rdev->pm.dpm_enabled = false;
+ DRM_ERROR("radeon_pm_late_init failed, disabling dpm\n");
+ } else {
+ /* set the dpm state for PX since there won't be
+ * a modeset to call this.
+ */
+ radeon_pm_compute_clocks(rdev);
+ }
+ }
+ } else {
+ if (rdev->pm.num_power_states > 1) {
+ /* where's the best place to put these? */
+ ret = device_create_file(rdev->dev, &dev_attr_power_profile);
+ if (ret)
+ DRM_ERROR("failed to create device file for power profile\n");
+ ret = device_create_file(rdev->dev, &dev_attr_power_method);
+ if (ret)
+ DRM_ERROR("failed to create device file for power method\n");
+ }
}
return ret;
}
--
1.8.3.1
[-- Attachment #3: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: kernel NULL pointer dereference, IP: rs600_pm_prepare - huh?
2015-09-30 20:46 ` Alex Deucher
2015-09-30 20:47 ` Alex Deucher
@ 2015-10-06 13:12 ` Marcel Partap
1 sibling, 0 replies; 4+ messages in thread
From: Marcel Partap @ 2015-10-06 13:12 UTC (permalink / raw)
To: Alex Deucher; +Cc: Maling list - DRI developers
Hi,
> Looks like she installed some tool that attempts to change the power
> state via sysfs during init which could happen before the driver has
> finished loading.
that was probably me, installing the "tlp" thinkpad tool remotely.
Thanks for pointing me in the right direction: disabling solved it for now.
> The attached kernel patch should fix it.
Unfortunately wasn't able to test because she had bandwidth bottlenecks
and I had next to no time to fix it.. Might be able to test it on my
thinkpad in a while.
#Best Regards!Marcel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-06 13:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 0:36 kernel NULL pointer dereference, IP: rs600_pm_prepare - huh? Marcel Partap
2015-09-30 20:46 ` Alex Deucher
2015-09-30 20:47 ` Alex Deucher
2015-10-06 13:12 ` Marcel Partap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.