Skip to content

Commit 392b35b

Browse files
sgruszkajlawryno
authored andcommitted
accel/ivpu: Remove support for 1 tile SKUs
The support for single tile SKUs was dropped from MTL. Note that we can still boot the VPU with 1-tile work point config - this is independent from number of tiles present in the VPU. Co-developed-by: Andrzej Kacprowski <[email protected]> Signed-off-by: Andrzej Kacprowski <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3d8b272 commit 392b35b

File tree

1 file changed

+18
-41
lines changed

1 file changed

+18
-41
lines changed

drivers/accel/ivpu/ivpu_hw_mtl.c

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
#include "ivpu_mmu.h"
1313
#include "ivpu_pm.h"
1414

15-
#define TILE_FUSE_ENABLE_BOTH 0x0
16-
#define TILE_FUSE_ENABLE_UPPER 0x1
17-
#define TILE_FUSE_ENABLE_LOWER 0x2
18-
19-
#define TILE_SKU_BOTH_MTL 0x3630
20-
#define TILE_SKU_LOWER_MTL 0x3631
21-
#define TILE_SKU_UPPER_MTL 0x3632
15+
#define TILE_FUSE_ENABLE_BOTH 0x0
16+
#define TILE_SKU_BOTH_MTL 0x3630
2217

2318
/* Work point configuration values */
24-
#define WP_CONFIG_1_TILE_5_3_RATIO 0x0101
25-
#define WP_CONFIG_1_TILE_4_3_RATIO 0x0102
26-
#define WP_CONFIG_2_TILE_5_3_RATIO 0x0201
27-
#define WP_CONFIG_2_TILE_4_3_RATIO 0x0202
28-
#define WP_CONFIG_0_TILE_PLL_OFF 0x0000
19+
#define CONFIG_1_TILE 0x01
20+
#define CONFIG_2_TILE 0x02
21+
#define PLL_RATIO_5_3 0x01
22+
#define PLL_RATIO_4_3 0x02
23+
#define WP_CONFIG(tile, ratio) (((tile) << 8) | (ratio))
24+
#define WP_CONFIG_1_TILE_5_3_RATIO WP_CONFIG(CONFIG_1_TILE, PLL_RATIO_5_3)
25+
#define WP_CONFIG_1_TILE_4_3_RATIO WP_CONFIG(CONFIG_1_TILE, PLL_RATIO_4_3)
26+
#define WP_CONFIG_2_TILE_5_3_RATIO WP_CONFIG(CONFIG_2_TILE, PLL_RATIO_5_3)
27+
#define WP_CONFIG_2_TILE_4_3_RATIO WP_CONFIG(CONFIG_2_TILE, PLL_RATIO_4_3)
28+
#define WP_CONFIG_0_TILE_PLL_OFF WP_CONFIG(0, 0)
2929

3030
#define PLL_REF_CLK_FREQ (50 * 1000000)
3131
#define PLL_SIMULATION_FREQ (10 * 1000000)
@@ -219,7 +219,8 @@ static int ivpu_pll_drive(struct ivpu_device *vdev, bool enable)
219219
config = 0;
220220
}
221221

222-
ivpu_dbg(vdev, PM, "PLL workpoint request: %d Hz\n", PLL_RATIO_TO_FREQ(target_ratio));
222+
ivpu_dbg(vdev, PM, "PLL workpoint request: config 0x%04x pll ratio 0x%x\n",
223+
config, target_ratio);
223224

224225
ret = ivpu_pll_cmd_send(vdev, hw->pll.min_ratio, hw->pll.max_ratio, target_ratio, config);
225226
if (ret) {
@@ -610,34 +611,10 @@ static int ivpu_boot_d0i3_drive(struct ivpu_device *vdev, bool enable)
610611
static int ivpu_hw_mtl_info_init(struct ivpu_device *vdev)
611612
{
612613
struct ivpu_hw_info *hw = vdev->hw;
613-
u32 tile_fuse;
614-
615-
tile_fuse = REGB_RD32(MTL_BUTTRESS_TILE_FUSE);
616-
if (!REG_TEST_FLD(MTL_BUTTRESS_TILE_FUSE, VALID, tile_fuse))
617-
ivpu_warn(vdev, "Tile Fuse: Invalid (0x%x)\n", tile_fuse);
618-
619-
hw->tile_fuse = REG_GET_FLD(MTL_BUTTRESS_TILE_FUSE, SKU, tile_fuse);
620-
switch (hw->tile_fuse) {
621-
case TILE_FUSE_ENABLE_LOWER:
622-
hw->sku = TILE_SKU_LOWER_MTL;
623-
hw->config = WP_CONFIG_1_TILE_5_3_RATIO;
624-
ivpu_dbg(vdev, MISC, "Tile Fuse: Enable Lower\n");
625-
break;
626-
case TILE_FUSE_ENABLE_UPPER:
627-
hw->sku = TILE_SKU_UPPER_MTL;
628-
hw->config = WP_CONFIG_1_TILE_4_3_RATIO;
629-
ivpu_dbg(vdev, MISC, "Tile Fuse: Enable Upper\n");
630-
break;
631-
case TILE_FUSE_ENABLE_BOTH:
632-
hw->sku = TILE_SKU_BOTH_MTL;
633-
hw->config = WP_CONFIG_2_TILE_5_3_RATIO;
634-
ivpu_dbg(vdev, MISC, "Tile Fuse: Enable Both\n");
635-
break;
636-
default:
637-
hw->config = WP_CONFIG_0_TILE_PLL_OFF;
638-
ivpu_dbg(vdev, MISC, "Tile Fuse: Disable\n");
639-
break;
640-
}
614+
615+
hw->tile_fuse = TILE_FUSE_ENABLE_BOTH;
616+
hw->sku = TILE_SKU_BOTH_MTL;
617+
hw->config = WP_CONFIG_2_TILE_4_3_RATIO;
641618

642619
ivpu_pll_init_frequency_ratios(vdev);
643620

0 commit comments

Comments
 (0)