Merge "video: driver: Update session priority setting"

This commit is contained in:
qctecmdr
2023-05-24 13:15:07 -07:00
کامیت شده توسط Gerrit - the friendly Code Review server
کامیت 2e53705d7c
4فایلهای تغییر یافته به همراه18 افزوده شده و 19 حذف شده

مشاهده پرونده

@@ -2478,27 +2478,26 @@ int msm_vidc_adjust_session_priority(void *instance, struct v4l2_ctrl *ctrl)
}
/*
* Priority handling
* Client will set 0 (realtime), 1+ (non-realtime)
* Driver adds NRT_PRIORITY_OFFSET (2) to clients non-realtime priority
* and hence PRIORITY values in the driver become 0, 3+.
* Driver may move decode realtime sessions to non-realtime by
* increasing priority by 1 to RT sessions in HW overloaded cases.
* So driver PRIORITY values can be 0, 1, 3+.
* Client will set 0 (realtime), (1 to 4) (non-realtime)
* When driver setting priority to firmware, driver adds
* FIRMWARE_PRIORITY_OFFSET (1) for all sessions except
* non-critical sessions. So finally firmware priority values ranges
* from 0 (Critical session), 1 (realtime session),
* 2+ (non-realtime session)
* (2 to 5) (non-realtime session).
* Driver may move decode realtime sessions to non-realtime by
* increasing priority by 1 to RT sessions in HW overloaded cases.
* Following will be priority based on requirement -
* ___________________________________________________________
* | Description | HAL Value |Driver value|FW Value|
* |_________________|__________________|____________|________|
* |Critical Priority| Vendor Extension | Via control| 0 |
* | RT | 0 | 0 | 1 |
* | NRT | -1 to -4 | 1-4 | 2-5 |
* |_________________|__________________|____________|________|
*/
if (ctrl) {
/* add offset when client sets non-realtime */
if (ctrl->val)
adjusted_value = ctrl->val + NRT_PRIORITY_OFFSET;
else
adjusted_value = ctrl->val;
} else {
adjusted_value = inst->capabilities[PRIORITY].value;
}
adjusted_value = ctrl ? ctrl->val :
inst->capabilities[PRIORITY].value;
msm_vidc_update_cap_value(inst, PRIORITY, adjusted_value, __func__);

مشاهده پرونده

@@ -1589,7 +1589,7 @@ static struct msm_platform_inst_capability instance_cap_data_kalama[] = {
CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
{PRIORITY, DEC|ENC, CODECS_ALL,
0, 1 + NRT_PRIORITY_OFFSET, 1, 1 + NRT_PRIORITY_OFFSET,
0, 4, 1, 4,
V4L2_CID_MPEG_VIDC_PRIORITY,
HFI_PROP_SESSION_PRIORITY,
CAP_FLAG_DYNAMIC_ALLOWED},

مشاهده پرونده

@@ -1693,7 +1693,7 @@ static struct msm_platform_inst_capability instance_cap_data_pineapple[] = {
CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
{PRIORITY, DEC|ENC, CODECS_ALL,
0, 1 + NRT_PRIORITY_OFFSET, 1, 1 + NRT_PRIORITY_OFFSET,
0, 4, 1, 4,
V4L2_CID_MPEG_VIDC_PRIORITY,
HFI_PROP_SESSION_PRIORITY,
CAP_FLAG_DYNAMIC_ALLOWED},

مشاهده پرونده

@@ -1208,7 +1208,7 @@ static struct msm_platform_inst_capability instance_cap_data_waipio[] = {
CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
{PRIORITY, DEC|ENC, CODECS_ALL,
0, 1 + NRT_PRIORITY_OFFSET, 1, 1 + NRT_PRIORITY_OFFSET,
0, 4, 1, 4,
0,
HFI_PROP_SESSION_PRIORITY,
CAP_FLAG_DYNAMIC_ALLOWED},