video: driver: print error message from FW
print error message from FW during system error Change-Id: Id27469d786b647d2b61e8090fa1f4337b8bc79f6 Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:
@@ -184,10 +184,6 @@ static int __setup_ucregion_memory_map_iris2(struct msm_vidc_core *vidc_core)
|
|||||||
__write_register(core, QTBL_ADDR_IRIS2,
|
__write_register(core, QTBL_ADDR_IRIS2,
|
||||||
(u32)core->iface_q_table.align_device_addr);
|
(u32)core->iface_q_table.align_device_addr);
|
||||||
__write_register(core, QTBL_INFO_IRIS2, 0x01);
|
__write_register(core, QTBL_INFO_IRIS2, 0x01);
|
||||||
/* TODO: darshana, remove below comment later with FW support*/
|
|
||||||
/*if (core->sfr.align_device_addr)
|
|
||||||
__write_register(core, SFR_ADDR_IRIS2,
|
|
||||||
(u32)core->sfr.align_device_addr);*/
|
|
||||||
/* update queues vaddr for debug purpose */
|
/* update queues vaddr for debug purpose */
|
||||||
__write_register(core, CPU_CS_VCICMDARG0_IRIS2,
|
__write_register(core, CPU_CS_VCICMDARG0_IRIS2,
|
||||||
(u32)((u64)core->iface_q_table.align_virtual_addr));
|
(u32)((u64)core->iface_q_table.align_virtual_addr));
|
||||||
|
@@ -731,6 +731,11 @@ struct msm_vidc_ssr {
|
|||||||
enum msm_vidc_ssr_trigger_type ssr_type;
|
enum msm_vidc_ssr_trigger_type ssr_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct msm_vidc_sfr {
|
||||||
|
u32 bufSize;
|
||||||
|
u8 rg_data[1];
|
||||||
|
};
|
||||||
|
|
||||||
#define call_mem_op(c, op, ...) \
|
#define call_mem_op(c, op, ...) \
|
||||||
(((c) && (c)->mem_ops && (c)->mem_ops->op) ? \
|
(((c) && (c)->mem_ops && (c)->mem_ops->op) ? \
|
||||||
((c)->mem_ops->op(__VA_ARGS__)) : 0)
|
((c)->mem_ops->op(__VA_ARGS__)) : 0)
|
||||||
|
@@ -2578,6 +2578,48 @@ static int __sys_init(struct msm_vidc_core *core)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int __queue_sfr_buffer(struct msm_vidc_core *core)
|
||||||
|
{
|
||||||
|
int rc = 0;
|
||||||
|
struct hfi_buffer buf;
|
||||||
|
|
||||||
|
memset(&buf, 0, sizeof(struct hfi_buffer));
|
||||||
|
buf.type = HFI_BUFFER_SFR;
|
||||||
|
buf.index = 0;
|
||||||
|
buf.base_address = core->sfr.align_device_addr;
|
||||||
|
buf.addr_offset = 0;
|
||||||
|
buf.buffer_size = core->sfr.mem_size;
|
||||||
|
buf.data_offset = 0;
|
||||||
|
buf.data_size = 0;
|
||||||
|
buf.timestamp = 0;
|
||||||
|
buf.flags = 0;
|
||||||
|
|
||||||
|
rc = hfi_create_header(core->packet, core->packet_size,
|
||||||
|
0, core->header_id++);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
rc = hfi_create_packet(core->packet,
|
||||||
|
core->packet_size,
|
||||||
|
HFI_CMD_BUFFER,
|
||||||
|
HFI_BUF_HOST_FLAG_NONE,
|
||||||
|
HFI_PAYLOAD_STRUCTURE,
|
||||||
|
HFI_PORT_NONE,
|
||||||
|
core->packet_id++,
|
||||||
|
&buf,
|
||||||
|
sizeof(buf));
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
rc = __iface_cmdq_write(core, core->packet);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
d_vpr_h("SFR buffer packet queued\n");
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
static int __sys_image_version(struct msm_vidc_core *core)
|
static int __sys_image_version(struct msm_vidc_core *core)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
@@ -2640,6 +2682,10 @@ int venus_hfi_core_init(struct msm_vidc_core *core)
|
|||||||
if (rc)
|
if (rc)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
rc = __queue_sfr_buffer(core);
|
||||||
|
if (rc)
|
||||||
|
goto error;
|
||||||
|
|
||||||
rc = __sys_image_version(core);
|
rc = __sys_image_version(core);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto error;
|
goto error;
|
||||||
|
@@ -28,6 +28,29 @@ void print_psc_properties(u32 tag, const char *str, struct msm_vidc_inst *inst,
|
|||||||
subsc_params.tier);
|
subsc_params.tier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void print_sfr_message(struct msm_vidc_core *core)
|
||||||
|
{
|
||||||
|
struct msm_vidc_sfr *vsfr = NULL;
|
||||||
|
u32 vsfr_size = 0;
|
||||||
|
void *p = NULL;
|
||||||
|
|
||||||
|
vsfr = (struct msm_vidc_sfr *)core->sfr.align_virtual_addr;
|
||||||
|
if (vsfr) {
|
||||||
|
if (vsfr->bufSize != core->sfr.mem_size) {
|
||||||
|
d_vpr_e("Invalid SFR buf size %d actual %d\n",
|
||||||
|
vsfr->bufSize, core->sfr.mem_size);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vsfr_size = vsfr->bufSize - sizeof(u32);
|
||||||
|
p = memchr(vsfr->rg_data, '\0', vsfr_size);
|
||||||
|
/* SFR isn't guaranteed to be NULL terminated */
|
||||||
|
if (p == NULL)
|
||||||
|
vsfr->rg_data[vsfr_size - 1] = '\0';
|
||||||
|
|
||||||
|
d_vpr_e("SFR Message from FW: %s\n", vsfr->rg_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
u32 vidc_port_from_hfi(struct msm_vidc_inst *inst,
|
u32 vidc_port_from_hfi(struct msm_vidc_inst *inst,
|
||||||
enum hfi_packet_port_type hfi_port)
|
enum hfi_packet_port_type hfi_port)
|
||||||
{
|
{
|
||||||
@@ -239,6 +262,7 @@ static int handle_system_error(struct msm_vidc_core *core,
|
|||||||
struct hfi_packet *pkt)
|
struct hfi_packet *pkt)
|
||||||
{
|
{
|
||||||
d_vpr_e("%s: system error received\n", __func__);
|
d_vpr_e("%s: system error received\n", __func__);
|
||||||
|
print_sfr_message(core);
|
||||||
msm_vidc_core_deinit(core, true);
|
msm_vidc_core_deinit(core, true);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user