From: Michel Dänzer <michel.daen...@amd.com>
Signed-off-by: Michel Dänzer <michel.daen...@amd.com> --- Not sure the CS ioctl can actually run concurrently with suspend/resume, but might be better safe than sorry? drivers/gpu/drm/radeon/radeon_device.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 5f3d02d..80b4799 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -881,6 +881,10 @@ int radeon_suspend_kms(struct drm_device *dev, pm_message_t state) } } } + + /* Prevent CS ioctl from interfering */ + cs_mutex_lock(rdev); + /* evict vram memory */ radeon_bo_evict_vram(rdev); /* wait for gpu to finish processing current batch */ @@ -944,6 +948,9 @@ int radeon_resume_kms(struct drm_device *dev) list_for_each_entry(connector, &dev->mode_config.connector_list, head) { drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); } + + cs_mutex_unlock(rdev); + return 0; } -- 1.7.6.3 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel