All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix deadlock during gpu reset v2
@ 2021-01-11 21:02 Bhawanpreet Lakha
  2021-01-12  3:01 ` Chen, Guchun
  0 siblings, 1 reply; 7+ messages in thread
From: Bhawanpreet Lakha @ 2021-01-11 21:02 UTC (permalink / raw)
  To: nicholas.kazlauskas, Guchun.Chen, alexander.deucher
  Cc: Bhawanpreet Lakha, amd-gfx

[Why]
during idle optimizations we acquire the dc_lock, this lock is also
acquired during gpu_reset so we end up hanging the system due to a
deadlock

[How]
If we are in gpu reset:
 - disable idle optimizations and skip calls to the dc function

v2: skip idle optimizations calls

Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 99c7f9eb44aa..858c6ff173ba 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1816,6 +1816,9 @@ static int dm_suspend(void *handle)
 
 	if (amdgpu_in_reset(adev)) {
 		mutex_lock(&dm->dc_lock);
+
+		dc_allow_idle_optimizations(adev->dm.dc, false);
+
 		dm->cached_dc_state = dc_copy_state(dm->dc->current_state);
 
 		dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false);
@@ -5556,6 +5559,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
 	if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
 		return -EBUSY;
 
+	if (amdgpu_in_reset(adev))
+		return 0;
+
 	mutex_lock(&dm->dc_lock);
 
 	if (enable)
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2
  2021-01-11 21:02 [PATCH] drm/amd/display: Fix deadlock during gpu reset v2 Bhawanpreet Lakha
@ 2021-01-12  3:01 ` Chen, Guchun
  2021-01-12 16:03   ` Lakha, Bhawanpreet
  0 siblings, 1 reply; 7+ messages in thread
From: Chen, Guchun @ 2021-01-12  3:01 UTC (permalink / raw)
  To: Lakha, Bhawanpreet, Kazlauskas, Nicholas, Deucher, Alexander
  Cc: Lakha, Bhawanpreet, amd-gfx

[AMD Public Use]

When using dc_allow_idle_optimizations, should it be guarded by CONFIG_DRM_AMD_DC_DCN?

Regards,
Guchun

-----Original Message-----
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> 
Sent: Tuesday, January 12, 2021 5:03 AM
To: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Subject: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

[Why]
during idle optimizations we acquire the dc_lock, this lock is also acquired during gpu_reset so we end up hanging the system due to a deadlock

[How]
If we are in gpu reset:
 - disable idle optimizations and skip calls to the dc function

v2: skip idle optimizations calls

Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 99c7f9eb44aa..858c6ff173ba 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1816,6 +1816,9 @@ static int dm_suspend(void *handle)
 
 	if (amdgpu_in_reset(adev)) {
 		mutex_lock(&dm->dc_lock);
+
+		dc_allow_idle_optimizations(adev->dm.dc, false);
+
 		dm->cached_dc_state = dc_copy_state(dm->dc->current_state);
 
 		dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false); @@ -5556,6 +5559,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
 	if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
 		return -EBUSY;
 
+	if (amdgpu_in_reset(adev))
+		return 0;
+
 	mutex_lock(&dm->dc_lock);
 
 	if (enable)
--
2.25.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2
  2021-01-12  3:01 ` Chen, Guchun
@ 2021-01-12 16:03   ` Lakha, Bhawanpreet
  2021-01-12 16:06     ` Lakha, Bhawanpreet
  0 siblings, 1 reply; 7+ messages in thread
From: Lakha, Bhawanpreet @ 2021-01-12 16:03 UTC (permalink / raw)
  To: Chen, Guchun, Kazlauskas, Nicholas, Deucher, Alexander; +Cc: amd-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2640 bytes --]

[AMD Public Use]

No need since "dc_allow_idle_optimizations" will not do anything for asics below dcn3

Bhawan
________________________________
From: Chen, Guchun <Guchun.Chen@amd.com>
Sent: January 11, 2021 10:01 PM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Subject: RE: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

[AMD Public Use]

When using dc_allow_idle_optimizations, should it be guarded by CONFIG_DRM_AMD_DC_DCN?

Regards,
Guchun

-----Original Message-----
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Sent: Tuesday, January 12, 2021 5:03 AM
To: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Subject: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

[Why]
during idle optimizations we acquire the dc_lock, this lock is also acquired during gpu_reset so we end up hanging the system due to a deadlock

[How]
If we are in gpu reset:
 - disable idle optimizations and skip calls to the dc function

v2: skip idle optimizations calls

Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 99c7f9eb44aa..858c6ff173ba 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1816,6 +1816,9 @@ static int dm_suspend(void *handle)

         if (amdgpu_in_reset(adev)) {
                 mutex_lock(&dm->dc_lock);
+
+               dc_allow_idle_optimizations(adev->dm.dc, false);
+
                 dm->cached_dc_state = dc_copy_state(dm->dc->current_state);

                 dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false); @@ -5556,6 +5559,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
         if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
                 return -EBUSY;

