All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Koenig, Christian" <Christian.Koenig@amd.com>
Cc: Mikko Perttunen <cyndis@kapsi.fi>,
	"imirkin@alum.mit.edu" <imirkin@alum.mit.edu>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"matthew.auld@intel.com" <matthew.auld@intel.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/nouveau: init the base GEM fields for internal BOs
Date: Thu, 10 Jun 2021 17:43:32 +0800	[thread overview]
Message-ID: <20210610094332.GA4134750@hr-amd> (raw)
In-Reply-To: <b0a257a6-af87-c443-0eed-0f3081169482@amd.com>

On Thu, Jun 10, 2021 at 04:08:40PM +0800, Koenig, Christian wrote:
> 
> 
> Am 09.06.21 um 19:45 schrieb Mikko Perttunen:
> > On 6/9/21 8:29 PM, Christian König wrote:
> >> TTMs buffer objects are based on GEM objects for quite a while
> >> and rely on initializing those fields before initializing the TTM BO.
> >>
> >> Noveau now doesn't init the GEM object for internally allocated BOs,
> >
> > Nouveau
> >
> >> so make sure that we at least initialize some necessary fields.
> >>
> >> Signed-off-by: Christian König <christian.koenig@amd.com>
> >> ---
> >>   drivers/gpu/drm/nouveau/nouveau_bo.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c 
> >> b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> index 520b1ea9d16c..085023624fb0 100644
> >> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> @@ -149,6 +149,8 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
> >>        */
> >>       if (bo->base.dev)
> >>           drm_gem_object_release(&bo->base);
> >> +    else
> >> +        dma_resv_fini(&bo->base._resv);
> >>         kfree(nvbo);
> >>   }
> >> @@ -330,6 +332,10 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 
> >> size, int align,
> >>       if (IS_ERR(nvbo))
> >>           return PTR_ERR(nvbo);
> >>   +    nvbo->bo.base.size = size;
> >> +    dma_resv_init(&nvbo->bo.base._resv);
> >> +    drm_vma_node_reset(&nvbo->bo.base.vma_node);
> >> +
> >>       ret = nouveau_bo_init(nvbo, size, align, domain, sg, robj);
> >>       if (ret)
> >>           return ret;
> >>
> >
> > That works, thanks for the fix!
> >
> > Tested-by: Mikko Perttunen <mperttunen@nvidia.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> 
> Thanks. Can anybody give me an rb that I can push this to drm-misc-next 
> before the weekend?
> 
> Regards,
> Christian.
> 
> >
> > Mikko
> 

WARNING: multiple messages have this Message-ID (diff)
From: Huang Rui <ray.huang@amd.com>
To: "Koenig, Christian" <Christian.Koenig@amd.com>
Cc: "nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"matthew.auld@intel.com" <matthew.auld@intel.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [Nouveau] [PATCH] drm/nouveau: init the base GEM fields for internal BOs
Date: Thu, 10 Jun 2021 17:43:32 +0800	[thread overview]
Message-ID: <20210610094332.GA4134750@hr-amd> (raw)
In-Reply-To: <b0a257a6-af87-c443-0eed-0f3081169482@amd.com>

On Thu, Jun 10, 2021 at 04:08:40PM +0800, Koenig, Christian wrote:
> 
> 
> Am 09.06.21 um 19:45 schrieb Mikko Perttunen:
> > On 6/9/21 8:29 PM, Christian König wrote:
> >> TTMs buffer objects are based on GEM objects for quite a while
> >> and rely on initializing those fields before initializing the TTM BO.
> >>
> >> Noveau now doesn't init the GEM object for internally allocated BOs,
> >
> > Nouveau
> >
> >> so make sure that we at least initialize some necessary fields.
> >>
> >> Signed-off-by: Christian König <christian.koenig@amd.com>
> >> ---
> >>   drivers/gpu/drm/nouveau/nouveau_bo.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c 
> >> b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> index 520b1ea9d16c..085023624fb0 100644
> >> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> @@ -149,6 +149,8 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
> >>        */
> >>       if (bo->base.dev)
> >>           drm_gem_object_release(&bo->base);
> >> +    else
> >> +        dma_resv_fini(&bo->base._resv);
> >>         kfree(nvbo);
> >>   }
> >> @@ -330,6 +332,10 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 
> >> size, int align,
> >>       if (IS_ERR(nvbo))
> >>           return PTR_ERR(nvbo);
> >>   +    nvbo->bo.base.size = size;
> >> +    dma_resv_init(&nvbo->bo.base._resv);
> >> +    drm_vma_node_reset(&nvbo->bo.base.vma_node);
> >> +
> >>       ret = nouveau_bo_init(nvbo, size, align, domain, sg, robj);
> >>       if (ret)
> >>           return ret;
> >>
> >
> > That works, thanks for the fix!
> >
> > Tested-by: Mikko Perttunen <mperttunen@nvidia.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> 
> Thanks. Can anybody give me an rb that I can push this to drm-misc-next 
> before the weekend?
> 
> Regards,
> Christian.
> 
> >
> > Mikko
> 
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

