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 is_idle
Update the *handle to amdgpu_ip_block ptr for all functions pointers of is_idle. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
cb0de06d1b
commit
7dc3405403
@@ -579,7 +579,7 @@ static int acp_resume(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool acp_is_idle(void *handle)
|
||||
static bool acp_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ static int isp_early_init(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool isp_is_idle(void *handle)
|
||||
static bool isp_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ static int amdgpu_vkms_resume(struct amdgpu_ip_block *ip_block)
|
||||
return drm_mode_config_helper_resume(adev_to_drm(ip_block->adev));
|
||||
}
|
||||
|
||||
static bool amdgpu_vkms_is_idle(void *handle)
|
||||
static bool amdgpu_vkms_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2148,7 +2148,7 @@ static int cik_common_resume(struct amdgpu_ip_block *ip_block)
|
||||
return cik_common_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool cik_common_is_idle(void *handle)
|
||||
static bool cik_common_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -345,9 +345,9 @@ static int cik_ih_resume(struct amdgpu_ip_block *ip_block)
|
||||
return cik_ih_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool cik_ih_is_idle(void *handle)
|
||||
static bool cik_ih_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
if (tmp & SRBM_STATUS__IH_BUSY_MASK)
|
||||
|
||||
@@ -1025,9 +1025,9 @@ static int cik_sdma_resume(struct amdgpu_ip_block *ip_block)
|
||||
return cik_sdma_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool cik_sdma_is_idle(void *handle)
|
||||
static bool cik_sdma_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS2);
|
||||
|
||||
if (tmp & (SRBM_STATUS2__SDMA_BUSY_MASK |
|
||||
|
||||
@@ -341,9 +341,9 @@ static int cz_ih_resume(struct amdgpu_ip_block *ip_block)
|
||||
return cz_ih_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool cz_ih_is_idle(void *handle)
|
||||
static bool cz_ih_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
if (REG_GET_FIELD(tmp, SRBM_STATUS, IH_BUSY))
|
||||
|
||||
@@ -2970,7 +2970,7 @@ static int dce_v10_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return amdgpu_display_resume_helper(adev);
|
||||
}
|
||||
|
||||
static bool dce_v10_0_is_idle(void *handle)
|
||||
static bool dce_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3108,7 +3108,7 @@ static int dce_v11_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return amdgpu_display_resume_helper(adev);
|
||||
}
|
||||
|
||||
static bool dce_v11_0_is_idle(void *handle)
|
||||
static bool dce_v11_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2865,7 +2865,7 @@ static int dce_v6_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return amdgpu_display_resume_helper(adev);
|
||||
}
|
||||
|
||||
static bool dce_v6_0_is_idle(void *handle)
|
||||
static bool dce_v6_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2887,7 +2887,7 @@ static int dce_v8_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return amdgpu_display_resume_helper(adev);
|
||||
}
|
||||
|
||||
static bool dce_v8_0_is_idle(void *handle)
|
||||
static bool dce_v8_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7583,9 +7583,9 @@ static int gfx_v10_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v10_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v10_0_is_idle(void *handle)
|
||||
static bool gfx_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (REG_GET_FIELD(RREG32_SOC15(GC, 0, mmGRBM_STATUS),
|
||||
GRBM_STATUS, GUI_ACTIVE))
|
||||
|
||||
@@ -4787,9 +4787,9 @@ static int gfx_v11_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v11_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v11_0_is_idle(void *handle)
|
||||
static bool gfx_v11_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (REG_GET_FIELD(RREG32_SOC15(GC, 0, regGRBM_STATUS),
|
||||
GRBM_STATUS, GUI_ACTIVE))
|
||||
|
||||
@@ -3695,9 +3695,9 @@ static int gfx_v12_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v12_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v12_0_is_idle(void *handle)
|
||||
static bool gfx_v12_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (REG_GET_FIELD(RREG32_SOC15(GC, 0, regGRBM_STATUS),
|
||||
GRBM_STATUS, GUI_ACTIVE))
|
||||
|
||||
@@ -3167,9 +3167,9 @@ static int gfx_v6_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v6_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v6_0_is_idle(void *handle)
|
||||
static bool gfx_v6_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (RREG32(mmGRBM_STATUS) & GRBM_STATUS__GUI_ACTIVE_MASK)
|
||||
return false;
|
||||
@@ -3183,7 +3183,7 @@ static int gfx_v6_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
for (i = 0; i < adev->usec_timeout; i++) {
|
||||
if (gfx_v6_0_is_idle(adev))
|
||||
if (gfx_v6_0_is_idle(ip_block))
|
||||
return 0;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
@@ -4515,9 +4515,9 @@ static int gfx_v7_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v7_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v7_0_is_idle(void *handle)
|
||||
static bool gfx_v7_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (RREG32(mmGRBM_STATUS) & GRBM_STATUS__GUI_ACTIVE_MASK)
|
||||
return false;
|
||||
|
||||
@@ -4851,9 +4851,9 @@ static int gfx_v8_0_kcq_disable(struct amdgpu_device *adev)
|
||||
return r;
|
||||
}
|
||||
|
||||
static bool gfx_v8_0_is_idle(void *handle)
|
||||
static bool gfx_v8_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (REG_GET_FIELD(RREG32(mmGRBM_STATUS), GRBM_STATUS, GUI_ACTIVE)
|
||||
|| RREG32(mmGRBM_STATUS2) != 0x8)
|
||||
@@ -4892,7 +4892,7 @@ static int gfx_v8_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
for (i = 0; i < adev->usec_timeout; i++) {
|
||||
if (gfx_v8_0_is_idle(adev))
|
||||
if (gfx_v8_0_is_idle(ip_block))
|
||||
return 0;
|
||||
|
||||
udelay(1);
|
||||
|
||||
@@ -4110,9 +4110,9 @@ static int gfx_v9_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v9_0_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v9_0_is_idle(void *handle)
|
||||
static bool gfx_v9_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (REG_GET_FIELD(RREG32_SOC15(GC, 0, mmGRBM_STATUS),
|
||||
GRBM_STATUS, GUI_ACTIVE))
|
||||
@@ -4127,7 +4127,7 @@ static int gfx_v9_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
for (i = 0; i < adev->usec_timeout; i++) {
|
||||
if (gfx_v9_0_is_idle(adev))
|
||||
if (gfx_v9_0_is_idle(ip_block))
|
||||
return 0;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
@@ -2408,9 +2408,9 @@ static int gfx_v9_4_3_resume(struct amdgpu_ip_block *ip_block)
|
||||
return gfx_v9_4_3_hw_init(ip_block);
|
||||
}
|
||||
|
||||
static bool gfx_v9_4_3_is_idle(void *handle)
|
||||
static bool gfx_v9_4_3_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, num_xcc;
|
||||
|
||||
num_xcc = NUM_XCC(adev->gfx.xcc_mask);
|
||||
@@ -2428,7 +2428,7 @@ static int gfx_v9_4_3_wait_for_idle(struct amdgpu_ip_block *ip_block)
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
for (i = 0; i < adev->usec_timeout; i++) {
|
||||
if (gfx_v9_4_3_is_idle(adev))
|
||||
if (gfx_v9_4_3_is_idle(ip_block))
|
||||
return 0;
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
@@ -1076,7 +1076,7 @@ static int gmc_v10_0_resume(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool gmc_v10_0_is_idle(void *handle)
|
||||
static bool gmc_v10_0_is_idle(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* MC is always ready in GMC v10.*/
|
||||
return true;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user