linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ensure alignment on CPU page for bo mapping
@ 2021-03-30 15:33 Xℹ Ruoyao
  2021-03-30 15:33 ` [PATCH 1/2] drm/amdgpu: Set a suitable dev_info.gart_page_size Xℹ Ruoyao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xℹ Ruoyao @ 2021-03-30 15:33 UTC (permalink / raw)
  To: amd-gfx
  Cc: dri-devel, linux-kernel, Christian König, Huacai Chen,
	Dan Horák, Alex Deucher, David Airlie, Xℹ Ruoyao

In AMDGPU driver, the bo mapping should always align to CPU page or
the page table is corrupted.

The first patch is cherry-picked from Loongson community, which sets a
suitable dev_info.gart_page_size so Mesa will handle the alignment
correctly.

The second patch is added to ensure an ioctl with unaligned parameter to
be rejected -EINVAL, instead of causing page table corruption.

The patches should be applied for drm-next.

Huacai Chen (1):
  drm/amdgpu: Set a suitable dev_info.gart_page_size

Xℹ Ruoyao (1):
  drm/amdgpu: check alignment on CPU page for bo map

 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)


base-commit: a0c8b193bfe81cc8e9c7c162bb8d777ba12596f0
-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-31  2:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 15:33 [PATCH 0/2] ensure alignment on CPU page for bo mapping Xℹ Ruoyao
2021-03-30 15:33 ` [PATCH 1/2] drm/amdgpu: Set a suitable dev_info.gart_page_size Xℹ Ruoyao
2021-03-30 15:33 ` [PATCH 2/2] drm/amdgpu: check alignment on CPU page for bo map Xℹ Ruoyao
2021-03-30 16:21 ` [PATCH 0/2] ensure alignment on CPU page for bo mapping Christian König
2021-03-31  2:05   ` Alex Deucher

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).