mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: Initial documentation for AMDgpu DC
[Why] Documentation is helpful for the community to understand our code. This change does some high-level documentation of some DM interfaces with DRM, and the amdgpu base driver. [How] An entry for AMDgpu DC has been added to Documentation/gpu/drivers.rst TOC. amdgpu-dc.rst is created to pull in inline doc-strings, which: - Provides an overview for "What is DM?" - Documents AMDgpu DM lifecyle - Documents IRQ management - Documents atomic_check and commit_tail interfaces Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: David Francis <David.Francis@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -59,49 +59,100 @@ struct common_irq_params {
|
||||
enum dc_irq_source irq_src;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct irq_list_head - Linked-list for low context IRQ handlers.
|
||||
*
|
||||
* @head: The list_head within &struct handler_data
|
||||
* @work: A work_struct containing the deferred handler work
|
||||
*/
|
||||
struct irq_list_head {
|
||||
struct list_head head;
|
||||
/* In case this interrupt needs post-processing, 'work' will be queued*/
|
||||
struct work_struct work;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dm_compressor_info - Buffer info used by frame buffer compression
|
||||
* @cpu_addr: MMIO cpu addr
|
||||
* @bo_ptr: Pointer to the buffer object
|
||||
* @gpu_addr: MMIO gpu addr
|
||||
*/
|
||||
struct dm_comressor_info {
|
||||
void *cpu_addr;
|
||||
struct amdgpu_bo *bo_ptr;
|
||||
uint64_t gpu_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct amdgpu_display_manager - Central amdgpu display manager device
|
||||
*
|
||||
* @dc: Display Core control structure
|
||||
* @adev: AMDGPU base driver structure
|
||||
* @ddev: DRM base driver structure
|
||||
* @display_indexes_num: Max number of display streams supported
|
||||
* @irq_handler_list_table_lock: Synchronizes access to IRQ tables
|
||||
* @backlight_dev: Backlight control device
|
||||
* @cached_state: Caches device atomic state for suspend/resume
|
||||
* @compressor: Frame buffer compression buffer. See &struct dm_comressor_info
|
||||
*/
|
||||
struct amdgpu_display_manager {
|
||||
|
||||
struct dc *dc;
|
||||
|
||||
/**
|
||||
* @cgs_device:
|
||||
*
|
||||
* The Common Graphics Services device. It provides an interface for
|
||||
* accessing registers.
|
||||
*/
|
||||
struct cgs_device *cgs_device;
|
||||
|
||||
struct amdgpu_device *adev; /*AMD base driver*/
|
||||
struct drm_device *ddev; /*DRM base driver*/
|
||||
struct amdgpu_device *adev;
|
||||
struct drm_device *ddev;
|
||||
u16 display_indexes_num;
|
||||
|
||||
/*
|
||||
* 'irq_source_handler_table' holds a list of handlers
|
||||
* per (DAL) IRQ source.
|
||||
/**
|
||||
* @irq_handler_list_low_tab:
|
||||
*
|
||||
* Each IRQ source may need to be handled at different contexts.
|
||||
* By 'context' we mean, for example:
|
||||
* - The ISR context, which is the direct interrupt handler.
|
||||
* - The 'deferred' context - this is the post-processing of the
|
||||
* interrupt, but at a lower priority.
|
||||
* Low priority IRQ handler table.
|
||||
*
|
||||
* It is a n*m table consisting of n IRQ sources, and m handlers per IRQ
|
||||
* source. Low priority IRQ handlers are deferred to a workqueue to be
|
||||
* processed. Hence, they can sleep.
|
||||
*
|
||||
* Note that handlers are called in the same order as they were
|
||||
* registered (FIFO).
|
||||
*/
|
||||
struct irq_list_head irq_handler_list_low_tab[DAL_IRQ_SOURCES_NUMBER];
|
||||
|
||||
/**
|
||||
* @irq_handler_list_high_tab:
|
||||
*
|
||||
* High priority IRQ handler table.
|
||||
*
|
||||
* It is a n*m table, same as &irq_handler_list_low_tab. However,
|
||||
* handlers in this table are not deferred and are called immediately.
|
||||
*/
|
||||
struct list_head irq_handler_list_high_tab[DAL_IRQ_SOURCES_NUMBER];
|
||||
|
||||
/**
|
||||
* @pflip_params:
|
||||
*
|
||||
* Page flip IRQ parameters, passed to registered handlers when
|
||||
* triggered.
|
||||
*/
|
||||
struct common_irq_params
|
||||
pflip_params[DC_IRQ_SOURCE_PFLIP_LAST - DC_IRQ_SOURCE_PFLIP_FIRST + 1];
|
||||
|
||||
/**
|
||||
* @vblank_params:
|
||||
*
|
||||
* Vertical blanking IRQ parameters, passed to registered handlers when
|
||||
* triggered.
|
||||
*/
|
||||
struct common_irq_params
|
||||
vblank_params[DC_IRQ_SOURCE_VBLANK6 - DC_IRQ_SOURCE_VBLANK1 + 1];
|
||||
|
||||
/* this spin lock synchronizes access to 'irq_handler_list_table' */
|
||||
spinlock_t irq_handler_list_table_lock;
|
||||
|
||||
struct backlight_device *backlight_dev;
|
||||
@@ -110,9 +161,6 @@ struct amdgpu_display_manager {
|
||||
|
||||
struct mod_freesync *freesync_module;
|
||||
|
||||
/**
|
||||
* Caches device atomic state for suspend/resume
|
||||
*/
|
||||
struct drm_atomic_state *cached_state;
|
||||
|
||||
struct dm_comressor_info compressor;
|
||||
|
||||
Reference in New Issue
Block a user