---
name: "drm_prime_pages_to_sg"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drm_prime_pages_to_sg"
---

# drm\_prime\_pages\_to\_sg(9)

converts a page array into an sg list

## NAME

drm\_prime\_pages\_to\_sg - converts a page array into an sg list

## SYNOPSIS

**struct sg\_table \* drm\_prime\_pages\_to\_sg(struct page \*\*** *pages***, int** *nr\_pages***);**

## ARGUMENTS

*pages*

pointer to the array of page pointers to convert

*nr\_pages*

length of the page vector

## DESCRIPTION

This helper creates an sg table object from a set of pages the driver is responsible for mapping the pages into the importers address space for use with dma\_buf itself.

## AUTHORS

**Jesse Barnes** \<jesse.barnes@intel.com\>\
 Intel Corporation,

Initial version

**Laurent Pinchart** \<laurent.pinchart@ideasonboard.com\>\
 Ideas on board SPRL,

Driver internals

**Daniel Vetter** \<daniel.vetter@ffwll.ch\>\
 Intel Corporation,

Contributions all over the place

## COPYRIGHT
