mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-19 20:13:49 -04:00
drm/amd/display: Enable runtime register offset init for DCN32 DMUB
[Why&How] DMUB subsystem was continuing to use compile time offset calculation for register access. Switch this to runtime calculation to stay consistent with rest of DC code. To enable this, an additional interface init_reg_offsets() are added to DMUB's hw_funcs struct. Asics with runtime register offset calculation enabled shall populate this hook with a fn pointer that will invoke the necessary macros to calculate the offset. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
45f98fccb1
commit
96182df99d
@@ -1069,6 +1069,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
|
||||
const struct firmware *dmub_fw = adev->dm.dmub_fw;
|
||||
struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu;
|
||||
struct abm *abm = adev->dm.dc->res_pool->abm;
|
||||
struct dc_context *ctx = adev->dm.dc->ctx;
|
||||
struct dmub_srv_hw_params hw_params;
|
||||
enum dmub_status status;
|
||||
const unsigned char *fw_inst_const, *fw_bss_data;
|
||||
@@ -1090,6 +1091,10 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* initialize register offsets for ASICs with runtime initialization available */
|
||||
if (dmub_srv->hw_funcs.init_reg_offsets)
|
||||
dmub_srv->hw_funcs.init_reg_offsets(dmub_srv, ctx);
|
||||
|
||||
status = dmub_srv_has_hw_support(dmub_srv, &has_hw_support);
|
||||
if (status != DMUB_STATUS_OK) {
|
||||
DRM_ERROR("Error checking HW support for DMUB: %d\n", status);
|
||||
|
||||
Reference in New Issue
Block a user