linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Kuehling, Felix" <Felix.Kuehling@amd.com>
Cc: Jason Gunthorpe <jgg@mellanox.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	 "Yang, Philip" <Philip.Yang@amd.com>,
	Dave Airlie <airlied@linux.ie>,
	 "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	 "linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	 "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 1/1] drm/amdgpu: adopt to hmm_range_register API change
Date: Wed, 3 Jul 2019 17:09:16 -0400	[thread overview]
Message-ID: <CADnq5_M0GREGG73wiu3eb=E+G2iTRmjXELh7m69BRJfVNEiHtw@mail.gmail.com> (raw)
In-Reply-To: <a9764210-9401-471b-96a7-b93606008d07@amd.com>

On Wed, Jul 3, 2019 at 5:03 PM Kuehling, Felix <Felix.Kuehling@amd.com> wrote:
>
> On 2019-07-03 10:10 a.m., Jason Gunthorpe wrote:
> > On Wed, Jul 03, 2019 at 01:55:08AM +0000, Kuehling, Felix wrote:
> >> From: Philip Yang <Philip.Yang@amd.com>
> >>
> >> In order to pass mirror instead of mm to hmm_range_register, we need
> >> pass bo instead of ttm to amdgpu_ttm_tt_get_user_pages because mirror
> >> is part of amdgpu_mn structure, which is accessible from bo.
> >>
> >> Signed-off-by: Philip Yang <Philip.Yang@amd.com>
> >> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> >> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> >> CC: Stephen Rothwell <sfr@canb.auug.org.au>
> >> CC: Jason Gunthorpe <jgg@mellanox.com>
> >> CC: Dave Airlie <airlied@linux.ie>
> >> CC: Alex Deucher <alexander.deucher@amd.com>
> >> ---
> >>   drivers/gpu/drm/Kconfig                          |  1 -
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c |  5 ++---
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c           |  2 +-
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c          |  3 +--
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c           |  8 ++++++++
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h           |  5 +++++
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c          | 12 ++++++++++--
> >>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h          |  5 +++--
> >>   8 files changed, 30 insertions(+), 11 deletions(-)
> > This is too big to use as a conflict resolution, what you could do is
> > apply the majority of the patch on top of your tree as-is (ie keep
> > using the old hmm_range_register), then the conflict resolution for
> > the updated AMD GPU tree can be a simple one line change:
> >
> >   -   hmm_range_register(range, mm, start,
> >   +   hmm_range_register(range, mirror, start,
> >                          start + ttm->num_pages * PAGE_SIZE, PAGE_SHIFT);
> >
> > Which is trivial for everone to deal with, and solves the problem.
>
> Good idea.
>
>
> >
> > This is probably a much better option than rebasing the AMD gpu tree.
>
> I think Alex is planning to merge hmm.git into an updated drm-next and
> then rebase amd-staging-drm-next on top of that. Rebasing our
> amd-staging-drm-next is something we do every month or two anyway.
>

Go ahead and respin your patch as per the suggestion above.  then I
can apply it I can either merge hmm into amd's drm-next or we can just
provide the conflict fix patch whichever is easier.  Which hmm branch
is for 5.3?
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/?h=hmm


>
> >
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> >> index 623f56a1485f..80e40898a507 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> >> @@ -398,6 +398,14 @@ struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev,
> >>      return ERR_PTR(r);
> >>   }
> >>
> >> +struct hmm_mirror *amdgpu_mn_get_mirror(struct amdgpu_mn *amn)
> >> +{
> >> +    if (!amn)
> >> +            return NULL;
> >> +
> >> +    return &amn->mirror;
> >> +}
> > I think it is better make the struct amdgpu_mn public rather than add
> > this wrapper.
>
> Sure. I can do that. It won't make the patch smaller, though, if that
> was your intention.
>
> It looks like Stephen already applied my patch as a conflict resolution
> on linux-next, though. I see linux-next/master is getting updated
> non-fast-forward. So is the idea that its history will updated again
> with the final resolution on drm-next or drm-fixes?
>

linux-next can deal with rebases, etc.  If the contributing trees
rebase or change, linux-next will update.

Alex

> Regards,
>    Felix
>
> >
> > Jason
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


  reply	other threads:[~2019-07-03 21:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  1:55 [PATCH 1/1] drm/amdgpu: adopt to hmm_range_register API change Kuehling, Felix
2019-07-03  4:54 ` Stephen Rothwell
2019-07-03  8:30   ` Stephen Rothwell
2019-07-03 14:10 ` Jason Gunthorpe
2019-07-03 21:03   ` Kuehling, Felix
2019-07-03 21:09     ` Alex Deucher [this message]
2019-07-03 21:32       ` Stephen Rothwell
2019-07-03 23:11         ` Dave Airlie
2019-07-04  2:00           ` Jason Gunthorpe
2019-07-04  2:01       ` Jason Gunthorpe
2019-07-07 23:30       ` Stephen Rothwell
2019-07-08 14:09         ` Jason Gunthorpe
2019-07-08 15:26         ` Kuehling, Felix
2019-07-08 15:35           ` Stephen Rothwell
2019-07-03 21:33     ` Stephen Rothwell

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='CADnq5_M0GREGG73wiu3eb=E+G2iTRmjXELh7m69BRJfVNEiHtw@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Philip.Yang@amd.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@mellanox.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).