drm_pagemap_...rivate_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 drm_pagemap_...rivate_pages(9) 🌸

ok so bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for drm_pagemap_migrate_map_device_private_pages, and yes the title is literally truncated like that, that's not me being lazy, that's just how the page is named πŸ’…


✨ NAME ✨

drm_pagemap_migrate_map_device_private_pages β€” maps device private migration pages for GPU SVM migration πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

int drm_pagemap_migrate_map_device_private_pages (struct device *dev ,
struct drm_pagemap *local_dpagemap , struct drm_pagemap_addr
*pagemap_addr , unsigned long *migrate_pfn , unsigned long npages , enum
dma_data_direction dir , const struct drm_pagemap_migrate_details
*mdetails );

πŸ’– ARGUMENTS πŸ’–

  • dev β€” the device that's doing the migrating. main character of the operation tbh.
  • local_dpagemap β€” the drm_pagemap that's local to the migrating device. iykyk.
  • pagemap_addr β€” array where the DMA info for the mapped pages gets stored.
  • migrate_pfn β€” array of page frame numbers of system pages or peer pages to map.
  • npages β€” how many system pages or peer pages to map.
  • dir β€” direction of the data transfer (e.g., DMA_BIDIRECTIONAL).
  • mdetails β€” the details governing the migration behaviour. the vibe check for the migration, fr.

🌈 DESCRIPTION 🌈

okay so here's the tea β˜• β€” this function maps pages of memory for migration usage in GPU SVM.

It literally iterates over each page frame number you hand it in migrate_pfn, maps the corresponding page, and stores the DMA address in the provided dma_addr array. That's it, that's the whole job, and it ate. πŸ”₯


πŸ‘‘ RETURN πŸ‘‘

  • 0 on success πŸ’š
  • -EFAULT if an error occurs during mapping 😭

🫢 SEE ALSO 🫢

Kernel file ./drivers/gpu/drm/drm_pagemap.c β€” and the whole extended fam:


and that's the whole page babes πŸŽ€ this one lives in ./drivers/gpu/drm, dated October 2026, and it'll answer to the name drm_pagemap_...rivate_pages(9) whenever you call it. slay, go map some pages, ily, bye πŸ’œβœ¨

πŸ“¦ where this page comes from