History log of /netbsd-current/sys/external/bsd/drm2/dist/drm/drm_prime.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 06-Jul-2022 riastradh

uvm(9): fo_mmap caller guarantees positive size.

No functional change intended, just sprinkling assertions to make it
clearer.


# 1.19 19-Dec-2021 riastradh

drm: Fix type confusion in drm_prime_lookup_buf_by_handle.


# 1.18 19-Dec-2021 riastradh

drm prime: Plug leak and tidy up.


# 1.17 19-Dec-2021 riastradh

drm: rb_tree_insert_node returns node, not NULL, on success


# 1.16 19-Dec-2021 riastradh

drm: Another pass over i915 and some supporting logic.

This makes a shim around sg_table, which essentially represents two
things:

1. an array of pages (roughly corresponding to bus_dma_segment_t[])
2. an array of DMA addresses stored in a bus_dmamap_t

Both parts are optional; different parts of i915 use sg_tables to
pass around one or both of the two parts. This helps to reduce the
ifdefs by quite a bit, although it's not always clear which part of
an sg_table any particular interface is actually using which is why I
was reluctant to do this before.


# 1.15 19-Dec-2021 riastradh

drm: Nix use of uvm pglist. Just use arrays of page pointers.


# 1.14 19-Dec-2021 riastradh

Fix up drm_prime.c.


# 1.13 19-Dec-2021 riastradh

Don't call drm_gem_dmabuf_mmap static, upstream doesn't (guessing)


Author: Maya Rashish <maya@NetBSD.org>


# 1.12 19-Dec-2021 riastradh

Cleanup ifdef goo that got mangled.

Endifs without matching ifdefs and so on.


Author: Maya Rashish <maya@NetBSD.org>


# 1.11 19-Dec-2021 riastradh

Redo drm prime trees with our rbtree abstraction.


# 1.10 18-Dec-2021 riastradh

Merge linux-drm-v5-6-rc3


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.9 14-Feb-2020 riastradh

Revert cosmetic changes.


# 1.8 14-Feb-2020 riastradh

Use a header file hack to cope with Linux/NetBSD namespace clashes.

Currently serves for:

ALIGN
mutex_init
mutex_destroy


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.7 27-Aug-2018 riastradh

branches: 1.7.6;
Check for DMA-safe addresses before allowing DRM prime import.


# 1.6 27-Aug-2018 riastradh

At chuq's suggestion, use paddr_t rather than struct vm_page *.

Doesn't make much of a substantive difference.


# 1.5 27-Aug-2018 riastradh

Rework drm prime guts.

- Our faux struct sg_table is now just an array of _pages_, not of
bus dma segments.

- We handle bus dma segments only in the presence of an adult bus dma
tag.

- All bus dma hacks are once again confined to bus_dma_hacks.h, and
more neatly organized:
. bus_dmamem_export_pages translates bus dma segs to vm_page array
. bus_dmamem_import_pages translates vm_page array to bus dma segs


# 1.4 27-Aug-2018 riastradh

Fill out drm_prime_* API a little more for NetBSD.

Add comment explaining our use of struct sg_table.


# 1.3 27-Aug-2018 riastradh

Draft support for drm prime.


# 1.2 27-Aug-2018 riastradh

merge linux-drm-v4-4-143


# 1.1 23-Jul-2013 riastradh

branches: 1.1.1;
Initial revision


# 1.19 19-Dec-2021 riastradh

drm: Fix type confusion in drm_prime_lookup_buf_by_handle.


# 1.18 19-Dec-2021 riastradh

drm prime: Plug leak and tidy up.


# 1.17 19-Dec-2021 riastradh

drm: rb_tree_insert_node returns node, not NULL, on success


# 1.16 19-Dec-2021 riastradh

drm: Another pass over i915 and some supporting logic.

This makes a shim around sg_table, which essentially represents two
things:

1. an array of pages (roughly corresponding to bus_dma_segment_t[])
2. an array of DMA addresses stored in a bus_dmamap_t

Both parts are optional; different parts of i915 use sg_tables to
pass around one or both of the two parts. This helps to reduce the
ifdefs by quite a bit, although it's not always clear which part of
an sg_table any particular interface is actually using which is why I
was reluctant to do this before.


# 1.15 19-Dec-2021 riastradh

drm: Nix use of uvm pglist. Just use arrays of page pointers.


# 1.14 19-Dec-2021 riastradh

Fix up drm_prime.c.


# 1.13 19-Dec-2021 riastradh

