[PATCH 2/2] drm/amdgpu: Clear active for HIQ in RLC_CP_SCHEDULER

Felix Kuehling felix.kuehling at amd.com
Wed Jul 19 21:55:24 UTC 2017


The series is Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>


On 17-07-19 05:16 PM, Shaoyun Liu wrote:
> Change-Id: I780e276983ba5a3bf077d274c84eb168585c806a
> Signed-off-by: Shaoyun Liu <Shaoyun.Liu at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 4 ++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 5 +++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> index cb41b54..87f766e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
> @@ -619,9 +619,13 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, void *mqd,
>  	enum hqd_dequeue_request_type type;
>  	unsigned long flags, end_jiffies;
>  	int retry;
> +	struct vi_mqd *m = get_mqd(mqd);
>  
>  	acquire_queue(kgd, pipe_id, queue_id);
>  
> +	if (m->cp_hqd_vmid == 0)
> +		WREG32_FIELD(RLC_CP_SCHEDULERS, scheduler1, 0);
> +
>  	switch (reset_type) {
>  	case KFD_PREEMPT_TYPE_WAVEFRONT_DRAIN:
>  		type = DRAIN_PIPE;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> index 2f36d11..4170dd8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
> @@ -755,6 +755,8 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, void *mqd,
>  	enum hqd_dequeue_request_type type;
>  	unsigned long end_jiffies;
>  	uint32_t temp;
> +	struct v9_mqd *m = get_mqd(mqd);
> +
>  #if 0
>  	unsigned long flags;
>  	int retry;
> @@ -762,6 +764,9 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, void *mqd,
>  
>  	acquire_queue(kgd, pipe_id, queue_id);
>  
> +	if (m->cp_hqd_vmid == 0)
> +		WREG32_FIELD15(GC, 0, RLC_CP_SCHEDULERS, scheduler1, 0);
> +
>  	switch (reset_type) {
>  	case KFD_PREEMPT_TYPE_WAVEFRONT_DRAIN:
>  		type = DRAIN_PIPE;



More information about the amd-gfx mailing list