All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
	<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>,
	"Yu, Xiangliang" <Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: 答复: [PATCH 1/3] drm/amdgpu: change pointer of mqd_ptr to void
Date: Thu, 16 Feb 2017 10:37:46 +0000	[thread overview]
Message-ID: <DM5PR12MB161073A11C9BA6C48E5AD116845A0@DM5PR12MB1610.namprd12.prod.outlook.com> (raw)
In-Reply-To: <220014f3-9d36-95e8-58cf-f504c0a0588a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 6206 bytes --]

Xiangliang


good cleanup, but there are more, please help proceed them all:


struct amdgpu_mec {
    struct amdgpu_bo    *hpd_eop_obj;
    u64            hpd_eop_gpu_addr;
    u32 num_pipe;
    u32 num_mec;
    u32 num_queue;
    struct vi_mqd    *mqd_backup[AMDGPU_MAX_COMPUTE_RINGS + 1];
};

change:
struct vi_mqd    *mqd_backup[AMDGPU_MAX_COMPUTE_RINGS + 1];
to:
void   *mqd_backup[AMDGPU_MAX_COMPUTE_RINGS + 1];


thanks


with above address,
Reviewed-by: Monk Liu <monk.liu@amd.com>

other two patches:
Reviewed-by: Monk Liu <monk.liu@amd.com>

BR Monk


________________________________
发件人: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Christian König <deathsimple@vodafone.de>
发送时间: 2017年2月16日 17:16:15
收件人: Yu, Xiangliang; amd-gfx@lists.freedesktop.org
主题: Re: [PATCH 1/3] drm/amdgpu: change pointer of mqd_ptr to void

Am 16.02.2017 um 08:25 schrieb Xiangliang Yu:
> vi_mqd is only used by VI family but mqd_ptr is common for all
> ASIC, so change the pointer to void.
>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

Nice cleanup, patch is Reviewed-by: Christian König
<christian.koenig@amd.com>.

Patch #2 and #3 are Acked-by: Christian König <christian.koenig@amd.com>.

Regards,
Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h |  2 +-
>   drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c    | 26 +++++++++++++++++---------
>   2 files changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index 3fd4ce8..a1bfc4e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -162,7 +162,7 @@ struct amdgpu_ring {
>        u32                     queue;
>        struct amdgpu_bo        *mqd_obj;
>        uint64_t                mqd_gpu_addr;
> -     struct vi_mqd           *mqd_ptr;
> +     void                    *mqd_ptr;
>        u32                     doorbell_index;
>        bool                    use_doorbell;
>        unsigned                wptr_offs;
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 772c42b..2202f02 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -4940,8 +4940,10 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)
>        gfx_v8_0_cp_compute_enable(adev, true);
>
>        ring = &adev->gfx.kiq.ring;
> -     if (!amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr)) {
> -             r = gfx_v8_0_kiq_init_queue(ring, ring->mqd_ptr, ring->mqd_gpu_addr);
> +     if (!amdgpu_bo_kmap(ring->mqd_obj, &ring->mqd_ptr)) {
> +             r = gfx_v8_0_kiq_init_queue(ring,
> +                                         (struct vi_mqd *)ring->mqd_ptr,
> +                                         ring->mqd_gpu_addr);
>                amdgpu_bo_kunmap(ring->mqd_obj);
>                ring->mqd_ptr = NULL;
>                if (r)
> @@ -4952,8 +4954,10 @@ static int gfx_v8_0_kiq_resume(struct amdgpu_device *adev)
>
>        for (i = 0; i < adev->gfx.num_compute_rings; i++) {
>                ring = &adev->gfx.compute_ring[i];
> -             if (!amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr)) {
> -                     r = gfx_v8_0_kiq_init_queue(ring, ring->mqd_ptr, ring->mqd_gpu_addr);
> +             if (!amdgpu_bo_kmap(ring->mqd_obj, &ring->mqd_ptr)) {
> +                     r = gfx_v8_0_kiq_init_queue(ring,
> +                                                 (struct vi_mqd *)ring->mqd_ptr,
> +                                                 ring->mqd_gpu_addr);
>                        amdgpu_bo_kunmap(ring->mqd_obj);
>                        ring->mqd_ptr = NULL;
>                        if (r)
> @@ -7333,7 +7337,7 @@ static int gfx_v8_0_compute_mqd_soft_init(struct amdgpu_device *adev)
>        if (!ring->mqd_obj) {
>                r = amdgpu_bo_create_kernel(adev, sizeof(struct vi_mqd), PAGE_SIZE,
>                                                AMDGPU_GEM_DOMAIN_GTT, &ring->mqd_obj,
> -                                             &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr);
> +                                             &ring->mqd_gpu_addr, &ring->mqd_ptr);
>                if (r) {
>                        dev_warn(adev->dev, "failed to create ring mqd ob (%d)", r);
>                        return r;
> @@ -7352,7 +7356,7 @@ static int gfx_v8_0_compute_mqd_soft_init(struct amdgpu_device *adev)
>                if (!ring->mqd_obj) {
>                        r = amdgpu_bo_create_kernel(adev, sizeof(struct vi_mqd), PAGE_SIZE,
>                                                        AMDGPU_GEM_DOMAIN_GTT, &ring->mqd_obj,
> -                                                     &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr);
> +                                                     &ring->mqd_gpu_addr, &ring->mqd_ptr);
>                        if (r) {
>                                dev_warn(adev->dev, "failed to create ring mqd ob (%d)", r);
>                                return r;
> @@ -7375,9 +7379,13 @@ static void gfx_v8_0_compute_mqd_soft_fini(struct amdgpu_device *adev)
>
>        for (i = 0; i < adev->gfx.num_compute_rings; i++) {
>                ring = &adev->gfx.compute_ring[i];
> -             amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr);
> +             amdgpu_bo_free_kernel(&ring->mqd_obj,
> +                                   &ring->mqd_gpu_addr,
> +                                   &ring->mqd_ptr);
>        }
>
>        ring = &adev->gfx.kiq.ring;
> -     amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, (void **)&ring->mqd_ptr);
> -}
> \ No newline at end of file
> +     amdgpu_bo_free_kernel(&ring->mqd_obj,
> +                           &ring->mqd_gpu_addr,
> +                           &ring->mqd_ptr);
> +}


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[-- Attachment #1.2: Type: text/html, Size: 15371 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2017-02-16 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16  7:25 [PATCH 1/3] drm/amdgpu: change pointer of mqd_ptr to void Xiangliang Yu
     [not found] ` <1487229920-4897-1-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2017-02-16  7:25   ` [PATCH 2/3] drm/amdgpu/virt: fix typo Xiangliang Yu
2017-02-16  7:25   ` [PATCH 3/3] drm/amdgpu/gfx: free memory of mqd backup Xiangliang Yu
     [not found]     ` <1487229920-4897-3-git-send-email-Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org>
2017-02-16 14:57       ` Deucher, Alexander
2017-02-16  9:16   ` [PATCH 1/3] drm/amdgpu: change pointer of mqd_ptr to void Christian König
     [not found]     ` <220014f3-9d36-95e8-58cf-f504c0a0588a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-16 10:37       ` Liu, Monk [this message]

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=DM5PR12MB161073A11C9BA6C48E5AD116845A0@DM5PR12MB1610.namprd12.prod.outlook.com \
    --to=monk.liu-5c7gfcevmho@public.gmane.org \
    --cc=Xiangliang.Yu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@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.