drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h
Extension
.h
Size
3188 bytes
Lines
84
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _DMUB_HW_LOCK_MGR_H_
#define _DMUB_HW_LOCK_MGR_H_

#include "dc_dmub_srv.h"
#include "core_types.h"

void dmub_hw_lock_mgr_cmd(struct dc_dmub_srv *dmub_srv,
				bool lock,
				union dmub_hw_lock_flags *hw_locks,
				struct dmub_hw_lock_inst_flags *inst_flags);

void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,
		union dmub_inbox0_cmd_lock_hw hw_lock_cmd);

/**
 * should_use_dmub_inbox1_lock() - Checks if the DMCUB hardware lock via inbox1 should be used.
 *
 * @dc: pointer to DC object
 * @link: optional pointer to the link object to check for enabled link features
 *
 * Return: true if the inbox1 lock should be used, false otherwise
 */
bool should_use_dmub_inbox1_lock(const struct dc *dc, const struct dc_link *link);

/**
 * dmub_hw_lock_mgr_does_link_require_lock() - Returns true if the link has a feature that needs the HW lock.
 *
 * @dc: Pointer to DC object
 * @link: The link to check
 *
 * Return: true if the link has a feature that needs the HW lock, false otherwise
 */
bool dmub_hw_lock_mgr_does_link_require_lock(const struct dc *dc, const struct dc_link *link);

/**
 * dmub_hw_lock_mgr_does_context_require_lock() - Returns true if the context has any stream that needs the HW lock.
 *
 * @dc: Pointer to DC object
 * @context: The context to check
 *
 * Return: true if the context has any stream that needs the HW lock, false otherwise
 */
bool dmub_hw_lock_mgr_does_context_require_lock(const struct dc *dc, const struct dc_state *context);

/**
 * should_use_dmub_inbox0_lock_for_link() - Checks if the inbox0 interlock with DMU should be used.
 *
 * Is not functionally equivalent to inbox1 as DMUB will not own programming of the relevant locking
 * registers.
 *
 * @dc: pointer to DC object
 * @link: optional pointer to the link object to check for enabled link features
 *
 * Return: true if the inbox0 lock should be used, false otherwise
 */
bool should_use_dmub_inbox0_lock_for_link(const struct dc *dc, const struct dc_link *link);

#endif /*_DMUB_HW_LOCK_MGR_H_ */

Annotation

Implementation Notes