mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
drm/amdgpu: update the handle ptr in resume
Update the *handle to amdgpu_ip_block ptr for all functions pointers of resume. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
982d7f9bfe
commit
7feb4f3ad8
@@ -246,7 +246,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev)
|
||||
dev_err(adev->dev, "Failed to get BIF handle\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
r = cmn_block->version->funcs->resume(adev);
|
||||
r = cmn_block->version->funcs->resume(cmn_block);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
@@ -282,7 +282,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev)
|
||||
adev->ip_blocks[i].version->type ==
|
||||
AMD_IP_BLOCK_TYPE_SDMA))
|
||||
continue;
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->resume(&adev->ip_blocks[i]);
|
||||
if (r) {
|
||||
dev_err(adev->dev,
|
||||
"resume of IP block <%s> failed %d\n",
|
||||
|
||||
@@ -575,9 +575,9 @@ static int acp_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acp_resume(void *handle)
|
||||
static int acp_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
/* power down again on resume */
|
||||
if (!adev->acp.acp_cell)
|
||||
|
||||
@@ -2744,7 +2744,7 @@ static int amdgpu_device_fw_loading(struct amdgpu_device *adev)
|
||||
break;
|
||||
|
||||
if (amdgpu_in_reset(adev) || adev->in_suspend) {
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->resume(&adev->ip_blocks[i]);
|
||||
if (r) {
|
||||
DRM_ERROR("resume of IP block <%s> failed %d\n",
|
||||
adev->ip_blocks[i].version->funcs->name, r);
|
||||
@@ -3666,7 +3666,7 @@ static int amdgpu_device_ip_reinit_late_sriov(struct amdgpu_device *adev)
|
||||
continue;
|
||||
|
||||
if (block->version->type == AMD_IP_BLOCK_TYPE_SMC)
|
||||
r = block->version->funcs->resume(adev);
|
||||
r = block->version->funcs->resume(&adev->ip_blocks[i]);
|
||||
else
|
||||
r = block->version->funcs->hw_init(adev);
|
||||
|
||||
@@ -3704,7 +3704,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
|
||||
(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP && amdgpu_sriov_vf(adev))) {
|
||||
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->resume(&adev->ip_blocks[i]);
|
||||
if (r) {
|
||||
DRM_ERROR("resume of IP block <%s> failed %d\n",
|
||||
adev->ip_blocks[i].version->funcs->name, r);
|
||||
@@ -3742,7 +3742,7 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
|
||||
continue;
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->resume(&adev->ip_blocks[i]);
|
||||
if (r) {
|
||||
DRM_ERROR("resume of IP block <%s> failed %d\n",
|
||||
adev->ip_blocks[i].version->funcs->name, r);
|
||||
|
||||
@@ -88,7 +88,7 @@ static int isp_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isp_resume(void *handle)
|
||||
static int isp_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3089,10 +3089,10 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psp_resume(void *handle)
|
||||
static int psp_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
int ret;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
struct psp_context *psp = &adev->psp;
|
||||
|
||||
dev_info(adev->dev, "PSP is resuming...\n");
|
||||
|
||||
@@ -880,9 +880,9 @@ static int umsch_mm_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return umsch_mm_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int umsch_mm_resume(void *handle)
|
||||
static int umsch_mm_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return umsch_mm_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -616,12 +616,12 @@ static int amdgpu_vkms_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return amdgpu_vkms_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int amdgpu_vkms_resume(void *handle)
|
||||
static int amdgpu_vkms_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int r;
|
||||
|
||||
r = amdgpu_vkms_hw_init(handle);
|
||||
r = amdgpu_vkms_hw_init(adev);
|
||||
if (r)
|
||||
return r;
|
||||
return drm_mode_config_helper_resume(adev_to_drm(adev));
|
||||
|
||||
@@ -443,9 +443,9 @@ static int vpe_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return vpe_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int vpe_resume(void *handle)
|
||||
static int vpe_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return vpe_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -2160,9 +2160,9 @@ static int cik_common_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return cik_common_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int cik_common_resume(void *handle)
|
||||
static int cik_common_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return cik_common_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -344,9 +344,9 @@ static int cik_ih_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return cik_ih_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int cik_ih_resume(void *handle)
|
||||
static int cik_ih_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return cik_ih_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -1018,11 +1018,11 @@ static int cik_sdma_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return cik_sdma_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int cik_sdma_resume(void *handle)
|
||||
static int cik_sdma_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
cik_sdma_soft_reset(handle);
|
||||
cik_sdma_soft_reset(ip_block);
|
||||
|
||||
return cik_sdma_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -340,9 +340,9 @@ static int cz_ih_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return cz_ih_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int cz_ih_resume(void *handle)
|
||||
static int cz_ih_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return cz_ih_hw_init(adev);
|
||||
}
|
||||
|
||||
@@ -2920,15 +2920,15 @@ static int dce_v10_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return dce_v10_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int dce_v10_0_resume(void *handle)
|
||||
static int dce_v10_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int ret;
|
||||
|
||||
amdgpu_atombios_encoder_set_backlight_level_to_reg(adev,
|
||||
adev->mode_info.bl_level);
|
||||
|
||||
ret = dce_v10_0_hw_init(handle);
|
||||
ret = dce_v10_0_hw_init(adev);
|
||||
|
||||
/* turn on the BL */
|
||||
if (adev->mode_info.bl_encoder) {
|
||||
|
||||
@@ -3058,15 +3058,15 @@ static int dce_v11_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return dce_v11_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int dce_v11_0_resume(void *handle)
|
||||
static int dce_v11_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int ret;
|
||||
|
||||
amdgpu_atombios_encoder_set_backlight_level_to_reg(adev,
|
||||
adev->mode_info.bl_level);
|
||||
|
||||
ret = dce_v11_0_hw_init(handle);
|
||||
ret = dce_v11_0_hw_init(adev);
|
||||
|
||||
/* turn on the BL */
|
||||
if (adev->mode_info.bl_encoder) {
|
||||
|
||||
@@ -2815,15 +2815,15 @@ static int dce_v6_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return dce_v6_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int dce_v6_0_resume(void *handle)
|
||||
static int dce_v6_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int ret;
|
||||
|
||||
amdgpu_atombios_encoder_set_backlight_level_to_reg(adev,
|
||||
adev->mode_info.bl_level);
|
||||
|
||||
ret = dce_v6_0_hw_init(handle);
|
||||
ret = dce_v6_0_hw_init(adev);
|
||||
|
||||
/* turn on the BL */
|
||||
if (adev->mode_info.bl_encoder) {
|
||||
|
||||
@@ -2838,15 +2838,15 @@ static int dce_v8_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return dce_v8_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int dce_v8_0_resume(void *handle)
|
||||
static int dce_v8_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int ret;
|
||||
|
||||
amdgpu_atombios_encoder_set_backlight_level_to_reg(adev,
|
||||
adev->mode_info.bl_level);
|
||||
|
||||
ret = dce_v8_0_hw_init(handle);
|
||||
ret = dce_v8_0_hw_init(adev);
|
||||
|
||||
/* turn on the BL */
|
||||
if (adev->mode_info.bl_encoder) {
|
||||
|
||||
@@ -7463,9 +7463,9 @@ static int gfx_v10_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v10_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int gfx_v10_0_resume(void *handle)
|
||||
static int gfx_v10_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return gfx_v10_0_hw_init(handle);
|
||||
return gfx_v10_0_hw_init(ip_block->adev);
|
||||
}
|
||||
|
||||
static bool gfx_v10_0_is_idle(void *handle)
|
||||
|
||||
@@ -4712,9 +4712,9 @@ static int gfx_v11_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v11_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int gfx_v11_0_resume(void *handle)
|
||||
static int gfx_v11_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return gfx_v11_0_hw_init(handle);
|
||||
return gfx_v11_0_hw_init(ip_block->adev);
|
||||
}
|
||||
|
||||
static bool gfx_v11_0_is_idle(void *handle)
|
||||
|
||||
@@ -3650,9 +3650,9 @@ static int gfx_v12_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v12_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int gfx_v12_0_resume(void *handle)
|
||||
static int gfx_v12_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return gfx_v12_0_hw_init(handle);
|
||||
return gfx_v12_0_hw_init(ip_block->adev);
|
||||
}
|
||||
|
||||
static bool gfx_v12_0_is_idle(void *handle)
|
||||
|
||||
@@ -3160,9 +3160,9 @@ static int gfx_v6_0_suspend(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v6_0_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int gfx_v6_0_resume(void *handle)
|
||||
static int gfx_v6_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
return gfx_v6_0_hw_init(adev);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user