[PATCH] drm/amdgpu/gfx9: only init the apertures used by KGD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 01.01.2018 um 22:17 schrieb Alex Deucher:
> Use adev->vm_manager.id_mgr[0].num_ids rather than hardcoded 16.
>
> Noticed-by: Felix Kuehling <felix.kuehling at amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 55670dbacace..4abaf802a260 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -1526,7 +1526,7 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)
>   	/* XXX SH_MEM regs */
>   	/* where to put LDS, scratch, GPUVM in FSA64 space */
>   	mutex_lock(&adev->srbm_mutex);
> -	for (i = 0; i < 16; i++) {
> +	for (i = 0; i < adev->vm_manager.id_mgr[0].num_ids; i++) {

Using AMDGPU_GFXHUB instead of hardcoding 0 here would probably be a 
good idea.

Apart from that Reviewed-by: Christian König <christian.koenig at amd.com>

Regards,
Christian.

>   		soc15_grbm_select(adev, 0, 0, 0, i);
>   		/* CP and shaders */
>   		if (i == 0) {



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux