Apparently UVD doesn't yet work everywhere - so allow it to be disabled. Shaves off some reboot and suspend/resume time on machines where it doesn't work. Might be useful for problematic chips in the future as well. Patch attached as well as inline below. Signed-off-by: Parag Warudkar <parag.lkml@xxxxxxxxx> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 1442ce7..f131d8f 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -79,6 +79,7 @@ * Modules parameters. */ extern int radeon_no_wb; +extern int radeon_no_uvd; extern int radeon_modeset; extern int radeon_dynclks; extern int radeon_r4xx_atom; diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index d33f484..7e5b171 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -147,6 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {} #endif int radeon_no_wb; +int radeon_no_uvd; int radeon_modeset = 1; int radeon_dynclks = -1; int radeon_r4xx_atom = 0; @@ -168,6 +169,9 @@ int radeon_fastfb = 0; MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); module_param_named(no_wb, radeon_no_wb, int, 0444); +MODULE_PARM_DESC(no_uvd, "Disable UVD"); +module_param_named(no_uvd, radeon_no_uvd, int, 0444); + MODULE_PARM_DESC(modeset, "Disable/Enable modesetting"); module_param_named(modeset, radeon_modeset, int, 0400); diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index b369d42..4320973 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h @@ -329,6 +329,7 @@ typedef struct drm_radeon_kcmd_buffer { } drm_radeon_kcmd_buffer_t; extern int radeon_no_wb; +extern int radeon_no_uvd; extern struct drm_ioctl_desc radeon_ioctls[]; extern int radeon_max_ioctl; diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index 906e5c0..93a7dbb 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -58,7 +58,8 @@ int radeon_uvd_init(struct radeon_device *rdev) unsigned long bo_size; const char *fw_name; int i, r; - + if (radeon_no_uvd) + return -EINVAL; INIT_DELAYED_WORK(&rdev->uvd.idle_work, radeon_uvd_idle_work_handler); pdev = platform_device_register_simple("radeon_uvd", 0, NULL, 0);
Attachment:
radeon-option-no-uvd.patch
Description: Binary data
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel