dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.william.auld@gmail.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 11/13] drm/nouveau: switch the TTM backends to self alloc
Date: Wed, 5 May 2021 17:46:58 +0100	[thread overview]
Message-ID: <CAM0jSHOYHsnEah5Xd=Ui=zND4Yu3vwnHrcTqheXnxVh5uiS7YA@mail.gmail.com> (raw)
In-Reply-To: <b16ba144-4553-5cf0-67ad-602a411e514a@gmail.com>

On Mon, 3 May 2021 at 12:14, Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> Am 30.04.21 um 17:02 schrieb Matthew Auld:
> > On Fri, 30 Apr 2021 at 10:25, Christian König
> > <ckoenig.leichtzumerken@gmail.com> wrote:
> >> Similar to the TTM range manager.
> >>
> >> Signed-off-by: Christian König <christian.koenig@amd.com>
> >> ---
> >>   drivers/gpu/drm/nouveau/nouveau_mem.h | 1 +
> >>   drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ++++
> >>   2 files changed, 5 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.h b/drivers/gpu/drm/nouveau/nouveau_mem.h
> >> index 7df3848e85aa..3a6a1be2ed52 100644
> >> --- a/drivers/gpu/drm/nouveau/nouveau_mem.h
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_mem.h
> >> @@ -13,6 +13,7 @@ nouveau_mem(struct ttm_resource *reg)
> >>   }
> >>
> >>   struct nouveau_mem {
> >> +       struct ttm_resource base;
> >>          struct nouveau_cli *cli;
> >>          u8 kind;
> >>          u8 comp;
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
> >> index 15c7627f8f58..5e5ce2ec89f0 100644
> >> --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
> >> @@ -59,6 +59,8 @@ nouveau_vram_manager_new(struct ttm_resource_manager *man,
> >>          if (ret)
> >>                  return ret;
> >>
> >> +       ttm_resource_init(bo, place, reg->mm_node);
> >> +
> > What happened here? I assume this needs to be nouveau_mem.base not the mm_node?
>
> Same like the other backends I'm first changing the allocation so that
> we allocate ttm_resource and the private housekeeping together and then
> flip the switch in the last patch.
>
> So reg->mm_node is temporary pointing to the ttm_resource object until
> it is removed in the last patch.

Ok, makes sense,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

>
> Christian.
>
> >
> >>          ret = nouveau_mem_vram(reg, nvbo->contig, nvbo->page);
> >>          if (ret) {
> >>                  nouveau_mem_del(reg);
> >> @@ -87,6 +89,7 @@ nouveau_gart_manager_new(struct ttm_resource_manager *man,
> >>          if (ret)
> >>                  return ret;
> >>
> >> +       ttm_resource_init(bo, place, reg->mm_node);
> >>          reg->start = 0;
> >>          return 0;
> >>   }
> >> @@ -112,6 +115,7 @@ nv04_gart_manager_new(struct ttm_resource_manager *man,
> >>          if (ret)
> >>                  return ret;
> >>
> >> +       ttm_resource_init(bo, place, reg->mm_node);
> >>          ret = nvif_vmm_get(&mem->cli->vmm.vmm, PTES, false, 12, 0,
> >>                             (long)reg->num_pages << PAGE_SHIFT, &mem->vma[0]);
> >>          if (ret) {
> >> --
> >> 2.25.1
> >>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-05-05 16:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  9:24 [PATCH 01/13] drm/ttm: add ttm_sys_manager v2 Christian König
2021-04-30  9:24 ` [PATCH 02/13] drm/ttm: always initialize the full ttm_resource Christian König
2021-04-30 12:05   ` Matthew Auld
2021-04-30 12:51     ` Christian König
2021-04-30  9:24 ` [PATCH 03/13] drm/ttm: properly allocate sys resource during swapout Christian König
2021-04-30 10:22   ` Matthew Auld
2021-04-30  9:24 ` [PATCH 04/13] drm/ttm: rename bo->mem and make it a pointer Christian König
2021-04-30  9:25 ` [PATCH 05/13] drm/ttm: allocate resource object instead of embedding it Christian König
2021-04-30 11:19   ` Matthew Auld
2021-04-30  9:25 ` [PATCH 06/13] drm/ttm: flip over the range manager to self allocated nodes Christian König
2021-04-30 13:14   ` Matthew Auld
2021-05-29 15:48   ` Thomas Hellström (Intel)
2021-05-30 16:51     ` Christian König
2021-05-31  8:56       ` Thomas Hellström (Intel)
2021-04-30  9:25 ` [PATCH 07/13] drm/ttm: flip over the sys " Christian König
2021-04-30 13:16   ` Matthew Auld
2021-04-30 15:04   ` Matthew Auld
2021-05-03 11:08     ` Christian König
2021-04-30  9:25 ` [PATCH 08/13] drm/amdgpu: revert "drm/amdgpu: stop allocating dummy GTT nodes" Christian König
2021-05-05 16:48   ` Matthew Auld
2021-04-30  9:25 ` [PATCH 09/13] drm/amdgpu: switch the GTT backend to self alloc Christian König
2021-04-30 14:43   ` Matthew Auld
2021-04-30  9:25 ` [PATCH 10/13] drm/amdgpu: switch the VRAM " Christian König
2021-04-30 14:53   ` Matthew Auld
2021-04-30  9:25 ` [PATCH 11/13] drm/nouveau: switch the TTM backends " Christian König
2021-04-30 15:02   ` Matthew Auld
2021-05-03 11:14     ` Christian König
2021-05-05 16:46       ` Matthew Auld [this message]
2021-04-30  9:25 ` [PATCH 12/13] drm/vmwgfx: " Christian König
2021-05-05 16:49   ` Matthew Auld
2021-04-30  9:25 ` [PATCH 13/13] drm/ttm: flip the switch for driver allocated resources Christian König
2021-05-03 16:15   ` Nirmoy
2021-05-05 16:44   ` Matthew Auld
2021-04-30 10:09 ` [PATCH 01/13] drm/ttm: add ttm_sys_manager v2 Matthew Auld

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='CAM0jSHOYHsnEah5Xd=Ui=zND4Yu3vwnHrcTqheXnxVh5uiS7YA@mail.gmail.com' \
    --to=matthew.william.auld@gmail.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).