linux/drivers/gpu/drm
Alistair Popple 82ba975e4c mm: allow compound zone device pages
Zone device pages are used to represent various type of device memory
managed by device drivers.  Currently compound zone device pages are not
supported.  This is because MEMORY_DEVICE_FS_DAX pages are the only user
of higher order zone device pages and have their own page reference
counting.

A future change will unify FS DAX reference counting with normal page
reference counting rules and remove the special FS DAX reference counting.
Supporting that requires compound zone device pages.

Supporting compound zone device pages requires compound_head() to
distinguish between head and tail pages whilst still preserving the
special struct page fields that are specific to zone device pages.

A tail page is distinguished by having bit zero being set in
page->compound_head, with the remaining bits pointing to the head page. 
For zone device pages page->compound_head is shared with page->pgmap.

The page->pgmap field must be common to all pages within a folio, even if
the folio spans memory sections.  Therefore pgmap is the same for both
head and tail pages and can be moved into the folio and we can use the
standard scheme to find compound_head from a tail page.

Link: https://lkml.kernel.org/r/67055d772e6102accf85161d0b57b0b3944292bf.1740713401.git-series.apopple@nvidia.com
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Signed-off-by: Balbir Singh <balbirs@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: David Hildenbrand <david@redhat.com>
Tested-by: Alison Schofield <alison.schofield@intel.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Asahi Lina <lina@asahilina.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: linmiaohe <linmiaohe@huawei.com>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
Cc: Michael "Camp Drill Sergeant" Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-17 22:06:39 -07:00
..
amd drm/amd/pm: always allow ih interrupt from fw 2025-03-05 12:34:09 -05:00
arm Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes 2025-02-06 09:59:35 +01:00
armada drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
aspeed drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
ast Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes 2025-02-06 09:59:35 +01:00
atmel-hlcdc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
bridge Linux 6.13 2025-01-23 14:42:21 +01:00
ci drm/ci: remove update-xfails.py 2024-11-05 10:50:55 -03:00
clients drm/log: select CONFIG_FONT_SUPPORT 2024-12-12 18:26:32 +01:00
display drm: Fix DSC BPP increment decoding 2025-02-13 10:20:30 +02:00
etnaviv - cleanups 2025-01-10 10:55:06 +10:00
exynos ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
fsl-dcu drm/fsl-dcu: Include <linux/of.h> 2024-12-13 15:20:40 +01:00
gma500 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
gud drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
hisilicon drm/hisilicon/hibmc: select CONFIG_DRM_DISPLAY_DP_HELPER 2025-02-09 03:56:34 +02:00
hyperv drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
i2c ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
i915 drm/i915/mst: update max stream count to match number of pipes 2025-03-04 14:45:04 -05:00
imagination drm/imagination: Fix timestamps in firmware traces 2025-03-03 12:15:55 +00:00
imx drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
ingenic drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
kmb drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
lib drm/lib: Include <linux/prandom.h> instead of <linux/random.h> 2024-10-03 18:19:38 +02:00
lima drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
logicvc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
loongson drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
mcde drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
mediatek Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
meson drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
mgag200 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
msm Merge tag 'drm-msm-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/msm into drm-fixes 2025-02-21 10:50:29 +10:00
mxsfb drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
nouveau mm: allow compound zone device pages 2025-03-17 22:06:39 -07:00
omapdrm drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
panel drm: panel: jd9365da-h3: fix reset signal polarity 2025-02-13 17:46:51 +01:00
panfrost drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
panthor drm/panthor: avoid garbage value in panthor_ioctl_dev_query() 2025-02-07 17:31:59 +01:00
pl111 drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
qxl drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
radeon drm/radeon: Fix rs400_gpu_init for ATI mobility radeon Xpress 200M 2025-03-05 12:33:33 -05:00
renesas drm/rcar-du: Add support for r8a779h0 2024-12-17 15:13:04 +02:00
rockchip drm/rockchip: vop2: Support 32x8 superblock afbc 2025-01-05 17:00:06 +01:00
scheduler drm/sched: Fix preprocessor guard 2025-03-03 16:03:48 +01:00
solomon drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sprd drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sti ASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata 2025-01-04 08:47:10 +02:00
stm drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
sun4i drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tegra drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tests drm/tests: hdmi: Fix recursive locking 2025-02-06 14:07:56 +01:00
tidss drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tilcdc drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
tiny drm/bochs: Fix DPMS regression 2025-03-06 08:54:42 +01:00
ttm DMEM cgroup pull request 2025-01-11 07:20:29 +10:00
tve200 drm-misc-next for 6.14: 2024-12-13 08:48:09 +10:00
udl drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
v3d drm/v3d: Assign job pointer to NULL before signaling the fence 2025-01-23 16:15:01 -03:00
vboxvideo drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
vc4 drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug() 2025-01-04 08:47:11 +02:00
vgem drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
virtio drm/virtio: Fix UAF in virtgpu_dma_buf_free_obj() 2025-01-19 15:12:28 +03:00
vkms drm/vkms: Round fixp2int conversion in lerp_u16 2025-02-25 16:15:55 +01:00
vmwgfx Linux 6.13 2025-01-23 14:42:21 +01:00
xe drm/xe/userptr: Unmap userptrs in the mmu notifier 2025-03-05 14:25:27 -05:00
xen drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
xlnx Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes 2025-02-06 09:59:35 +01:00
drm_atomic_helper.c drm/panic: Fix uninitialized spinlock acquisition with CONFIG_DRM_PANIC=n 2024-09-16 19:03:29 -04:00
drm_atomic_state_helper.c
drm_atomic_uapi.c drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS 2024-09-25 12:35:05 +02:00
drm_atomic.c drm/atomic: add interlaced and ycbcr_420 flags to connector's state dump 2024-10-24 22:42:25 +03:00
drm_auth.c
drm_blend.c
drm_bridge.c drm/bridge: Prioritize supported_formats over ycbcr_420_allowed 2025-01-13 11:18:20 +02:00
drm_buddy.c
drm_cache.c
drm_client_event.c drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_client_modeset.c drm/client: Handle tiled displays better 2025-01-21 11:41:05 +01:00
drm_client.c drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm_color_mgmt.c
drm_connector.c Linux 6.13 2025-01-23 14:42:21 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h drm/panic: Add a QR code panic screen 2024-08-23 16:55:35 +02:00
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_displayid_internal.h
drm_displayid.c
drm_draw_internal.h drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_draw.c drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_drv.c drm/drv: Add drmm managed registration helper for dmem cgroups. 2025-01-06 17:25:35 +01:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/connector: add mutex to protect ELD from concurrent access 2024-12-16 18:02:07 +02:00
drm_eld.c
drm_encoder_slave.c
drm_encoder.c
drm_exec.c mm: kvmalloc: align kvrealloc() with krealloc() 2024-09-01 20:25:44 -07:00
drm_fb_dma_helper.c
drm_fb_helper.c drm/modeset: Handle tiled displays in pan_display_atomic. 2025-01-21 11:39:34 +01:00
drm_fbdev_dma.c drm/fbdev-dma: Add shadow buffering for deferred I/O 2025-02-27 09:37:55 +01:00
drm_fbdev_shmem.c drm/fbdev-shmem: Remove obsolete setup function 2024-09-26 09:31:28 +02:00
drm_fbdev_ttm.c drm/fbdev-ttm: Remove obsolete setup function 2024-09-26 09:31:29 +02:00
drm_file.c drm: make drm-active- stats optional 2024-12-19 16:56:17 +01:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c drm/fbdev-helper: Move color-mode lookup into 4CC format helper 2024-09-26 08:27:49 +02:00
drm_framebuffer.c - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
drm_gem_atomic_helper.c
drm_gem_dma_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_framebuffer_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_shmem_helper.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c drm/gem-vram: Remove support for simple display pipelines 2024-09-06 14:41:38 +02:00
drm_gem.c drm/gem: Create a drm_gem_object_init_with_mnt() function 2024-09-25 08:40:20 -03:00
drm_gpuvm.c
drm_internal.h drm/client: Make client support optional 2024-10-18 09:23:03 +02:00
drm_ioc32.c
drm_ioctl.c drm: add DRM_SET_CLIENT_NAME ioctl 2024-10-08 10:00:30 +02:00
drm_kms_helper_common.c
drm_lease.c
drm_managed.c
drm_mipi_dbi.c
drm_mipi_dsi.c drm/mipi-dsi: fix kernel doc on mipi_dsi_compression_mode_multi 2024-10-10 14:22:43 +02:00
drm_mm.c drm/mm: annotate drm_mm_node_scanned_block() with __maybe_unused 2024-09-04 12:15:46 +03:00
drm_mode_config.c drm/connector: Add FIXME for GETRESOURCES ioctl wrt. uninited connectors 2024-12-17 15:43:04 +02:00
drm_mode_object.c drm/tests: Add test for drm_framebuffer_free() 2024-09-11 14:17:11 +02:00
drm_modes.c Linux 6.13-rc6 2025-01-10 14:24:17 +10:00
drm_modeset_helper.c drm/client: Move suspend/resume into DRM client callbacks 2024-10-18 09:23:03 +02:00
drm_modeset_lock.c
drm_of.c gpu: drm: replace of_graph_get_next_endpoint() 2024-11-12 13:05:35 +01:00
drm_panel_backlight_quirks.c drm: panel-backlight-quirks: Add Framework 13 glossy and 2.8k panels 2024-11-21 09:28:15 -06:00
drm_panel_orientation_quirks.c drm for 6.13-rc1 2024-11-21 14:56:17 -08:00
drm_panel.c drm: Use of_property_present() for non-boolean properties 2025-01-03 11:17:09 -06:00
drm_panic_qr.rs rust: finish using custom FFI integer types 2024-12-16 21:48:45 +01:00
drm_panic.c drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
drm_print.c drm/print: add drm_print_hex_dump() 2024-12-10 14:08:40 +02:00
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm_property.c
drm_rect.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c fdget(), trivial conversions 2024-11-03 01:28:06 -05:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank_work.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
drm_vblank.c drm: Fix kerneldoc for "Returns" section 2024-08-26 16:40:09 +02:00
drm_vma_manager.c
drm_writeback.c drm/writeback: remove pointless enable_signaling implementation 2024-10-09 14:23:37 +02:00
Kconfig Merge remote-tracking branch 'drm-misc/drm-misc-next-fixes' into drm-misc-fixes 2025-02-06 09:59:35 +01:00
Makefile drm/panic: Move drawing functions to drm_draw 2024-12-10 14:36:41 +01:00