All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: RE: [PATCH 18/20] drm/amdgpu:alloc mqd backup
Date: Tue, 7 Feb 2017 16:11:36 +0000	[thread overview]
Message-ID: <BN6PR12MB16524CD9575E536CA02D98EDF7430@BN6PR12MB1652.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1486447878-20521-18-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Tuesday, February 07, 2017 1:11 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 18/20] drm/amdgpu:alloc mqd backup
> 
> Change-Id: I84f821faa657a5d942c33d30f206eb66b579c2f8
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

Please add a better patch description.  E.g., this is required for restoring the mqds after a GPU reset.  With that fixed,
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  1 +
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++++++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index bdb47f7..a801fde 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -781,6 +781,7 @@ struct amdgpu_mec {
>  	u32 num_pipe;
>  	u32 num_mec;
>  	u32 num_queue;
> +	struct vi_mqd	*mqd_backup[AMDGPU_MAX_COMPUTE_RINGS +
> 1];
>  };
> 
>  struct amdgpu_kiq {
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 6734e55..5f688d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -7309,6 +7309,11 @@ static int gfx_v8_0_compute_mqd_soft_init(struct
> amdgpu_device *adev)
>  			dev_warn(adev->dev, "failed to create ring mqd ob
> (%d)", r);
>  			return r;
>  		}
> +
> +		/* prepare MQD backup */
> +		adev-
> >gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS] =
> kmalloc(sizeof(struct vi_mqd), GFP_KERNEL);
> +		if (!adev-
> >gfx.mec.mqd_backup[AMDGPU_MAX_COMPUTE_RINGS])
> +				dev_warn(adev->dev, "no memory to create
> MQD backup for ring %s\n", ring->name);
>  	}
> 
>  	/* create MQD for each KCQ */
> @@ -7323,6 +7328,11 @@ static int gfx_v8_0_compute_mqd_soft_init(struct
> amdgpu_device *adev)
>  				dev_warn(adev->dev, "failed to create ring
> mqd ob (%d)", r);
>  				return r;
>  			}
> +
> +			/* prepare MQD backup */
> +			adev->gfx.mec.mqd_backup[i] =
> kmalloc(sizeof(struct vi_mqd), GFP_KERNEL);
> +			if (!adev->gfx.mec.mqd_backup[i])
> +				dev_warn(adev->dev, "no memory to create
> MQD backup for ring %s\n", ring->name);
>  		}
>  	}
> 
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-02-07 16:11 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  6:10 [PATCH 01/20] drm/amdgpu:fix powerplay logic Monk Liu
     [not found] ` <1486447878-20521-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07  6:11   ` [PATCH 02/20] drm/amdgpu:cg & pg are not applied on VF Monk Liu
     [not found]     ` <1486447878-20521-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:27       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 03/20] drm/damdgpu:add new mqd member in ring Monk Liu
     [not found]     ` <1486447878-20521-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:29       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 04/20] drm/amdgpu:imple mqd soft ini/fini Monk Liu
     [not found]     ` <1486447878-20521-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:30       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 05/20] drm/amdgpu:bo_free_kernel will set ptr to NULL if freed Monk Liu
     [not found]     ` <1486447878-20521-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:31       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 06/20] drm/amdgpu:no need use sriov judge Monk Liu
     [not found]     ` <1486447878-20521-6-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:33       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 07/20] drm/amdgpu:minor cleanup Monk Liu
     [not found]     ` <1486447878-20521-7-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:34       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 08/20] drm/amdgpu:divide KCQ mqd init to sw and hw Monk Liu
     [not found]     ` <1486447878-20521-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:36       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 09/20] drm/amdgpu:implement SRIOV gpu_reset Monk Liu
     [not found]     ` <1486447878-20521-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07  6:26       ` 答复: " Liu, Monk
     [not found]         ` <DM5PR12MB16109EC5F03088C1CFB58FE484430-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 10:49           ` SPAM //答复: " Christian König
     [not found]             ` <5dfe222d-9564-0835-f749-3ea5ef78c701-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 14:57               ` 答复: " Liu, Monk
     [not found]                 ` <DM5PR12MB1610E1ADF3A9172B1A418C7184420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:13                   ` Christian König
     [not found]                     ` <afe8b046-c0ba-586e-99c3-adef380cfd3f-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 15:17                       ` 答复: " Liu, Monk
     [not found]                         ` <DM5PR12MB161095B3EBE0DCC3CEFCBB8A84420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:27                           ` Christian König
     [not found]                             ` <aea90712-dc2f-5bd5-ea8b-52b8688a44c9-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 15:40                               ` 答复: " Liu, Monk
     [not found]                                 ` <DM5PR12MB1610E5F6359C78E0740F428384420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:45                                   ` Liu, Monk
2017-02-07 15:45       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 10/20] drm/amdgpu:change kiq lock name Monk Liu
     [not found]     ` <1486447878-20521-10-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:38       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 11/20] drm/amdgpu:add lock_reset for SRIOV Monk Liu
     [not found]     ` <1486447878-20521-11-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:47       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 12/20] drm/amdgpu:impl mm_r/weg_nokiq Monk Liu
     [not found]     ` <1486447878-20521-12-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:52       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652FE39574BA6067AB64578F7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08  7:30           ` Yu, Xiangliang
2017-02-07  6:11   ` [PATCH 13/20] Refine handshake between guest and host by mailbox Monk Liu
     [not found]     ` <1486447878-20521-13-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:40       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 14/20] drm/amdgpu:use nokiq version mm access Monk Liu
     [not found]     ` <1486447878-20521-14-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:54       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 15/20] drm/amdgpu:use work instead of delay-work Monk Liu
     [not found]     ` <1486447878-20521-15-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:10       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652AA568136314BD28303BFF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08  6:28           ` Yu, Xiangliang
2017-02-08  7:45           ` Liu, Monk
2017-02-07  6:11   ` [PATCH 16/20] drm/amdgpu:RUNTIME flag should clr later Monk Liu
     [not found]     ` <1486447878-20521-16-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:56       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 17/20] drm/amdgpu:new field is_load_stage introduced Monk Liu
     [not found]     ` <1486447878-20521-17-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:08       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 18/20] drm/amdgpu:alloc mqd backup Monk Liu
     [not found]     ` <1486447878-20521-18-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:11       ` Deucher, Alexander [this message]
2017-02-07  6:11   ` [PATCH 19/20] drm/amdgpu:use nop to clear ring buffer Monk Liu
     [not found]     ` <1486447878-20521-19-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:10       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 20/20] drm/amdgpu:fix kiq_resume routine Monk Liu
     [not found]     ` <1486447878-20521-20-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:09       ` Deucher, Alexander
2017-02-07 15:27   ` [PATCH 01/20] drm/amdgpu:fix powerplay logic Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR12MB16524CD9575E536CA02D98EDF7430@BN6PR12MB1652.namprd12.prod.outlook.com \
    --to=alexander.deucher-5c7gfcevmho@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.