[PATCH 01/10] drm/amdgpu: is_dislay_hung will be called by soft reset

Christian König deathsimple at vodafone.de
Wed Jul 13 13:00:52 UTC 2016


The set looks good in general, but you use the same old approach we had 
for radeon. Alex, what do you think about this? Should we stick with 
that approach or rather start over?

I think it would be better if we can get rid of the AMDGPU_RESET_ enum 
and use a per IP block based function to figure out if a block is hung 
or not.

Then we can have a per block flag which tels us if a hung of this block 
can be cleared by a soft reset or needs a hard reset.

Then last but not least we reset only the hung blocks if possible.

Regards,
Christian.

Am 13.07.2016 um 12:32 schrieb Chunming Zhou:
> Change-Id: Ie81f6b1124aeb4304f59f92282fe8b18fb06a693
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/dce_v10_0.c        | 2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v10_0.h        | 2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c        | 2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.h        | 2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v8_0.c         | 2 +-
>   drivers/gpu/drm/amd/amdgpu/dce_v8_0.h         | 2 +-
>   drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c | 6 +++---
>   7 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> index 7554dd7..a592029 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
> @@ -532,7 +532,7 @@ static u32 dce_v10_0_hpd_get_gpio_reg(struct amdgpu_device *adev)
>   	return mmDC_GPIO_HPD_A;
>   }
>   
> -static bool dce_v10_0_is_display_hung(struct amdgpu_device *adev)
> +bool dce_v10_0_is_display_hung(struct amdgpu_device *adev)
>   {
>   	u32 crtc_hung = 0;
>   	u32 crtc_status[6];
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.h b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.h
> index 3947956..77a732c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.h
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.h
> @@ -32,5 +32,5 @@ void dce_v10_0_stop_mc_access(struct amdgpu_device *adev,
>   			      struct amdgpu_mode_mc_save *save);
>   void dce_v10_0_resume_mc_access(struct amdgpu_device *adev,
>   				struct amdgpu_mode_mc_save *save);
> -
> +bool dce_v10_0_is_display_hung(struct amdgpu_device *adev);
>   #endif
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index d9c9b88..e18bd20 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -549,7 +549,7 @@ static u32 dce_v11_0_hpd_get_gpio_reg(struct amdgpu_device *adev)
>   	return mmDC_GPIO_HPD_A;
>   }
>   
> -static bool dce_v11_0_is_display_hung(struct amdgpu_device *adev)
> +bool dce_v11_0_is_display_hung(struct amdgpu_device *adev)
>   {
>   	u32 crtc_hung = 0;
>   	u32 crtc_status[6];
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.h b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.h
> index dc6ff04..fa1884c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.h
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.h
> @@ -32,5 +32,5 @@ void dce_v11_0_stop_mc_access(struct amdgpu_device *adev,
>   			      struct amdgpu_mode_mc_save *save);
>   void dce_v11_0_resume_mc_access(struct amdgpu_device *adev,
>   				struct amdgpu_mode_mc_save *save);
> -
> +bool dce_v11_0_is_display_hung(struct amdgpu_device *adev);
>   #endif
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 14ac085..4863504 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -478,7 +478,7 @@ static u32 dce_v8_0_hpd_get_gpio_reg(struct amdgpu_device *adev)
>   	return mmDC_GPIO_HPD_A;
>   }
>   
> -static bool dce_v8_0_is_display_hung(struct amdgpu_device *adev)
> +bool dce_v8_0_is_display_hung(struct amdgpu_device *adev)
>   {
>   	u32 crtc_hung = 0;
>   	u32 crtc_status[6];
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.h b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
> index 4bb72ab..53f643c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.h
> @@ -32,5 +32,5 @@ void dce_v8_0_stop_mc_access(struct amdgpu_device *adev,
>   			     struct amdgpu_mode_mc_save *save);
>   void dce_v8_0_resume_mc_access(struct amdgpu_device *adev,
>   			       struct amdgpu_mode_mc_save *save);
> -
> +bool dce_v8_0_is_display_hung(struct amdgpu_device *adev);
>   #endif
> diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
> index ca64158..0ea0956 100644
> --- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm.c
> @@ -1301,7 +1301,7 @@ static const struct amdgpu_display_funcs dm_dce_v8_0_display_funcs = {
>   	.bandwidth_update = dm_bandwidth_update, /* called unconditionally */
>   	.vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */
>   	.vblank_wait = NULL,
> -	.is_display_hung = NULL, /* not called anywhere */
> +	.is_display_hung = dce_v8_0_is_display_hung,
>   	.backlight_set_level =
>   		dm_set_backlight_level,/* called unconditionally */
>   	.backlight_get_level =
> @@ -1325,7 +1325,7 @@ static const struct amdgpu_display_funcs dm_dce_v10_0_display_funcs = {
>   	.bandwidth_update = dm_bandwidth_update, /* called unconditionally */
>   	.vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */
>   	.vblank_wait = NULL,
> -	.is_display_hung = NULL, /* not called anywhere */
> +	.is_display_hung = dce_v10_0_is_display_hung,
>   	.backlight_set_level =
>   		dm_set_backlight_level,/* called unconditionally */
>   	.backlight_get_level =
> @@ -1349,7 +1349,7 @@ static const struct amdgpu_display_funcs dm_dce_v11_0_display_funcs = {
>   	.bandwidth_update = dm_bandwidth_update, /* called unconditionally */
>   	.vblank_get_counter = dm_vblank_get_counter,/* called unconditionally */
>   	.vblank_wait = NULL,
> -	.is_display_hung = NULL, /* not called anywhere */
> +	.is_display_hung = dce_v11_0_is_display_hung,
>   	.backlight_set_level =
>   		dm_set_backlight_level,/* called unconditionally */
>   	.backlight_get_level =



More information about the amd-gfx mailing list