diff mbox

[2/3] drm/radeon: add driver option to disable uvd/vce block.

Message ID 1458129407-4940-2-git-send-email-jglisse@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jerome Glisse March 16, 2016, 11:56 a.m. UTC
From: Jérome Glisse <jglisse@redhat.com>

Quite few suspend/hibernation bugs are related to this block. Add
an option to disable those as a work around.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/radeon.h      | 1 +
 drivers/gpu/drm/radeon/radeon_asic.c | 3 +++
 drivers/gpu/drm/radeon/radeon_drv.c  | 4 ++++
 3 files changed, 8 insertions(+)

Comments

Christian König March 16, 2016, 12:20 p.m. UTC | #1
Am 16.03.2016 um 12:56 schrieb jglisse@redhat.com:
> From: Jérome Glisse <jglisse@redhat.com>
>
> Quite few suspend/hibernation bugs are related to this block. Add
> an option to disable those as a work around.
>
> Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon.h      | 1 +
>   drivers/gpu/drm/radeon/radeon_asic.c | 3 +++
>   drivers/gpu/drm/radeon/radeon_drv.c  | 4 ++++
>   3 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 007be29..5c6ce3a 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -113,6 +113,7 @@ extern int radeon_bapm;
>   extern int radeon_backlight;
>   extern int radeon_auxch;
>   extern int radeon_mst;
> +extern int radeon_uvd;
>   
>   /*
>    * Copy from radeon_drv.h so we don't have to include both and have conflicting
> diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
> index 7d5a36d..49ee180 100644
> --- a/drivers/gpu/drm/radeon/radeon_asic.c
> +++ b/drivers/gpu/drm/radeon/radeon_asic.c
> @@ -2689,6 +2689,9 @@ int radeon_asic_init(struct radeon_device *rdev)
>   		rdev->asic->pm.set_memory_clock = NULL;
>   	}
>   
> +	if (!radeon_uvd)
> +		rdev->has_uvd = false;
> +
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index cad2555..03e4781 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -196,6 +196,7 @@ int radeon_bapm = -1;
>   int radeon_backlight = -1;
>   int radeon_auxch = -1;
>   int radeon_mst = 0;
> +int radeon_uvd = 1;
>   
>   MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
>   module_param_named(no_wb, radeon_no_wb, int, 0444);
> @@ -287,6 +288,9 @@ module_param_named(auxch, radeon_auxch, int, 0444);
>   MODULE_PARM_DESC(mst, "DisplayPort MST experimental support (1 = enable, 0 = disable)");
>   module_param_named(mst, radeon_mst, int, 0444);
>   
> +MODULE_PARM_DESC(uvd, "uvd/vce enable/disable uvd/vce support (1 = enable, 0 = disable)");
> +module_param_named(uvd, radeon_uvd, int, 0444);
> +
>   static struct pci_device_id pciidlist[] = {
>   	radeon_PCI_IDS
>   };
Jerome Glisse March 16, 2016, 12:36 p.m. UTC | #2
On Wed, Mar 16, 2016 at 1:20 PM, Christian König
<deathsimple@vodafone.de> wrote:
> Am 16.03.2016 um 12:56 schrieb jglisse@redhat.com:
>>
>> From: Jérome Glisse <jglisse@redhat.com>
>>
>> Quite few suspend/hibernation bugs are related to this block. Add
>> an option to disable those as a work around.
>>
>> Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>

Well this patch is kind of useless without the patch i forgot to sent,
i am gonna send it in a bit once i tested drm-next-4.6 with it.

Cheers,
Jérôme
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 007be29..5c6ce3a 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -113,6 +113,7 @@  extern int radeon_bapm;
 extern int radeon_backlight;
 extern int radeon_auxch;
 extern int radeon_mst;
+extern int radeon_uvd;
 
 /*
  * Copy from radeon_drv.h so we don't have to include both and have conflicting
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 7d5a36d..49ee180 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -2689,6 +2689,9 @@  int radeon_asic_init(struct radeon_device *rdev)
 		rdev->asic->pm.set_memory_clock = NULL;
 	}
 
+	if (!radeon_uvd)
+		rdev->has_uvd = false;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index cad2555..03e4781 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -196,6 +196,7 @@  int radeon_bapm = -1;
 int radeon_backlight = -1;
 int radeon_auxch = -1;
 int radeon_mst = 0;
+int radeon_uvd = 1;
 
 MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
 module_param_named(no_wb, radeon_no_wb, int, 0444);
@@ -287,6 +288,9 @@  module_param_named(auxch, radeon_auxch, int, 0444);
 MODULE_PARM_DESC(mst, "DisplayPort MST experimental support (1 = enable, 0 = disable)");
 module_param_named(mst, radeon_mst, int, 0444);
 
+MODULE_PARM_DESC(uvd, "uvd/vce enable/disable uvd/vce support (1 = enable, 0 = disable)");
+module_param_named(uvd, radeon_uvd, int, 0444);
+
 static struct pci_device_id pciidlist[] = {
 	radeon_PCI_IDS
 };