[PATCH 1/4] drm/amdgpu/gfx7: cache raster_config values

Christian König ckoenig.leichtzumerken at gmail.com
Tue Nov 14 08:56:20 UTC 2017


Am 13.11.2017 um 22:09 schrieb Alex Deucher:
> We did this for gfx6 and 8, but somehow missed gfx7.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

This one is Reviewed-by: Christian König <christian.koenig at amd.com>, the 
rest of the series is Acked-by: Christian König <christian.koenig at amd.com>.

Regards,
Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 3c2b15a5d278..9f520e76f176 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -1819,6 +1819,22 @@ static void gfx_v7_0_setup_rb(struct amdgpu_device *adev)
>   							adev->gfx.config.backend_enable_mask,
>   							num_rb_pipes);
>   	}
> +
> +	/* cache the values for userspace */
> +	for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
> +		for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
> +			gfx_v7_0_select_se_sh(adev, i, j, 0xffffffff);
> +			adev->gfx.config.rb_config[i][j].rb_backend_disable =
> +				RREG32(mmCC_RB_BACKEND_DISABLE);
> +			adev->gfx.config.rb_config[i][j].user_rb_backend_disable =
> +				RREG32(mmGC_USER_RB_BACKEND_DISABLE);
> +			adev->gfx.config.rb_config[i][j].raster_config =
> +				RREG32(mmPA_SC_RASTER_CONFIG);
> +			adev->gfx.config.rb_config[i][j].raster_config_1 =
> +				RREG32(mmPA_SC_RASTER_CONFIG_1);
> +		}
> +	}
> +	gfx_v7_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
>   	mutex_unlock(&adev->grbm_idx_mutex);
>   }
>   




More information about the amd-gfx mailing list