[PATCH 4/5] drm/amdgpu: check scratch registers to see if we need post

Zhang, Jerry (Junwei) Jerry.Zhang at amd.com
Thu Jul 6 06:07:34 UTC 2017


On 07/01/2017 05:32 AM, Alex Deucher wrote:
> Rather than checking the CONGIG_MEMSIZE register as that may
> not be reliable on some APUs.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +---------
>   1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 63f4bed..9d08f53 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -716,20 +716,12 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
>    */
>   bool amdgpu_need_post(struct amdgpu_device *adev)
>   {
> -	uint32_t reg;
> -
>   	if (adev->has_hw_reset) {
>   		adev->has_hw_reset = false;
>   		return true;
>   	}
> -	/* then check MEM_SIZE, in case the crtcs are off */
> -	reg = amdgpu_asic_get_config_memsize(adev);

Do we still need it for SI?

Jerry

> -
> -	if ((reg != 0) && (reg != 0xffffffff))
> -		return false;
> -
> -	return true;
>
> +	return amdgpu_atombios_scratch_need_asic_init(adev);
>   }
>
>   static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
>


More information about the amd-gfx mailing list