dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag
@ 2023-06-14 12:35 Sumitra Sharma
  2023-06-14 13:22 ` Tvrtko Ursulin
  0 siblings, 1 reply; 4+ messages in thread
From: Sumitra Sharma @ 2023-06-14 12:35 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Daniel Vetter, intel-gfx, dri-devel, linux-kernel
  Cc: Deepak R Varma, Fabio, Ira Weiny, Sumitra Sharma

Pages allocated with GFP_KERNEL cannot come from Highmem.
That is why there is no need to call kmap() on them.

Therefore, don't call kmap() on the page coming from
vma_res->bi.pages using for_each_sgt_page() in
i915_vma_coredump_create().

Use a plain page_address() to get the kernel address instead.

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index f020c0086fbc..6f51cb4fc55c 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1164,9 +1164,8 @@ i915_vma_coredump_create(const struct intel_gt *gt,
 
 			drm_clflush_pages(&page, 1);
 
-			s = kmap(page);
+			s = page_address(page);
 			ret = compress_page(compress, s, dst, false);
-			kunmap(page);
 
 			drm_clflush_pages(&page, 1);
 
-- 
2.25.1


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

end of thread, other threads:[~2023-06-18  8:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 12:35 [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag Sumitra Sharma
2023-06-14 13:22 ` Tvrtko Ursulin
2023-06-14 15:30   ` [Intel-gfx] " Thomas Hellström (Intel)
2023-06-17 18:26     ` Sumitra Sharma

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