void kbase_hw_set_features_mask(kbase_device *kbdev) { const base_hw_feature *features; u32 gpu_id; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 9): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 2, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 3, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 1, 0, 0): features = base_hw_features_t76x; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 0, 0): features = base_hw_features_t72x; break; default: features = base_hw_features_generic; break; } for (; *features != BASE_HW_FEATURE_END; features++) set_bit(*features, &kbdev->hw_features_mask[0]); }
void kbase_hw_set_features_mask(struct kbase_device *kbdev) { const enum base_hw_feature *features; u32 gpu_id; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; gpu_id &= GPU_ID_VERSION_PRODUCT_ID; gpu_id = gpu_id >> GPU_ID_VERSION_PRODUCT_ID_SHIFT; switch (gpu_id) { case GPU_ID_PI_T76X: #ifdef MALI_INCLUDE_TFRX case GPU_ID_PI_TFRX: #endif /* MALI_INCLUDE_TFRX */ #ifdef MALI_INCLUDE_TF2X case GPU_ID_PI_TF2X: #endif /* MALI_INCLUDE_TF2X */ features = base_hw_features_t76x; break; case GPU_ID_PI_T72X: features = base_hw_features_t72x; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 1, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 1, 0): features = base_hw_features_t62x; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_15DEV0): case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_EAC): case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 1, 0): features = base_hw_features_t60x; break; default: features = base_hw_features_generic; break; } for (; *features != BASE_HW_FEATURE_END; features++) set_bit(*features, &kbdev->hw_features_mask[0]); }
int kbase_hw_set_issues_mask(struct kbase_device *kbdev) { const enum base_hw_issue *issues; u32 gpu_id; u32 product_id; u32 impl_tech; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; product_id = gpu_id & GPU_ID_VERSION_PRODUCT_ID; product_id >>= GPU_ID_VERSION_PRODUCT_ID_SHIFT; impl_tech = kbdev->gpu_props.props.thread_props.impl_tech; if (impl_tech != IMPLEMENTATION_MODEL) { switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_15DEV0): issues = base_hw_issues_t60x_r0p0_15dev0; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_EAC): issues = base_hw_issues_t60x_r0p0_eac; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 1, 0): issues = base_hw_issues_t60x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 1, 0): issues = base_hw_issues_t62x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 1): issues = base_hw_issues_t62x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 1, 0): issues = base_hw_issues_t62x_r1p1; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 1): issues = base_hw_issues_t76x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 1): issues = base_hw_issues_t76x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 9): issues = base_hw_issues_t76x_r0p1_50rel0; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 2, 1): issues = base_hw_issues_t76x_r0p2; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 3, 1): issues = base_hw_issues_t76x_r0p3; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 1, 0, 0): issues = base_hw_issues_t76x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 2): issues = base_hw_issues_t72x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 0, 0): issues = base_hw_issues_t72x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 1, 0): issues = base_hw_issues_t72x_r1p1; break; case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 1, 2): issues = base_hw_issues_tFRx_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 2, 0): issues = base_hw_issues_tFRx_r0p2; break; case GPU_ID_MAKE(GPU_ID_PI_TFRX, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_TFRX, 1, 0, 8): issues = base_hw_issues_tFRx_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_TFRX, 2, 0, 0): issues = base_hw_issues_tFRx_r2p0; break; case GPU_ID_MAKE(GPU_ID_PI_T86X, 0, 2, 0): issues = base_hw_issues_t86x_r0p2; break; case GPU_ID_MAKE(GPU_ID_PI_T86X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T86X, 1, 0, 8): issues = base_hw_issues_t86x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T86X, 2, 0, 0): issues = base_hw_issues_t86x_r2p0; break; case GPU_ID_MAKE(GPU_ID_PI_T83X, 0, 1, 0): issues = base_hw_issues_t83x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T83X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T83X, 1, 0, 8): issues = base_hw_issues_t83x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T82X, 0, 0, 0): issues = base_hw_issues_t82x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T82X, 0, 1, 0): issues = base_hw_issues_t82x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T82X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T82X, 1, 0, 8): issues = base_hw_issues_t82x_r1p0; break; default: dev_err(kbdev->dev, "Unknown GPU ID %x", gpu_id); return -EINVAL; } } else { /* Software model */ switch (product_id) { case GPU_ID_PI_T60X: issues = base_hw_issues_model_t60x; break; case GPU_ID_PI_T62X: issues = base_hw_issues_model_t62x; break; case GPU_ID_PI_T72X: issues = base_hw_issues_model_t72x; break; case GPU_ID_PI_T76X: issues = base_hw_issues_model_t76x; break; case GPU_ID_PI_TFRX: issues = base_hw_issues_model_tFRx; break; case GPU_ID_PI_T86X: issues = base_hw_issues_model_t86x; break; case GPU_ID_PI_T83X: issues = base_hw_issues_model_t83x; break; case GPU_ID_PI_T82X: issues = base_hw_issues_model_t82x; break; default: dev_err(kbdev->dev, "Unknown GPU ID %x", gpu_id); return -EINVAL; } } dev_info(kbdev->dev, "GPU identified as 0x%04x r%dp%d status %d", (gpu_id & GPU_ID_VERSION_PRODUCT_ID) >> GPU_ID_VERSION_PRODUCT_ID_SHIFT, (gpu_id & GPU_ID_VERSION_MAJOR) >> GPU_ID_VERSION_MAJOR_SHIFT, (gpu_id & GPU_ID_VERSION_MINOR) >> GPU_ID_VERSION_MINOR_SHIFT, (gpu_id & GPU_ID_VERSION_STATUS) >> GPU_ID_VERSION_STATUS_SHIFT); for (; *issues != BASE_HW_ISSUE_END; issues++) set_bit(*issues, &kbdev->hw_issues_mask[0]); return 0; }
mali_error kbase_hw_set_issues_mask(struct kbase_device *kbdev) { const enum base_hw_issue *issues; u32 gpu_id; u32 impl_tech; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; impl_tech = kbdev->gpu_props.props.thread_props.impl_tech; if (impl_tech != IMPLEMENTATION_MODEL) { switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_15DEV0): issues = base_hw_issues_t60x_r0p0_15dev0; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_EAC): issues = base_hw_issues_t60x_r0p0_eac; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 1, 0): issues = base_hw_issues_t60x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 1, 0): issues = base_hw_issues_t62x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 1): issues = base_hw_issues_t62x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 1, 0): issues = base_hw_issues_t62x_r1p1; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 0): issues = base_hw_issues_t76x_r0p0_beta; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 1): issues = base_hw_issues_t76x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 1): issues = base_hw_issues_t76x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 9): issues = base_hw_issues_t76x_r0p1_50rel0; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 2, 1): issues = base_hw_issues_t76x_r0p2; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 3, 1): issues = base_hw_issues_t76x_r0p3; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 1, 0, 0): issues = base_hw_issues_t76x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 2): issues = base_hw_issues_t72x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 0, 0): issues = base_hw_issues_t72x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 1, 0): issues = base_hw_issues_t72x_r1p1; break; #ifdef MALI_INCLUDE_TFRX case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 0, 1): issues = base_hw_issues_tFRx_r0p0; break; #endif /* MALI_INCLUDE_TFRX */ #ifdef MALI_INCLUDE_TF2X case GPU_ID_MAKE(GPU_ID_PI_TF2X, 0, 0, 1): issues = base_hw_issues_tF2x_r0p0; break; #endif /* MALI_INCLUDE_TF2X */ default: dev_err(kbdev->dev, "Unknown GPU ID %x", gpu_id); return MALI_ERROR_FUNCTION_FAILED; } } else { /* Software model */ switch (gpu_id >> GPU_ID_VERSION_PRODUCT_ID_SHIFT) { case GPU_ID_PI_T60X: case GPU_ID_PI_T62X: issues = base_hw_issues_model_t6xx; break; case GPU_ID_PI_T72X: issues = base_hw_issues_model_t72x; break; case GPU_ID_PI_T76X: issues = base_hw_issues_model_t7xx; break; #ifdef MALI_INCLUDE_TFRX case GPU_ID_PI_TFRX: issues = base_hw_issues_model_tFRx; break; #endif /* MALI_INCLUDE_TFRX */ #ifdef MALI_INCLUDE_TF2X case GPU_ID_PI_TF2X: issues = base_hw_issues_model_tF2x; break; #endif /* MALI_INCLUDE_TF2X */ default: dev_err(kbdev->dev, "Unknown GPU ID %x", gpu_id); return MALI_ERROR_FUNCTION_FAILED; } } dev_info(kbdev->dev, "GPU identified as 0x%04x r%dp%d status %d", (gpu_id & GPU_ID_VERSION_PRODUCT_ID) >> GPU_ID_VERSION_PRODUCT_ID_SHIFT, (gpu_id & GPU_ID_VERSION_MAJOR) >> GPU_ID_VERSION_MAJOR_SHIFT, (gpu_id & GPU_ID_VERSION_MINOR) >> GPU_ID_VERSION_MINOR_SHIFT, (gpu_id & GPU_ID_VERSION_STATUS) >> GPU_ID_VERSION_STATUS_SHIFT); for (; *issues != BASE_HW_ISSUE_END; issues++) set_bit(*issues, &kbdev->hw_issues_mask[0]); return MALI_ERROR_NONE; }
void kbase_hw_set_features_mask(struct kbase_device *kbdev) { const enum base_hw_feature *features; u32 gpu_id; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 1, 9): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 2, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 3, 1): case GPU_ID_MAKE(GPU_ID_PI_T76X, 1, 0, 0): #ifdef MALI_INCLUDE_TFRX case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_TFRX, 0, 0, 1): #endif /* MALI_INCLUDE_TFRX */ #ifdef MALI_INCLUDE_TF2X case GPU_ID_MAKE(GPU_ID_PI_TF2X, 0, 0, 1): #endif /* MALI_INCLUDE_TF2X */ features = base_hw_features_t76x; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 1): case GPU_ID_MAKE(GPU_ID_PI_T72X, 1, 0, 0): features = base_hw_features_t72x; break; default: features = base_hw_features_generic; break; } for (; *features != BASE_HW_FEATURE_END; features++) set_bit(*features, &kbdev->hw_features_mask[0]); }
mali_error kbase_hw_set_issues_mask(kbase_device *kbdev) { const base_hw_issue *issues; u32 gpu_id; u32 impl_tech; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; impl_tech = kbdev->gpu_props.props.thread_props.impl_tech; if (impl_tech != IMPLEMENTATION_MODEL) { switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_15DEV0): issues = base_hw_issues_t60x_r0p0_15dev0; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_EAC): issues = base_hw_issues_t60x_r0p0_eac; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 1, 0): issues = base_hw_issues_t60x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 1, 0): issues = base_hw_issues_t62x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 1): issues = base_hw_issues_t62x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T67X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T67X, 1, 0, 1): issues = base_hw_issues_t67x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 0): issues = base_hw_issues_t76x_r0p0_beta; break; case GPU_ID_MAKE(GPU_ID_PI_T76X, 0, 0, 1): issues = base_hw_issues_t76x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T72X, 0, 0, 1): issues = base_hw_issues_t72x_r0p0; break; default: KBASE_DEBUG_PRINT_ERROR(KBASE_CORE, "Unknown GPU ID %x", gpu_id); return MALI_ERROR_FUNCTION_FAILED; } } else { /* Software model */ switch (gpu_id >> GPU_ID_VERSION_PRODUCT_ID_SHIFT) { case GPU_ID_PI_T60X: case GPU_ID_PI_T62X: case GPU_ID_PI_T67X: issues = base_hw_issues_model_t6xx; break; case GPU_ID_PI_T72X: issues = base_hw_issues_model_t72x; break; case GPU_ID_PI_T76X: issues = base_hw_issues_model_t7xx; break; default: KBASE_DEBUG_PRINT_ERROR(KBASE_CORE, "Unknown GPU ID %x", gpu_id); return MALI_ERROR_FUNCTION_FAILED; } } KBASE_DEBUG_PRINT_INFO(KBASE_CORE, "GPU identified as 0x%04x r%dp%d status %d", (gpu_id & GPU_ID_VERSION_PRODUCT_ID) >> GPU_ID_VERSION_PRODUCT_ID_SHIFT, (gpu_id & GPU_ID_VERSION_MAJOR) >> GPU_ID_VERSION_MAJOR_SHIFT, (gpu_id & GPU_ID_VERSION_MINOR) >> GPU_ID_VERSION_MINOR_SHIFT, (gpu_id & GPU_ID_VERSION_STATUS) >> GPU_ID_VERSION_STATUS_SHIFT); for (; *issues != BASE_HW_ISSUE_END; issues++) set_bit(*issues, &kbdev->hw_issues_mask[0]); return MALI_ERROR_NONE; }
mali_error kbase_hw_set_issues_mask(kbase_device *kbdev) { const base_hw_issue *issues; u32 gpu_id; gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; switch (gpu_id) { case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_15DEV0): issues = base_hw_issues_t60x_r0p0_15dev0; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 0, GPU_ID_S_EAC): issues = base_hw_issues_t60x_r0p0_eac; break; case GPU_ID_MAKE(GPU_ID_PI_T60X, 0, 1, 0): issues = base_hw_issues_t60x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T65X, 0, 1, 0): issues = base_hw_issues_t65x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 0, 1): issues = base_hw_issues_t62x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 0, 1, 0): issues = base_hw_issues_t62x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T62X, 1, 0, 1): issues = base_hw_issues_t62x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T67X, 0, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T67X, 0, 0, 1): issues = base_hw_issues_t67x_r0p0; break; case GPU_ID_MAKE(GPU_ID_PI_T67X, 0, 1, 0): issues = base_hw_issues_t67x_r0p1; break; case GPU_ID_MAKE(GPU_ID_PI_T67X, 1, 0, 0): case GPU_ID_MAKE(GPU_ID_PI_T67X, 1, 0, 1): issues = base_hw_issues_t67x_r1p0; break; case GPU_ID_MAKE(GPU_ID_PI_T75X, 0, 0, 0): issues = base_hw_issues_t75x_r0p0; break; default: KBASE_DEBUG_PRINT_ERROR(KBASE_CORE, "Unknown GPU ID %x", gpu_id); return MALI_ERROR_FUNCTION_FAILED; } KBASE_DEBUG_PRINT_INFO(KBASE_CORE, "GPU identified as 0x%04x r%dp%d status %d", (gpu_id & GPU_ID_VERSION_PRODUCT_ID) >> GPU_ID_VERSION_PRODUCT_ID_SHIFT, (gpu_id & GPU_ID_VERSION_MAJOR) >> GPU_ID_VERSION_MAJOR_SHIFT, (gpu_id & GPU_ID_VERSION_MINOR) >> GPU_ID_VERSION_MINOR_SHIFT, (gpu_id & GPU_ID_VERSION_STATUS) >> GPU_ID_VERSION_STATUS_SHIFT); for (; *issues != BASE_HW_ISSUE_END; issues++) set_bit(*issues, &kbdev->hw_issues_mask[0]); return MALI_ERROR_NONE; }