Merge "msm: vidc: remove usage of core 1"

This commit is contained in:
qctecmdr 2020-05-21 18:46:47 -07:00 committed by Gerrit - the friendly Code Review server
commit ca0e7dd803
2 changed files with 52 additions and 74 deletions

View File

@ -4045,74 +4045,53 @@ static int venus_hfi_get_core_capabilities(void *dev)
return rc;
}
static void __noc_error_info(struct venus_hfi_device *device, u32 core_num)
static void __noc_error_info_common(struct venus_hfi_device *device)
{
u32 vcodec_core_video_noc_base_offs, val;
u32 val = 0;
u32 sid = DEFAULT_SID;
if (!device) {
d_vpr_e("%s: null device\n", __func__);
return;
}
if (!core_num) {
vcodec_core_video_noc_base_offs =
VCODEC_CORE0_VIDEO_NOC_BASE_OFFS;
} else if (core_num == 1) {
vcodec_core_video_noc_base_offs =
VCODEC_CORE1_VIDEO_NOC_BASE_OFFS;
} else {
d_vpr_e("%s: invalid core_num %u\n", __func__, core_num);
return;
}
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_SWID_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_SWID_HIGH: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_MAINCTL_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG0_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG0_HIGH: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG1_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG1_HIGH: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG2_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG2_HIGH: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG3_LOW: %#x\n", core_num, val);
val = __read_register(device, vcodec_core_video_noc_base_offs +
VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS, sid);
d_vpr_e("CORE%d_NOC_ERR_ERRLOG3_HIGH: %#x\n", core_num, val);
}
static void __noc_error_info_common(struct venus_hfi_device *device)
{
const u32 core0 = 0, core1 = 1;
if (__read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_COREX_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS,
DEFAULT_SID))
__noc_error_info(device, core0);
if (__read_register(device, VCODEC_CORE1_VIDEO_NOC_BASE_OFFS +
VCODEC_COREX_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS,
DEFAULT_SID))
__noc_error_info(device, core1);
VCODEC_CORE0_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS,
DEFAULT_SID)) {
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_SWID_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_SWID_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_SWID_HIGH_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_SWID_HIGH: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_MAINCTL_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG0_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG0_HIGH: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG1_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG1_HIGH: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG2_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG2_HIGH: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG3_LOW: %#x\n", val);
val = __read_register(device, VCODEC_CORE0_VIDEO_NOC_BASE_OFFS +
VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS, sid);
d_vpr_e("VCODEC_NOC_ERR_ERRLOG3_HIGH: %#x\n", val);
}
}
static int venus_hfi_noc_error_info(void *dev)

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
*/
#ifndef __HFI_IO_COMMON_H__
@ -122,18 +122,17 @@
* --------------------------------------------------------------------------
*/
#define VCODEC_CORE0_VIDEO_NOC_BASE_OFFS 0x00004000
#define VCODEC_CORE1_VIDEO_NOC_BASE_OFFS 0x0000C000
#define VCODEC_COREX_VIDEO_NOC_ERR_SWID_LOW_OFFS 0x0500
#define VCODEC_COREX_VIDEO_NOC_ERR_SWID_HIGH_OFFS 0x0504
#define VCODEC_COREX_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS 0x0508
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS 0x0510
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRCLR_LOW_OFFS 0x0518
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS 0x0520
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS 0x0524
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS 0x0528
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS 0x052C
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS 0x0530
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS 0x0534
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS 0x0538
#define VCODEC_COREX_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS 0x053C
#define VCODEC_CORE0_VIDEO_NOC_ERR_SWID_LOW_OFFS 0x0500
#define VCODEC_CORE0_VIDEO_NOC_ERR_SWID_HIGH_OFFS 0x0504
#define VCODEC_CORE0_VIDEO_NOC_ERR_MAINCTL_LOW_OFFS 0x0508
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRVLD_LOW_OFFS 0x0510
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRCLR_LOW_OFFS 0x0518
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG0_LOW_OFFS 0x0520
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG0_HIGH_OFFS 0x0524
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG1_LOW_OFFS 0x0528
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG1_HIGH_OFFS 0x052C
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG2_LOW_OFFS 0x0530
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG2_HIGH_OFFS 0x0534
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG3_LOW_OFFS 0x0538
#define VCODEC_CORE0_VIDEO_NOC_ERR_ERRLOG3_HIGH_OFFS 0x053C
#endif