diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 29 | 
1 files changed, 25 insertions, 4 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 126e74758a34..26127c7d2f32 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -87,9 +87,10 @@   * - 3.36.0 - Allow reading more status registers on si/cik   * - 3.37.0 - L2 is invalidated before SDMA IBs, needed for correctness   * - 3.38.0 - Add AMDGPU_IB_FLAG_EMIT_MEM_SYNC + * - 3.39.0 - DMABUF implicit sync does a full pipeline sync   */  #define KMS_DRIVER_MAJOR	3 -#define KMS_DRIVER_MINOR	38 +#define KMS_DRIVER_MINOR	39  #define KMS_DRIVER_PATCHLEVEL	0  int amdgpu_vram_limit = 0; @@ -148,6 +149,7 @@ int amdgpu_mes = 0;  int amdgpu_noretry;  int amdgpu_force_asic_type = -1;  int amdgpu_tmz = 0; +int amdgpu_reset_method = -1; /* auto */  struct amdgpu_mgpu_info mgpu_info = {  	.mutex = __MUTEX_INITIALIZER(mgpu_info.mutex), @@ -705,6 +707,14 @@ MODULE_PARM_DESC(hws_gws_support, "Assume MEC2 FW supports GWS barriers (false =  int queue_preemption_timeout_ms = 9000;  module_param(queue_preemption_timeout_ms, int, 0644);  MODULE_PARM_DESC(queue_preemption_timeout_ms, "queue preemption timeout in ms (1 = Minimum, 9000 = default)"); + +/** + * DOC: debug_evictions(bool) + * Enable extra debug messages to help determine the cause of evictions + */ +bool debug_evictions; +module_param(debug_evictions, bool, 0644); +MODULE_PARM_DESC(debug_evictions, "enable eviction debug messages (false = default)");  #endif  /** @@ -748,6 +758,13 @@ module_param_named(abmlevel, amdgpu_dm_abm_level, uint, 0444);  MODULE_PARM_DESC(tmz, "Enable TMZ feature (-1 = auto, 0 = off (default), 1 = on)");  module_param_named(tmz, amdgpu_tmz, int, 0444); +/** + * DOC: reset_method (int) + * GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco) + */ +MODULE_PARM_DESC(reset_method, "GPU reset method (-1 = auto (default), 0 = legacy, 1 = mode0, 2 = mode1, 3 = mode2, 4 = baco)"); +module_param_named(reset_method, amdgpu_reset_method, int, 0444); +  static const struct pci_device_id pciidlist[] = {  #ifdef  CONFIG_DRM_AMDGPU_SI  	{0x1002, 0x6780, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TAHITI}, @@ -1111,7 +1128,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,  	pci_set_drvdata(pdev, dev); -	amdgpu_driver_load_kms(dev, ent->driver_data); +	ret = amdgpu_driver_load_kms(dev, ent->driver_data); +	if (ret) +		goto err_pci;  retry_init:  	ret = drm_dev_register(dev, ent->driver_data); @@ -1167,7 +1186,8 @@ amdgpu_pci_shutdown(struct pci_dev *pdev)  	 * unfortunately we can't detect certain  	 * hypervisors so just do this all the time.  	 */ -	adev->mp1_state = PP_MP1_STATE_UNLOAD; +	if (!amdgpu_passthrough(adev)) +		adev->mp1_state = PP_MP1_STATE_UNLOAD;  	amdgpu_device_ip_suspend(adev);  	adev->mp1_state = PP_MP1_STATE_NONE;  } @@ -1373,11 +1393,12 @@ long amdgpu_drm_ioctl(struct file *filp,  	dev = file_priv->minor->dev;  	ret = pm_runtime_get_sync(dev->dev);  	if (ret < 0) -		return ret; +		goto out;  	ret = drm_ioctl(filp, cmd, arg);  	pm_runtime_mark_last_busy(dev->dev); +out:  	pm_runtime_put_autosuspend(dev->dev);  	return ret;  } | 
