drm/amdkfd: Initialize sdma vm when creating sdma queue
diff mbox

Message ID 1430815241-22650-1-git-send-email-oded.gabbay@gmail.com
State New
Headers show

Commit Message

Oded Gabbay May 5, 2015, 8:40 a.m. UTC
From: Xihan Zhang <xihan.zhang@amd.com>

This patch fixes a bug where sdma vm wasn't initialized when
an sdma queue was created in HWS mode.

This caused GPUVM faults to appear on dmesg and it is one of the
causes that SDMA queues are not working.

Signed-off-by: Xihan Zhang <xihan.zhang@amd.com>
Reviewed-by: Ben Goz <ben.goz@amd.comt>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alex Deucher May 5, 2015, 4:22 p.m. UTC | #1
On Tue, May 5, 2015 at 4:40 AM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> From: Xihan Zhang <xihan.zhang@amd.com>
>
> This patch fixes a bug where sdma vm wasn't initialized when
> an sdma queue was created in HWS mode.
>
> This caused GPUVM faults to appear on dmesg and it is one of the
> causes that SDMA queues are not working.
>
> Signed-off-by: Xihan Zhang <xihan.zhang@amd.com>
> Reviewed-by: Ben Goz <ben.goz@amd.comt>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index 7b1d510..596ee5c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -883,6 +883,8 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
>                 return -ENOMEM;
>         }
>
> +       init_sdma_vm(dqm, q, qpd);
> +
>         retval = mqd->init_mqd(mqd, &q->mqd, &q->mqd_mem_obj,
>                                 &q->gart_mqd_addr, &q->properties);
>         if (retval != 0)
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch
diff mbox

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 7b1d510..596ee5c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -883,6 +883,8 @@  static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
 		return -ENOMEM;
 	}
 
+	init_sdma_vm(dqm, q, qpd);
+
 	retval = mqd->init_mqd(mqd, &q->mqd, &q->mqd_mem_obj,
 				&q->gart_mqd_addr, &q->properties);
 	if (retval != 0)