+       if (amdgpu_in_reset(adev))
+               return 0;
+
         mutex_lock(&dm->dc_lock);

         if (enable)
--
2.25.1

[-- Attachment #1.2: Type: text/html, Size: 4782 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2
  2021-01-12 16:03   ` Lakha, Bhawanpreet
@ 2021-01-12 16:06     ` Lakha, Bhawanpreet
  2021-01-12 16:13       ` [PATCH] drm/amd/display: Fix deadlock during gpu reset v3 Bhawanpreet Lakha
  0 siblings, 1 reply; 7+ messages in thread
From: Lakha, Bhawanpreet @ 2021-01-12 16:06 UTC (permalink / raw)
  To: Chen, Guchun, Kazlauskas, Nicholas, Deucher, Alexander; +Cc: amd-gfx


[-- Attachment #1.1: Type: text/plain, Size: 3101 bytes --]

[AMD Public Use]

sorry, I misread your email, I will post a v3


Bhawan
________________________________
From: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Sent: January 12, 2021 11:03 AM
To: Chen, Guchun <Guchun.Chen@amd.com>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

No need since "dc_allow_idle_optimizations" will not do anything for asics below dcn3

Bhawan
________________________________
From: Chen, Guchun <Guchun.Chen@amd.com>
Sent: January 11, 2021 10:01 PM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Subject: RE: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

[AMD Public Use]

When using dc_allow_idle_optimizations, should it be guarded by CONFIG_DRM_AMD_DC_DCN?

Regards,
Guchun

-----Original Message-----
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Sent: Tuesday, January 12, 2021 5:03 AM
To: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>
Subject: [PATCH] drm/amd/display: Fix deadlock during gpu reset v2

[Why]
during idle optimizations we acquire the dc_lock, this lock is also acquired during gpu_reset so we end up hanging the system due to a deadlock

[How]
If we are in gpu reset:
 - disable idle optimizations and skip calls to the dc function

v2: skip idle optimizations calls

Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 99c7f9eb44aa..858c6ff173ba 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1816,6 +1816,9 @@ static int dm_suspend(void *handle)

         if (amdgpu_in_reset(adev)) {
                 mutex_lock(&dm->dc_lock);
+
+               dc_allow_idle_optimizations(adev->dm.dc, false);
+
                 dm->cached_dc_state = dc_copy_state(dm->dc->current_state);

                 dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false); @@ -5556,6 +5559,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
         if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
                 return -EBUSY;

+       if (amdgpu_in_reset(adev))
+               return 0;
+
         mutex_lock(&dm->dc_lock);

         if (enable)
--
2.25.1

[-- Attachment #1.2: Type: text/html, Size: 6092 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm/amd/display: Fix deadlock during gpu reset v3
  2021-01-12 16:06     ` Lakha, Bhawanpreet
@ 2021-01-12 16:13       ` Bhawanpreet Lakha
  2021-01-12 16:20         ` Kazlauskas, Nicholas
  0 siblings, 1 reply; 7+ messages in thread
From: Bhawanpreet Lakha @ 2021-01-12 16:13 UTC (permalink / raw)
  To: nicholas.kazlauskas, Guchun.Chen, alexander.deucher
  Cc: Bhawanpreet Lakha, amd-gfx

[Why]
during idle optimizations we acquire the dc_lock, this lock is also
acquired during gpu_reset so we end up hanging the system due to a
deadlock

[How]
If we are in gpu reset:
 - disable idle optimizations and skip calls to the dc function

v2: skip idle optimizations calls
v3: add guard for DCN

Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index de71b6c21590..82ceb0a8ba29 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1816,6 +1816,11 @@ static int dm_suspend(void *handle)
 
 	if (amdgpu_in_reset(adev)) {
 		mutex_lock(&dm->dc_lock);
+
+#if defined(CONFIG_DRM_AMD_DC_DCN)
+		dc_allow_idle_optimizations(adev->dm.dc, false);
+#endif
+
 		dm->cached_dc_state = dc_copy_state(dm->dc->current_state);
 
 		dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false);
@@ -5556,6 +5561,10 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
 	if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
 		return -EBUSY;
 
+#if defined(CONFIG_DRM_AMD_DC_DCN)
+	if (amdgpu_in_reset(adev))
+		return 0;
+
 	mutex_lock(&dm->dc_lock);
 
 	if (enable)
@@ -5572,6 +5581,7 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
 
 	mutex_unlock(&dm->dc_lock);
 
+#endif
 	return 0;
 }
 
