Server IP : 104.21.38.3 / Your IP : 162.158.107.17 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/src/linux-headers-5.15.0-142/include/drm/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef __DRM_GEM_ATOMIC_HELPER_H__ #define __DRM_GEM_ATOMIC_HELPER_H__ #include <linux/dma-buf-map.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); int drm_gem_simple_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state); /* * Helpers for planes with shadow buffers */ /** * 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; /* 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 dma_buf_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 dma_buf_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_prepare_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state); void drm_gem_cleanup_shadow_fb(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 \ .prepare_fb = drm_gem_prepare_shadow_fb, \ .cleanup_fb = drm_gem_cleanup_shadow_fb int drm_gem_simple_kms_prepare_shadow_fb(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state); void drm_gem_simple_kms_cleanup_shadow_fb(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 \ .prepare_fb = drm_gem_simple_kms_prepare_shadow_fb, \ .cleanup_fb = drm_gem_simple_kms_cleanup_shadow_fb, \ .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__ */