History log of /src/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_region.c |
Revision | | Date | Author | Comments |
1.6 |
| 19-Jan-2024 |
riastradh | i915_gem_region: Fill sg_pgs, with size/PAGE_SIZE entries.
Use sg_alloc_table_from_bus_dmamem to do this.
i915_gem_mman.c vm_fault_cpu and i915_gem_object_release_mmap_offset both rely on sg_pgs to be a page array, so using something else like size >> ilog2(mem->mm.chunk_size) entries doesn't work. And they rely on the sg_pgs entries to be initialized, which we weren't doing before, and which sg_alloc_table_from_bus_dmamem does for us.
Related to PR kern/57833.
XXX pullup-10
|
1.5 |
| 19-Jan-2024 |
riastradh | i915_gem_region: Reduce diff from upstream a little.
No functional change intended.
Prompted by upcoming nearby changes related to PR kern/57833.
XXX pullup-10 (to make subsequent pullups easier)
|
1.4 |
| 19-Dec-2021 |
riastradh | branches: 1.4.4; drm: Destroy dma map in sg_table_free.
Helps to reduce a little diff.
|
1.3 |
| 19-Dec-2021 |
riastradh | drm: Another pass over i915. Most of i915 gem builds now.
|
1.2 |
| 18-Dec-2021 |
riastradh | Merge linux-drm-v5-6-rc3
|
1.1 |
| 18-Dec-2021 |
riastradh | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 18-Dec-2021 |
riastradh | Import drm from Linux v5.6-rc3 (commit f8788d86ab28f61f7b46eb6be375f8a726783636)
drivers/gpu/drm -> sys/external/bsd/drm2/dist/drm include/drm -> sys/external/bsd/drm2/dist/include/drm include/uapi/drm -> sys/external/bsd/drm2/dist/include/uapi/drm
GPL exclusions in dist/drm:
- amd/amdgpu/amdgpu_atpx_handler.c - arc/ - arm/ - armada/ - aspeed/ - atmel-hlcdc/ - bochs/ - bridge/ - cirrus/ - drm_dp_cec.c - drm_dp_mst_topology_internal.h - drm_edid_load.c - drm_format_helper.c - drm_gem_cma_helper.c - drm_gem_framebuffer_helper.c - drm_gem_shmem_helper.c - drm_gem_ttm_helper.c - drm_gem_vram_helper.c - drm_hdcp.c - drm_lease.c - drm_mipi_dbi.c - drm_simple_kms_helper.c - drm_sysfs.c - drm_trace.h - drm_vram_helper_common.c - drm_writeback.c - etnaviv/ - exynos/ - fsl-dcu/ - gma500/ - hisilicon/ - i2c/tda9950.c - i2c/tda998x_drv.c - i915/gt/selftest_context.c - i915/gt/selftest_engine.c - i915/gt/selftest_engine.h - i915/gt/selftest_engine_cs.c - i915/gt/selftest_engine_pm.c - i915/i915_trace.h - i915/selftests/i915_live_selftests.h - i915/selftests/i915_mock_selftests.h - i915/selftests/i915_perf_selftests.h - i915/selftests/lib_sw_fence.h - imx/ - ingenic/ - lima/ - mcde/ - mediatek/ - meson/ - mgag200/ - msm/ - mxsfb/ - omapdrm/ - panel/ - panfrost/ - pl111/ - radeon/radeon_atpx_handler.c - rcar-du/ - rockchip/ - selftests/drm_cmdline_selftests.h - selftests/drm_modeset_selftests.h - selftests/test-drm_cmdline_parser.c - selftests/test-drm_damage_helper.c - selftests/test-drm_dp_mst_helper.c - selftests/test-drm_format.c - selftests/test-drm_framebuffer.c - selftests/test-drm_modeset_common.c - selftests/test-drm_modeset_common.h - selftests/test-drm_plane_helper.c - selftests/test-drm_rect.c - shmobile/ - sti/ - stm/ - sun4i/ - tegra/ - tilcdc/ - tiny/ - tve200/ - udl/ - v3d/ - vc4/ - virtio/virtgpu_trace.h - virtio/virtgpu_trace_points.c - vkms/ - vmwgfx/device_include/vmware_pack_begin.h - vmwgfx/device_include/vmware_pack_end.h - zte/
Exceptions -- these all appear to be files to which someone added an SPDX license header automatically by a script that is not aware of the default MIT licensing under drivers/gpu/drm:
- ast/ast_dp501.c - ast/ast_dram_tables.h - lib/drm_random.c - lib/drm_random.h - i915/display/intel_acpi.c - i915/selftests/mock_gem_device.h - i915/selftests/i915_mock_selftests.h - i915/selftests/i915_live_selftests.h - r128/ati_pcigart.h - selftests/drm_mm_selftests.h - selftests/test-drm_mm.c - vmwgfx/device_include/vm_basic_types.h
GPL exclusions in dist/include/drm:
- bridge - drm_client.h - drm_fb_cma_helper.h - drm_format_helper.h - drm_gem_cma_helper.h - drm_gem_shmem_helper.h - drm_gem_ttm_helper.h - drm_gem_vram_helper.h - drm_lease.h - drm_mipi_dbi.h - drm_mipi_dsi.h - drm_of.h - drm_simple_kms_helper.h - drm_sysfs.h - drm_writeback.h - gma_drm.h - i2c/tda998x.h - i915_mei_hdcp_interface.h - intel-gtt.h
Exceptions: - drm_agpsupport.h - was in original drm; wrong spdx header auto-added
GPL exclusions in dist/include/uapi/drm:
- armada_drm.h - etnaviv_drm.h - exynos_drm.h - lima_drm.h - omap_drm.h
Exceptions: - i810_drm.h - was in original drm; spdx header is wrong
|
1.4.4.1 |
| 03-Feb-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #559):
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_stolen.c: revision 1.6 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_stolen.c: revision 1.7 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_pages.c: revision 1.7 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c: revision 1.9 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c: revision 1.22 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_region.c: revision 1.5 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_region.c: revision 1.6
i915_gem_region: Reduce diff from upstream a little. No functional change intended. Prompted by upcoming nearby changes related to PR kern/57833.
i915_gem: Avoid walking off end of sg_pgs. sg_npgs currently fails to match obj->base.size/PAGE_SIZE only due to bugs in the construction of sg_pgs in various i915 gem object types, which we should also fix, but let's avoid compounding it here. Related to PR kern/57833.
i915_gem: Assert page array size. Let's detect the bug of sg_npgs failing to match obj->base.size/PAGE_SIZE earlier. Related to PR kern/57833.
i915_gem_phys: Fill sg_pgs. This is needed by i915 gem fault, which maps user virtual addresses to those pages, and by i915 gem object destruction, which does pmap_page_protect on the pages to remove any of those user virtual mappings. This needs pmap_kenter_pa rather than pmap_enter(pmap_kernel(), ...) in order to preserve the _kernel's_ mapping of the pages after pmap_page_protect. But bus_dmamem_map currently uses pmap_enter(pmap_kernel(), ...) instead which creates a mapping that is removed by pmap_page_protect. So we use a variant of bus_dmamem_map that uses pmap_kenter_pa instead. Perhaps bus_dmamem_map should do this itself, but this change is less risky to pull up than a change to bus_dmamem_map itself. PR kern/57833: kernel panic on xorg exit
i915_gem_region: Fill sg_pgs, with size/PAGE_SIZE entries. Use sg_alloc_table_from_bus_dmamem to do this. i915_gem_mman.c vm_fault_cpu and i915_gem_object_release_mmap_offset both rely on sg_pgs to be a page array, so using something else like size >> ilog2(mem->mm.chunk_size) entries doesn't work. And they rely on the sg_pgs entries to be initialized, which we weren't doing before, and which sg_alloc_table_from_bus_dmamem does for us. Related to PR kern/57833.
i915_gem_stolen: Fix memory leak. Found while trying to address the PR 57833 class of problems.
i915_gem_stolen: Fill sg_pgs, with size/PAGE_SIZE entries. Use sg_alloc_table_from_bus_dmamem to do this.
i915_gem_mman.c vm_fault_cpu and i915_gem_object_release_mmap_offset both rely on sg_pgs to be a page array, so providing a table with only one entry doesn't work (except by accident, if the object is page-sized anyway). And they rely on the sg_pgs entries to be initialized, which we weren't doing before, and which sg_alloc_table_from_bus_dmamem does for us. Related to PR kern/57833.
|