Beispiel #1
0
u32 ddl_reset_hw(u32 mode)
{
	struct ddl_context *ddl_context;
	struct ddl_client_context *ddl;
	int i_client_num;

	VIDC_LOG_STRING("ddl_reset_hw:called");
	ddl_context = ddl_get_context();
	ddl_move_command_state(ddl_context, DDL_CMD_INVALID);
	DDL_BUSY(ddl_context);

	if (ddl_context->core_virtual_base_addr)
		vidc_720p_do_sw_reset();

	ddl_context->device_state = DDL_DEVICE_NOTINIT;
	for (i_client_num = 0; i_client_num < VCD_MAX_NO_CLIENT;
			++i_client_num) {
		ddl = ddl_context->ddl_clients[i_client_num];
		ddl_context->ddl_clients[i_client_num] = NULL;
		if (ddl) {
			ddl_release_client_internal_buffers(ddl);
			ddl_client_transact(DDL_FREE_CLIENT, &ddl);
		}
	}

	ddl_release_context_buffers(ddl_context);
	DDL_MEMSET(ddl_context, 0, sizeof(struct ddl_context));

	return true;
}
Beispiel #2
0
u32 ddl_reset_hw(u32 n_mode)
{
    struct ddl_context_type *p_ddl_context;
    struct ddl_client_context_type *p_ddl;
    int i_client_num;

    VIDC_LOG_STRING("ddl_reset_hw:called");
    p_ddl_context = ddl_get_context();
    ddl_move_command_state(p_ddl_context, DDL_CMD_INVALID);
    DDL_BUSY(p_ddl_context);

    if (NULL != p_ddl_context->p_core_virtual_base_addr)
        vidc_720p_do_sw_reset();

    p_ddl_context->n_device_state = DDL_DEVICE_NOTINIT;
    for (i_client_num = 0; i_client_num < VCD_MAX_NO_CLIENT;
            ++i_client_num) {
        p_ddl = p_ddl_context->a_ddl_clients[i_client_num];
        p_ddl_context->a_ddl_clients[i_client_num] = NULL;
        if (p_ddl) {
            ddl_release_client_internal_buffers(p_ddl);
            ddl_client_transact(DDL_FREE_CLIENT, &p_ddl);
        }
    }

    ddl_release_context_buffers(p_ddl_context);
    DDL_MEMSET(p_ddl_context, 0, sizeof(struct ddl_context_type));

    VIDC_LOG_BUFFER_INIT;
    return TRUE;
}