PATH:
usr
/
src
/
kernels
/
5.14.0-611.49.2.el9_7.x86_64
/
include
/
drm
/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef __DRM_GEM_ATOMIC_HELPER_H__ #define __DRM_GEM_ATOMIC_HELPER_H__ #include <linux/iosys-map.h> #include <drm/drm_format_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_plane.h> struct drm_simple_display_pipe; /* * Plane Helpers */ int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state); /* * Helpers for planes with shadow buffers */ /** * DRM_SHADOW_PLANE_MAX_WIDTH - Maximum width of a plane's shadow buffer in pixels * * For drivers with shadow planes, the maximum width of the framebuffer is * usually independent from hardware limitations. Drivers can initialize struct * drm_mode_config.max_width from DRM_SHADOW_PLANE_MAX_WIDTH. */ #define DRM_SHADOW_PLANE_MAX_WIDTH (4096u) /** * DRM_SHADOW_PLANE_MAX_HEIGHT - Maximum height of a plane's shadow buffer in scanlines * * For drivers with shadow planes, the maximum height of the framebuffer is * usually independent from hardware limitations. Drivers can initialize struct * drm_mode_config.max_height from DRM_SHADOW_PLANE_MAX_HEIGHT. */ #define DRM_SHADOW_PLANE_MAX_HEIGHT (4096u) /** * struct drm_shadow_plane_state - plane state for planes with shadow buffers * * For planes that use a shadow buffer, struct drm_shadow_plane_state * provides the regular plane state plus mappings of the shadow buffer * into kernel address space. */ struct drm_shadow_plane_state { /** @base: plane state */ struct drm_plane_state base; /** * @fmtcnv_state: Format-conversion state * * Per-plane state for format conversion. * Flags for copying shadow buffers into backend storage. Also holds * temporary storage for format conversion. */ struct drm_format_conv_state fmtcnv_state; /* Transitional state - do not export or duplicate */ /** * @map: Mappings of the plane's framebuffer BOs in to kernel address space * * The memory mappings stored in map should be established in the plane's * prepare_fb callback and removed in the cleanup_fb callback. */ struct iosys_map map[DRM_FORMAT_MAX_PLANES]; /** * @data: Address of each framebuffer BO's data * * The address of the data stored in each mapping. This is different * for framebuffers with non-zero offset fields. */ struct iosys_map data[DRM_FORMAT_MAX_PLANES]; }; /** * to_drm_shadow_plane_state - upcasts from struct drm_plane_state * @state: the plane state */ static inline struct drm_shadow_plane_state * to_drm_shadow_plane_state(struct drm_plane_state *state) { return container_of(state, struct drm_shadow_plane_state, base); } void __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane, struct drm_shadow_plane_state *new_shadow_plane_state); void __drm_gem_destroy_shadow_plane_state(struct drm_shadow_plane_state *shadow_plane_state); void __drm_gem_reset_shadow_plane(struct drm_plane *plane, struct drm_shadow_plane_state *shadow_plane_state); void drm_gem_reset_shadow_plane(struct drm_plane *plane); struct drm_plane_state *drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane); void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane, struct drm_plane_state *plane_state); /** * DRM_GEM_SHADOW_PLANE_FUNCS - * Initializes struct drm_plane_funcs for shadow-buffered planes * * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This * macro initializes struct drm_plane_funcs to use the rsp helper functions. */ #define DRM_GEM_SHADOW_PLANE_FUNCS \ .reset = drm_gem_reset_shadow_plane, \ .atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \ .atomic_destroy_state = drm_gem_destroy_shadow_plane_state int drm_gem_begin_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state); void drm_gem_end_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state); /** * DRM_GEM_SHADOW_PLANE_HELPER_FUNCS - * Initializes struct drm_plane_helper_funcs for shadow-buffered planes * * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This * macro initializes struct drm_plane_helper_funcs to use the rsp helper * functions. */ #define DRM_GEM_SHADOW_PLANE_HELPER_FUNCS \ .begin_fb_access = drm_gem_begin_shadow_fb_access, \ .end_fb_access = drm_gem_end_shadow_fb_access int drm_gem_simple_kms_begin_shadow_fb_access(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state); void drm_gem_simple_kms_end_shadow_fb_access(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state); void drm_gem_simple_kms_reset_shadow_plane(struct drm_simple_display_pipe *pipe); struct drm_plane_state * drm_gem_simple_kms_duplicate_shadow_plane_state(struct drm_simple_display_pipe *pipe); void drm_gem_simple_kms_destroy_shadow_plane_state(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state); /** * DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS - * Initializes struct drm_simple_display_pipe_funcs for shadow-buffered planes * * Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This * macro initializes struct drm_simple_display_pipe_funcs to use the rsp helper * functions. */ #define DRM_GEM_SIMPLE_DISPLAY_PIPE_SHADOW_PLANE_FUNCS \ .begin_fb_access = drm_gem_simple_kms_begin_shadow_fb_access, \ .end_fb_access = drm_gem_simple_kms_end_shadow_fb_access, \ .reset_plane = drm_gem_simple_kms_reset_shadow_plane, \ .duplicate_plane_state = drm_gem_simple_kms_duplicate_shadow_plane_state, \ .destroy_plane_state = drm_gem_simple_kms_destroy_shadow_plane_state #endif /* __DRM_GEM_ATOMIC_HELPER_H__ */
[-] drm_eld.h
[edit]
[-] drm_bridge.h
[edit]
[-] spsc_queue.h
[edit]
[-] drm_gem_dma_helper.h
[edit]
[-] drm_property.h
[edit]
[-] drm_auth.h
[edit]
[-] drm_mipi_dbi.h
[edit]
[-] drm_mode_object.h
[edit]
[-] drm_pciids.h
[edit]
[+]
ttm
[-] drm_privacy_screen_machine.h
[edit]
[-] drm_fixed.h
[edit]
[-] drm_fb_helper.h
[edit]
[-] drm_gem_ttm_helper.h
[edit]
[-] drm_pagemap.h
[edit]
[-] drm_atomic_uapi.h
[edit]
[-] drm_module.h
[edit]
[+]
display
[-] drm_encoder.h
[edit]
[-] drm_file.h
[edit]
[-] drm_connector.h
[edit]
[-] drm_utils.h
[edit]
[-] drm_suballoc.h
[edit]
[+]
intel
[-] drm_audio_component.h
[edit]
[-] drm_prime.h
[edit]
[-] drm_atomic_helper.h
[edit]
[-] i915_pciids.h
[edit]
[-] drm_mipi_dsi.h
[edit]
[-] drm_writeback.h
[edit]
[-] drm_gem_framebuffer_helper.h
[edit]
[-] drm_lease.h
[edit]
[-] drm_crtc_helper.h
[edit]
[-] drm_client.h
[edit]
[-] Makefile
[edit]
[-] drm_vblank.h
[edit]
[-] drm_format_helper.h
[edit]
[-] drm_fb_dma_helper.h
[edit]
[-] drm_mode_config.h
[edit]
[-] drm_debugfs.h
[edit]
[-] drm_print.h
[edit]
[-] drm_client_event.h
[edit]
[-] drm_panel.h
[edit]
[-] drm_gem_shmem_helper.h
[edit]
[-] drm_debugfs_crc.h
[edit]
[-] drm_cache.h
[edit]
[-] drm_sysfs.h
[edit]
[+]
clients
[-] drm_edid.h
[edit]
[-] drm_modeset_helper.h
[edit]
[-] drm_atomic_state_helper.h
[edit]
[-] drm_ioctl.h
[edit]
[-] drm_blend.h
[edit]
[-] drm_gem_vram_helper.h
[edit]
[-] drm_panic.h
[edit]
[-] drm_plane_helper.h
[edit]
[-] drm_fbdev_dma.h
[edit]
[-] drm_bridge_connector.h
[edit]
[-] drm_probe_helper.h
[edit]
[-] drm_modeset_helper_vtables.h
[edit]
[-] drm_device.h
[edit]
[-] drm_exec.h
[edit]
[-] drm_atomic.h
[edit]
[-] gud.h
[edit]
[-] drm_gem.h
[edit]
[-] drm_gpuvm.h
[edit]
[-] drm_mm.h
[edit]
[-] drm_plane.h
[edit]
[-] drm_gpusvm.h
[edit]
[-] drm_simple_kms_helper.h
[edit]
[-] drm_syncobj.h
[edit]
[-] drm_gem_atomic_helper.h
[edit]
[-] drm_fbdev_shmem.h
[edit]
[-] drm_framebuffer.h
[edit]
[-] drm_accel.h
[edit]
[-] drm_self_refresh_helper.h
[edit]
[-] amd_asic_type.h
[edit]
[-] drm_privacy_screen_consumer.h
[edit]
[-] gpu_scheduler.h
[edit]
[-] drm_fbdev_ttm.h
[edit]
[-] drm_managed.h
[edit]
[-] task_barrier.h
[edit]
[-] drm_fourcc.h
[edit]
[-] drm_vblank_work.h
[edit]
[-] drm_modes.h
[edit]
[-] drm_vma_manager.h
[edit]
[-] drm_buddy.h
[edit]
[-] drm_of.h
[edit]
[+]
..
[+]
bridge
[-] drm_modeset_lock.h
[edit]
[-] drm_rect.h
[edit]
[-] drm_flip_work.h
[edit]
[-] drm_util.h
[edit]
[-] drm_damage_helper.h
[edit]
[-] drm_drv.h
[edit]
[-] drm_kunit_helpers.h
[edit]
[-] drm_color_mgmt.h
[edit]
[-] drm_crtc.h
[edit]
[-] drm_privacy_screen_driver.h
[edit]