video: driver: Introduce DEVICE_CAPS cap in core database
Introduce DEVICE_CAPS capability to have different caps support for upstream and downstream driver. Change-Id: Ife73ab8c3b6ef9b47ef844883d9fa18e469d9188 Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
此提交包含在:
@@ -82,6 +82,8 @@ static struct msm_platform_core_capability core_data_anorak[] = {
|
||||
{NON_FATAL_FAULTS, 1},
|
||||
{ENC_AUTO_FRAMERATE, 1},
|
||||
{MMRM, 0},
|
||||
{DEVICE_CAPS, V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_META_CAPTURE |
|
||||
V4L2_CAP_STREAMING},
|
||||
};
|
||||
|
||||
static struct msm_platform_inst_capability instance_cap_data_anorak[] = {
|
||||
|
@@ -203,6 +203,7 @@ static struct msm_platform_core_capability core_data_kalama[] = {
|
||||
{STATS_TIMEOUT_MS, 2000},
|
||||
{NON_FATAL_FAULTS, 1},
|
||||
{ENC_AUTO_FRAMERATE, 1},
|
||||
{DEVICE_CAPS, V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING},
|
||||
};
|
||||
|
||||
static struct msm_platform_inst_capability instance_cap_data_kalama[] = {
|
||||
|
@@ -316,6 +316,8 @@ static struct msm_platform_core_capability core_data_kalama[] = {
|
||||
{NON_FATAL_FAULTS, 1},
|
||||
{ENC_AUTO_FRAMERATE, 1},
|
||||
{MMRM, 1},
|
||||
{DEVICE_CAPS, V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_META_CAPTURE |
|
||||
V4L2_CAP_STREAMING},
|
||||
};
|
||||
|
||||
static struct msm_platform_inst_capability instance_cap_data_kalama[] = {
|
||||
|
@@ -79,6 +79,8 @@ static struct msm_platform_core_capability core_data_waipio[] = {
|
||||
{NON_FATAL_FAULTS, 1},
|
||||
{ENC_AUTO_FRAMERATE, 1},
|
||||
{MMRM, 1},
|
||||
{DEVICE_CAPS, V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_META_CAPTURE |
|
||||
V4L2_CAP_STREAMING},
|
||||
};
|
||||
|
||||
static struct msm_platform_inst_capability instance_cap_data_waipio[] = {
|
||||
|
@@ -371,6 +371,7 @@ enum msm_vidc_core_capability_type {
|
||||
NON_FATAL_FAULTS,
|
||||
ENC_AUTO_FRAMERATE,
|
||||
MMRM,
|
||||
DEVICE_CAPS,
|
||||
CORE_CAP_MAX,
|
||||
};
|
||||
|
||||
|
@@ -165,6 +165,11 @@ static int msm_vidc_register_video_device(struct msm_vidc_core *core,
|
||||
|
||||
d_vpr_h("%s()\n", __func__);
|
||||
|
||||
if (!core || !core->capabilities) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (type == MSM_VIDC_DECODER) {
|
||||
index = 0;
|
||||
media_index = MEDIA_ENT_F_PROC_VIDEO_DECODER;
|
||||
@@ -185,10 +190,7 @@ static int msm_vidc_register_video_device(struct msm_vidc_core *core,
|
||||
core->vdev[index].vdev.vfl_dir = VFL_DIR_M2M;
|
||||
core->vdev[index].type = type;
|
||||
core->vdev[index].vdev.v4l2_dev = &core->v4l2_dev;
|
||||
core->vdev[index].vdev.device_caps =
|
||||
V4L2_CAP_VIDEO_M2M_MPLANE |
|
||||
V4L2_CAP_META_CAPTURE |
|
||||
V4L2_CAP_STREAMING;
|
||||
core->vdev[index].vdev.device_caps = core->capabilities[DEVICE_CAPS].value;
|
||||
rc = video_register_device(&core->vdev[index].vdev,
|
||||
VFL_TYPE_VIDEO, nr);
|
||||
if (rc) {
|
||||
|
新增問題並參考
封鎖使用者