Esempio n. 1
0
DISP_MODULE_ENUM dpmgr_path_get_dst_module(disp_path_handle dp_handle)
{
    ASSERT(dp_handle != NULL);
    ddp_path_handle handle = (ddp_path_handle)dp_handle;
    ASSERT((handle->scenario >= 0  && handle->scenario < DDP_SCENARIO_MAX));
    DISP_MODULE_ENUM dst_module = ddp_get_dst_module(handle->scenario);
    DISP_LOG_V("get dst module on scenario %s, module %s\n",
             ddp_get_scenario_name(handle->scenario),ddp_get_module_name(dst_module));
    return dst_module;
}
Esempio n. 2
0
// set display interface when kernel init
int ddp_set_dst_module(DDP_SCENARIO_ENUM scenario, DISP_MODULE_ENUM dst_module)
{
    int i = 0;
    DDPMSG("ddp_set_dst_module, scenario=%s, dst_module=%s \n", 
           ddp_get_scenario_name(scenario), ddp_get_module_name(dst_module));
    if (ddp_find_module_index(scenario,dst_module) > 0) {
        DDPDBG("%s is already on path\n",ddp_get_module_name(dst_module));
        return 0;
    }
    i = ddp_get_module_num_l(module_list_scenario[scenario])-1;
    ASSERT(i>=0);
    if (dst_module == DISP_MODULE_DSIDUAL) {
        if (i < (DDP_ENING_NUM -1)) {
            module_list_scenario[scenario][i++] = DISP_MODULE_SPLIT1;
        }else{
            DDPERR("set dst module over up bound\n");
            return -1;
        }
    }
    else
    {
        if(ddp_get_dst_module(scenario)==DISP_MODULE_DSIDUAL)
        {
            if (i >= 1) {
                module_list_scenario[scenario][i--] = -1;
            }else{
                DDPERR("set dst module over low bound\n");
                return -1;
            }
        }
    }
    module_list_scenario[scenario][i] = dst_module;
    if (scenario == DDP_SCENARIO_PRIMARY_ALL) {
        ddp_set_dst_module(DDP_SCENARIO_PRIMARY_DISP,dst_module);
    }else if(scenario==DDP_SCENARIO_SUB_ALL) {
        ddp_set_dst_module(DDP_SCENARIO_SUB_DISP,dst_module);
    }
    ddp_print_scenario(scenario);
    return 0;
}
Esempio n. 3
0
int disp_get_dst_module(DDP_SCENARIO_ENUM scenario)
{
    return ddp_get_dst_module(scenario);
}