Hi all, On Wed, 3 Jul 2019 17:09:16 -0400 Alex Deucher <[email protected]> wrote: > > On Wed, Jul 3, 2019 at 5:03 PM Kuehling, Felix <[email protected]> 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 <[email protected]> > > >> > > >> 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 <[email protected]> > > >> Reviewed-by: Felix Kuehling <[email protected]> > > >> Signed-off-by: Felix Kuehling <[email protected]> > > >> CC: Stephen Rothwell <[email protected]> > > >> CC: Jason Gunthorpe <[email protected]> > > >> CC: Dave Airlie <[email protected]> > > >> CC: Alex Deucher <[email protected]> > > >> --- > > >> 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.
With the changes added to the amdgpu tree over the weekend, I will apply the following merge fix patch to the hmm merge today: From: Philip Yang <[email protected]> Sibject: drm/amdgpu: adopt to hmm_range_register API change Signed-off-by: Stephen Rothwell <[email protected]> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -783,7 +783,7 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages) 0 : range->flags[HMM_PFN_WRITE]; range->pfn_flags_mask = 0; range->pfns = pfns; - hmm_range_register(range, mm, start, + hmm_range_register(range, mirror, start, start + ttm->num_pages * PAGE_SIZE, PAGE_SHIFT); retry: And someone just needs to make sure Linus is aware of this needed merge fix. -- Cheers, Stephen Rothwell
pgpr9ziZ8P0PA.pgp
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