WARNING: multiple messages have this Message-ID (diff)
From: Huang Rui <ray.huang@amd.com>
To: "Koenig, Christian" <Christian.Koenig@amd.com>
Cc: Mikko Perttunen <cyndis@kapsi.fi>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"matthew.auld@intel.com" <matthew.auld@intel.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau: init the base GEM fields for internal BOs
Date: Thu, 10 Jun 2021 17:43:32 +0800	[thread overview]
Message-ID: <20210610094332.GA4134750@hr-amd> (raw)
In-Reply-To: <b0a257a6-af87-c443-0eed-0f3081169482@amd.com>

On Thu, Jun 10, 2021 at 04:08:40PM +0800, Koenig, Christian wrote:
> 
> 
> Am 09.06.21 um 19:45 schrieb Mikko Perttunen:
> > On 6/9/21 8:29 PM, Christian König wrote:
> >> TTMs buffer objects are based on GEM objects for quite a while
> >> and rely on initializing those fields before initializing the TTM BO.
> >>
> >> Noveau now doesn't init the GEM object for internally allocated BOs,
> >
> > Nouveau
> >
> >> so make sure that we at least initialize some necessary fields.
> >>
> >> Signed-off-by: Christian König <christian.koenig@amd.com>
> >> ---
> >>   drivers/gpu/drm/nouveau/nouveau_bo.c | 6 ++++++
> >>   1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c 
> >> b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> index 520b1ea9d16c..085023624fb0 100644
> >> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> >> @@ -149,6 +149,8 @@ nouveau_bo_del_ttm(struct ttm_buffer_object *bo)
> >>        */
> >>       if (bo->base.dev)
> >>           drm_gem_object_release(&bo->base);
> >> +    else
> >> +        dma_resv_fini(&bo->base._resv);
> >>         kfree(nvbo);
> >>   }
> >> @@ -330,6 +332,10 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 
> >> size, int align,
> >>       if (IS_ERR(nvbo))
> >>           return PTR_ERR(nvbo);
> >>   +    nvbo->bo.base.size = size;
> >> +    dma_resv_init(&nvbo->bo.base._resv);
> >> +    drm_vma_node_reset(&nvbo->bo.base.vma_node);
> >> +
> >>       ret = nouveau_bo_init(nvbo, size, align, domain, sg, robj);
> >>       if (ret)
> >>           return ret;
> >>
> >
> > That works, thanks for the fix!
> >
> > Tested-by: Mikko Perttunen <mperttunen@nvidia.com>

Reviewed-by: Huang Rui <ray.huang@amd.com>

> 
> Thanks. Can anybody give me an rb that I can push this to drm-misc-next 
> before the weekend?
> 
> Regards,
> Christian.
> 
> >
> > Mikko
> 

  reply	other threads:[~2021-06-10  9:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 17:29 [PATCH] drm/nouveau: init the base GEM fields for internal BOs Christian König
2021-06-09 17:29 ` [Nouveau] " Christian König
2021-06-09 17:45 ` Mikko Perttunen
2021-06-09 17:45   ` [Nouveau] " Mikko Perttunen
2021-06-10  8:08   ` Christian König
2021-06-10  8:08     ` [Nouveau] " Christian König
2021-06-10  9:43     ` Huang Rui [this message]
2021-06-10  9:43       ` Huang Rui
2021-06-10  9:43       ` [Nouveau] " Huang Rui
2021-06-10  9:20 ` Matthew Auld
2021-06-10  9:20   ` Matthew Auld
2021-06-10  9:20   ` [Nouveau] " 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=20210610094332.GA4134750@hr-amd \
    --to=ray.huang@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=cyndis@kapsi.fi \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=nouveau@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 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.