Don't call drm_gem_dmabuf_mmap static, upstream doesn't (guessing)


Author: Maya Rashish <maya@NetBSD.org>


# 1.12 19-Dec-2021 riastradh

Cleanup ifdef goo that got mangled.

Endifs without matching ifdefs and so on.


Author: Maya Rashish <maya@NetBSD.org>


# 1.11 19-Dec-2021 riastradh

Redo drm prime trees with our rbtree abstraction.


# 1.10 18-Dec-2021 riastradh

Merge linux-drm-v5-6-rc3


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.9 14-Feb-2020 riastradh

Revert cosmetic changes.


# 1.8 14-Feb-2020 riastradh

Use a header file hack to cope with Linux/NetBSD namespace clashes.

Currently serves for:

ALIGN
mutex_init
mutex_destroy


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.7 27-Aug-2018 riastradh

branches: 1.7.6;
Check for DMA-safe addresses before allowing DRM prime import.


# 1.6 27-Aug-2018 riastradh

At chuq's suggestion, use paddr_t rather than struct vm_page *.

Doesn't make much of a substantive difference.


# 1.5 27-Aug-2018 riastradh

Rework drm prime guts.

- Our faux struct sg_table is now just an array of _pages_, not of
bus dma segments.

- We handle bus dma segments only in the presence of an adult bus dma
tag.

- All bus dma hacks are once again confined to bus_dma_hacks.h, and
more neatly organized:
. bus_dmamem_export_pages translates bus dma segs to vm_page array
. bus_dmamem_import_pages translates vm_page array to bus dma segs


# 1.4 27-Aug-2018 riastradh

Fill out drm_prime_* API a little more for NetBSD.

Add comment explaining our use of struct sg_table.


# 1.3 27-Aug-2018 riastradh

Draft support for drm prime.


# 1.2 27-Aug-2018 riastradh

merge linux-drm-v4-4-143


# 1.1 23-Jul-2013 riastradh

branches: 1.1.1;
Initial revision


# 1.9 14-Feb-2020 riastradh

Revert cosmetic changes.


# 1.8 14-Feb-2020 riastradh

Use a header file hack to cope with Linux/NetBSD namespace clashes.

Currently serves for:

ALIGN
mutex_init
mutex_destroy


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.7 27-Aug-2018 riastradh

Check for DMA-safe addresses before allowing DRM prime import.


# 1.6 27-Aug-2018 riastradh

At chuq's suggestion, use paddr_t rather than struct vm_page *.

Doesn't make much of a substantive difference.


# 1.5 27-Aug-2018 riastradh

Rework drm prime guts.

- Our faux struct sg_table is now just an array of _pages_, not of
bus dma segments.

- We handle bus dma segments only in the presence of an adult bus dma
tag.

- All bus dma hacks are once again confined to bus_dma_hacks.h, and
more neatly organized:
. bus_dmamem_export_pages translates bus dma segs to vm_page array
. bus_dmamem_import_pages translates vm_page array to bus dma segs


# 1.4 27-Aug-2018 riastradh

Fill out drm_prime_* API a little more for NetBSD.

Add comment explaining our use of struct sg_table.


# 1.3 27-Aug-2018 riastradh

Draft support for drm prime.


# 1.2 27-Aug-2018 riastradh

merge linux-drm-v4-4-143


# 1.1 23-Jul-2013 riastradh

branches: 1.1.1;
Initial revision


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.7 27-Aug-2018 riastradh

Check for DMA-safe addresses before allowing DRM prime import.


# 1.6 27-Aug-2018 riastradh

At chuq's suggestion, use paddr_t rather than struct vm_page *.

Doesn't make much of a substantive difference.


# 1.5 27-Aug-2018 riastradh

Rework drm prime guts.

- Our faux struct sg_table is now just an array of _pages_, not of
bus dma segments.

- We handle bus dma segments only in the presence of an adult bus dma
tag.

- All bus dma hacks are once again confined to bus_dma_hacks.h, and
more neatly organized:
. bus_dmamem_export_pages translates bus dma segs to vm_page array
. bus_dmamem_import_pages translates vm_page array to bus dma segs


# 1.4 27-Aug-2018 riastradh

Fill out drm_prime_* API a little more for NetBSD.

Add comment explaining our use of struct sg_table.


# 1.3 27-Aug-2018 riastradh

Draft support for drm prime.


# 1.2 27-Aug-2018 riastradh

merge linux-drm-v4-4-143


# 1.1 23-Jul-2013 riastradh

branches: 1.1.1;
Initial revision