-- 
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amd/display: Fix deadlock during gpu reset v3
  2021-01-12 16:13       ` [PATCH] drm/amd/display: Fix deadlock during gpu reset v3 Bhawanpreet Lakha
@ 2021-01-12 16:20         ` Kazlauskas, Nicholas
  2021-01-13  2:04           ` Chen, Guchun
  0 siblings, 1 reply; 7+ messages in thread
From: Kazlauskas, Nicholas @ 2021-01-12 16:20 UTC (permalink / raw)
  To: Bhawanpreet Lakha, Guchun.Chen, alexander.deucher; +Cc: amd-gfx

On 2021-01-12 11:13 a.m., Bhawanpreet Lakha wrote:
> [Why]
> during idle optimizations we acquire the dc_lock, this lock is also
> acquired during gpu_reset so we end up hanging the system due to a
> deadlock
> 
> [How]
> If we are in gpu reset:
>   - disable idle optimizations and skip calls to the dc function
> 
> v2: skip idle optimizations calls
> v3: add guard for DCN
> 
> Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for linux (MALL stutter)")
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Regards,
Nicholas Kazlauskas

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index de71b6c21590..82ceb0a8ba29 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1816,6 +1816,11 @@ static int dm_suspend(void *handle)
>   
>   	if (amdgpu_in_reset(adev)) {
>   		mutex_lock(&dm->dc_lock);
> +
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +		dc_allow_idle_optimizations(adev->dm.dc, false);
> +#endif
> +
>   		dm->cached_dc_state = dc_copy_state(dm->dc->current_state);
>   
>   		dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false);
> @@ -5556,6 +5561,10 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
>   	if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
>   		return -EBUSY;
>   
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +	if (amdgpu_in_reset(adev))
> +		return 0;
> +
>   	mutex_lock(&dm->dc_lock);
>   
>   	if (enable)
> @@ -5572,6 +5581,7 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
>   
>   	mutex_unlock(&dm->dc_lock);
>   
> +#endif
>   	return 0;
>   }
>   
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amd/display: Fix deadlock during gpu reset v3
  2021-01-12 16:20         ` Kazlauskas, Nicholas
@ 2021-01-13  2:04           ` Chen, Guchun
  0 siblings, 0 replies; 7+ messages in thread
From: Chen, Guchun @ 2021-01-13  2:04 UTC (permalink / raw)
  To: Kazlauskas, Nicholas, Lakha, Bhawanpreet, Deucher, Alexander; +Cc: amd-gfx

[AMD Public Use]

Reviewed-by: Guchun Chen <guchun.chen@amd.com>

Regards,
Guchun

-----Original Message-----
From: Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com> 
Sent: Wednesday, January 13, 2021 12:21 AM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display: Fix deadlock during gpu reset v3

On 2021-01-12 11:13 a.m., Bhawanpreet Lakha wrote:
> [Why]
> during idle optimizations we acquire the dc_lock, this lock is also 
> acquired during gpu_reset so we end up hanging the system due to a 
> deadlock
> 
> [How]
> If we are in gpu reset:
>   - disable idle optimizations and skip calls to the dc function
> 
> v2: skip idle optimizations calls
> v3: add guard for DCN
> 
> Fixes: 06d5652541c3 ("drm/amd/display: enable idle optimizations for 
> linux (MALL stutter)")
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

Regards,
Nicholas Kazlauskas

> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index de71b6c21590..82ceb0a8ba29 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1816,6 +1816,11 @@ static int dm_suspend(void *handle)
>   
>   	if (amdgpu_in_reset(adev)) {
>   		mutex_lock(&dm->dc_lock);
> +
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +		dc_allow_idle_optimizations(adev->dm.dc, false); #endif
> +
>   		dm->cached_dc_state = dc_copy_state(dm->dc->current_state);
>   
>   		dm_gpureset_toggle_interrupts(adev, dm->cached_dc_state, false); 
> @@ -5556,6 +5561,10 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
>   	if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
>   		return -EBUSY;
>   
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +	if (amdgpu_in_reset(adev))
> +		return 0;
> +
>   	mutex_lock(&dm->dc_lock);
>   
>   	if (enable)
> @@ -5572,6 +5581,7 @@ static inline int dm_set_vblank(struct drm_crtc 
> *crtc, bool enable)
>   
>   	mutex_unlock(&dm->dc_lock);
>   
> +#endif
>   	return 0;
>   }
>   
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-13  2:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 21:02 [PATCH] drm/amd/display: Fix deadlock during gpu reset v2 Bhawanpreet Lakha
2021-01-12  3:01 ` Chen, Guchun
2021-01-12 16:03   ` Lakha, Bhawanpreet
2021-01-12 16:06     ` Lakha, Bhawanpreet
2021-01-12 16:13       ` [PATCH] drm/amd/display: Fix deadlock during gpu reset v3 Bhawanpreet Lakha
2021-01-12 16:20         ` Kazlauskas, Nicholas
2021-01-13  2:04           ` Chen, Guchun

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.