drm/amd/amdgpu: Disabling Power Gating for Stoney platform
Power Gating is disabled in Stoney platform. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Родитель
81454cad0a
Коммит
43bb3a6d7d
|
@ -285,7 +285,7 @@ static int acp_hw_init(void *handle)
|
|||
return 0;
|
||||
else if (r)
|
||||
return r;
|
||||
|
||||
if (adev->asic_type != CHIP_STONEY) {
|
||||
adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL);
|
||||
if (adev->acp.acp_genpd == NULL)
|
||||
return -ENOMEM;
|
||||
|
@ -298,6 +298,7 @@ static int acp_hw_init(void *handle)
|
|||
adev->acp.acp_genpd->cgs_dev = adev->acp.cgs_device;
|
||||
|
||||
pm_genpd_init(&adev->acp.acp_genpd->gpd, NULL, false);
|
||||
}
|
||||
|
||||
adev->acp.acp_cell = kzalloc(sizeof(struct mfd_cell) * ACP_DEVS,
|
||||
GFP_KERNEL);
|
||||
|
@ -388,6 +389,7 @@ static int acp_hw_init(void *handle)
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
if (adev->asic_type != CHIP_STONEY) {
|
||||
for (i = 0; i < ACP_DEVS ; i++) {
|
||||
dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
|
||||
r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev);
|
||||
|
@ -396,6 +398,7 @@ static int acp_hw_init(void *handle)
|
|||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -413,9 +416,10 @@ static int acp_hw_fini(void *handle)
|
|||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
/* return early if no ACP */
|
||||
if (!adev->acp.acp_genpd)
|
||||
if (!adev->acp.acp_cell)
|
||||
return 0;
|
||||
|
||||
if (adev->acp.acp_genpd) {
|
||||
for (i = 0; i < ACP_DEVS ; i++) {
|
||||
dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
|
||||
ret = pm_genpd_remove_device(&adev->acp.acp_genpd->gpd, dev);
|
||||
|
@ -423,10 +427,11 @@ static int acp_hw_fini(void *handle)
|
|||
if (ret)
|
||||
dev_err(dev, "remove dev from genpd failed\n");
|
||||
}
|
||||
kfree(adev->acp.acp_genpd);
|
||||
}
|
||||
|
||||
mfd_remove_devices(adev->acp.parent);
|
||||
kfree(adev->acp.acp_res);
|
||||
kfree(adev->acp.acp_genpd);
|
||||
kfree(adev->acp.acp_cell);
|
||||
|
||||
return 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче