mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 18:51:21 +02:00
drm/amdgpu: support xcc harvest for ih translate
Support xcc harvest for ih translate to logic xcc. V2: Only check available instances Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
49f47cbf5f
commit
c9908d9c98
|
|
@ -700,14 +700,16 @@ static int gfx_v12_1_get_xccs_per_xcp(struct amdgpu_device *adev)
|
|||
|
||||
static int gfx_v12_1_ih_to_xcc_inst(struct amdgpu_device *adev, int ih_node)
|
||||
{
|
||||
int logic_xcc;
|
||||
int xcc = (ih_node & 0x7) - 2 + (ih_node >> 3) * 4;
|
||||
|
||||
if (xcc < 0 || xcc >= hweight8(adev->gfx.xcc_mask)) {
|
||||
dev_err(adev->dev, "Couldn't find xcc mapping from IH node");
|
||||
return -EINVAL;
|
||||
for (logic_xcc = 0; logic_xcc < NUM_XCC(adev->gfx.xcc_mask); logic_xcc++) {
|
||||
if (xcc == GET_INST(GC, logic_xcc))
|
||||
return logic_xcc;
|
||||
}
|
||||
|
||||
return xcc;
|
||||
dev_err(adev->dev, "Couldn't find xcc mapping from IH node");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static const struct amdgpu_gfx_funcs gfx_v12_1_gfx_funcs = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user