msm: eva: Support session creation via device node
Support creating eva session via device node "boot". It helps pre-silicon and kbdev based EVA bring up test. Change-Id: I66f4ccf730817afd8f00f8ffeb286c7d89a69a65 Signed-off-by: George Shen <sqiao@codeaurora.org>
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
#include "cvp_private.h"
|
#include "cvp_private.h"
|
||||||
#include "msm_cvp_clocks.h"
|
#include "msm_cvp_clocks.h"
|
||||||
#include "msm_cvp_dsp.h"
|
#include "msm_cvp_dsp.h"
|
||||||
|
#include "msm_cvp.h"
|
||||||
|
|
||||||
#define CLASS_NAME "cvp"
|
#define CLASS_NAME "cvp"
|
||||||
#define DRIVER_NAME "cvp"
|
#define DRIVER_NAME "cvp"
|
||||||
@@ -272,6 +273,25 @@ static ssize_t boot_store(struct device *dev,
|
|||||||
"Failed to close cvp instance\n");
|
"Failed to close cvp instance\n");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
} else if ((val == 2) && booted) {
|
||||||
|
struct msm_cvp_inst *inst;
|
||||||
|
|
||||||
|
inst = msm_cvp_open(MSM_CORE_CVP, MSM_CVP_USER);
|
||||||
|
if (!inst) {
|
||||||
|
dprintk(CVP_ERR,
|
||||||
|
"Failed to create eva instance\n");
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
rc = msm_cvp_session_create(inst);
|
||||||
|
if (rc)
|
||||||
|
dprintk(CVP_ERR, "Failed to create eva session\n");
|
||||||
|
|
||||||
|
rc = msm_cvp_close(inst);
|
||||||
|
if (rc) {
|
||||||
|
dprintk(CVP_ERR,
|
||||||
|
"Failed to close eva instance\n");
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
booted = 1;
|
booted = 1;
|
||||||
return count;
|
return count;
|
||||||
|
@@ -1053,7 +1053,7 @@ static int msm_cvp_unregister_buffer(struct msm_cvp_inst *inst,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msm_cvp_session_create(struct msm_cvp_inst *inst)
|
int msm_cvp_session_create(struct msm_cvp_inst *inst)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct synx_initialization_params params;
|
struct synx_initialization_params params;
|
||||||
@@ -1884,9 +1884,6 @@ int msm_cvp_session_init(struct msm_cvp_inst *inst)
|
|||||||
inst->clk_data.sys_cache_bw = 1000;
|
inst->clk_data.sys_cache_bw = 1000;
|
||||||
|
|
||||||
inst->prop.type = HFI_SESSION_CV;
|
inst->prop.type = HFI_SESSION_CV;
|
||||||
if (inst->session_type == MSM_CVP_KERNEL)
|
|
||||||
inst->prop.type = HFI_SESSION_DMM;
|
|
||||||
|
|
||||||
inst->prop.kernel_mask = 0xFFFFFFFF;
|
inst->prop.kernel_mask = 0xFFFFFFFF;
|
||||||
inst->prop.priority = 0;
|
inst->prop.priority = 0;
|
||||||
inst->prop.is_secure = 0;
|
inst->prop.is_secure = 0;
|
||||||
|
@@ -33,5 +33,6 @@ int msm_cvp_handle_syscall(struct msm_cvp_inst *inst, struct eva_kmd_arg *arg);
|
|||||||
int msm_cvp_session_init(struct msm_cvp_inst *inst);
|
int msm_cvp_session_init(struct msm_cvp_inst *inst);
|
||||||
int msm_cvp_session_deinit(struct msm_cvp_inst *inst);
|
int msm_cvp_session_deinit(struct msm_cvp_inst *inst);
|
||||||
int msm_cvp_session_queue_stop(struct msm_cvp_inst *inst);
|
int msm_cvp_session_queue_stop(struct msm_cvp_inst *inst);
|
||||||
|
int msm_cvp_session_create(struct msm_cvp_inst *inst);
|
||||||
int cvp_stop_clean_fence_queue(struct msm_cvp_inst *inst);
|
int cvp_stop_clean_fence_queue(struct msm_cvp_inst *inst);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user