mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
msm: vidc: revise debug levels
Clean up debug log levels as:
1. Revise VIDC_WARN to VIDC_ERR;
2. Revise VIDC_PROF as VIDC_PERF;
3. Mark some one-time logs, e.g most of logs
in initialization and deinitialization as VIDC_HIGH;
4. Keep VIDC_PKT;
5. All other logs change to VIDC_LOW;
Change-Id: I8fc30f97dc3424da8418aab00e8af074ec8d4ef9
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
This commit is contained in:
parent
31bb5f19a0
commit
2f4c502bab
20 changed files with 666 additions and 671 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -193,7 +193,7 @@ void __power_off_iris2(struct venus_hfi_device *device)
|
|||
__read_register(device,
|
||||
AON_WRAPPER_MVP_NOC_LPI_STATUS);
|
||||
reg_status = lpi_status & BIT(0);
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Noc: lpi_status %d noc_status %d (count %d)\n",
|
||||
lpi_status, reg_status, count);
|
||||
usleep_range(50, 100);
|
||||
|
|
@ -213,7 +213,7 @@ void __power_off_iris2(struct venus_hfi_device *device)
|
|||
lpi_status = __read_register(device,
|
||||
WRAPPER_DEBUG_BRIDGE_LPI_STATUS_IRIS2);
|
||||
reg_status = lpi_status & 0x7;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"DBLP Set : lpi_status %d reg_status %d (count %d)\n",
|
||||
lpi_status, reg_status, count);
|
||||
usleep_range(50, 100);
|
||||
|
|
@ -232,7 +232,7 @@ void __power_off_iris2(struct venus_hfi_device *device)
|
|||
while (lpi_status && count < max_count) {
|
||||
lpi_status = __read_register(device,
|
||||
WRAPPER_DEBUG_BRIDGE_LPI_STATUS_IRIS2);
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"DBLP Release: lpi_status %d(count %d)\n",
|
||||
lpi_status, count);
|
||||
usleep_range(50, 100);
|
||||
|
|
@ -252,10 +252,10 @@ void __power_off_iris2(struct venus_hfi_device *device)
|
|||
|
||||
/* HPG 6.1.2 Step 5 */
|
||||
if (__disable_regulators(device))
|
||||
dprintk(VIDC_WARN, "Failed to disable regulators\n");
|
||||
dprintk(VIDC_ERR, "Failed to disable regulators\n");
|
||||
|
||||
if (__unvote_buses(device))
|
||||
dprintk(VIDC_WARN, "Failed to unvote for buses\n");
|
||||
dprintk(VIDC_ERR, "Failed to unvote for buses\n");
|
||||
device->power_enabled = false;
|
||||
}
|
||||
|
||||
|
|
@ -272,20 +272,20 @@ int __prepare_pc_iris2(struct venus_hfi_device *device)
|
|||
idle_status = ctrl_status & BIT(30);
|
||||
|
||||
if (pc_ready) {
|
||||
dprintk(VIDC_DBG, "Already in pc_ready state\n");
|
||||
dprintk(VIDC_HIGH, "Already in pc_ready state\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
wfi_status = BIT(0) & __read_register(device,
|
||||
WRAPPER_TZ_CPU_STATUS);
|
||||
if (!wfi_status || !idle_status) {
|
||||
dprintk(VIDC_WARN, "Skipping PC, wfi status not set\n");
|
||||
dprintk(VIDC_ERR, "Skipping PC, wfi status not set\n");
|
||||
goto skip_power_off;
|
||||
}
|
||||
|
||||
rc = __prepare_pc(device);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "Failed __prepare_pc %d\n", rc);
|
||||
dprintk(VIDC_ERR, "Failed __prepare_pc %d\n", rc);
|
||||
goto skip_power_off;
|
||||
}
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ int __prepare_pc_iris2(struct venus_hfi_device *device)
|
|||
return rc;
|
||||
|
||||
skip_power_off:
|
||||
dprintk(VIDC_WARN, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n",
|
||||
dprintk(VIDC_ERR, "Skip PC, wfi=%#x, idle=%#x, pcr=%#x, ctrl=%#x)\n",
|
||||
wfi_status, idle_status, pc_ready, ctrl_status);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
|
@ -377,7 +377,7 @@ void __core_clear_interrupt_iris2(struct venus_hfi_device *device)
|
|||
if (intr_status & mask) {
|
||||
device->intr_status |= intr_status;
|
||||
device->reg_count++;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_LOW,
|
||||
"INTERRUPT for device: %pK: times: %d interrupt_status: %d\n",
|
||||
device, device->reg_count, intr_status);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ enum hal_video_codec vidc_get_hal_codec(u32 hfi_codec)
|
|||
hal_codec = HAL_VIDEO_CODEC_CVP;
|
||||
break;
|
||||
default:
|
||||
dprintk(VIDC_INFO, "%s: invalid codec 0x%x\n",
|
||||
dprintk(VIDC_HIGH, "%s: invalid codec 0x%x\n",
|
||||
__func__, hfi_codec);
|
||||
hal_codec = 0;
|
||||
break;
|
||||
|
|
@ -135,7 +135,7 @@ u32 vidc_get_hfi_codec(enum hal_video_codec hal_codec)
|
|||
hfi_codec = HFI_VIDEO_CODEC_CVP;
|
||||
break;
|
||||
default:
|
||||
dprintk(VIDC_INFO, "%s: invalid codec 0x%x\n",
|
||||
dprintk(VIDC_HIGH, "%s: invalid codec 0x%x\n",
|
||||
__func__, hal_codec);
|
||||
hfi_codec = 0;
|
||||
break;
|
||||
|
|
@ -207,7 +207,7 @@ int create_pkt_cmd_sys_coverage_config(
|
|||
pkt->num_properties = 1;
|
||||
pkt->rg_property_data[0] = HFI_PROPERTY_SYS_CONFIG_COVERAGE;
|
||||
pkt->rg_property_data[1] = mode;
|
||||
dprintk(VIDC_DBG, "Firmware coverage mode %d\n",
|
||||
dprintk(VIDC_HIGH, "Firmware coverage mode %d\n",
|
||||
pkt->rg_property_data[1]);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -256,7 +256,7 @@ int create_pkt_cmd_sys_set_resource(
|
|||
|
||||
for (i = 0; i < hfi_sc_info->num_entries; i++) {
|
||||
hfi_sc[i] = res_sc[i];
|
||||
dprintk(VIDC_DBG, "entry hfi#%d, sc_id %d, size %d\n",
|
||||
dprintk(VIDC_HIGH, "entry hfi#%d, sc_id %d, size %d\n",
|
||||
i, hfi_sc[i].sc_id, hfi_sc[i].size);
|
||||
}
|
||||
break;
|
||||
|
|
@ -297,7 +297,7 @@ int create_pkt_cmd_sys_release_resource(
|
|||
rc = -ENOTSUPP;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"rel_res: pkt_type 0x%x res_type 0x%x prepared\n",
|
||||
pkt->packet_type, pkt->resource_type);
|
||||
|
||||
|
|
@ -785,7 +785,7 @@ int create_pkt_cmd_session_set_property(
|
|||
if (size && pdata)
|
||||
memcpy(&pkt->rg_property_data[1], pdata, size);
|
||||
|
||||
dprintk(VIDC_DBG, "Setting HAL Property = 0x%x\n", ptype);
|
||||
dprintk(VIDC_HIGH, "Setting HAL Property = 0x%x\n", ptype);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -804,7 +804,7 @@ static int get_hfi_ssr_type(enum hal_ssr_trigger_type type)
|
|||
rc = HFI_TEST_SSR_HW_WDOG_IRQ;
|
||||
break;
|
||||
default:
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"SSR trigger type not recognized, using WDOG.\n");
|
||||
}
|
||||
return rc;
|
||||
|
|
@ -881,7 +881,7 @@ static struct hfi_packetization_ops hfi_default = {
|
|||
struct hfi_packetization_ops *hfi_get_pkt_ops_handle(
|
||||
enum hfi_packetization_type type)
|
||||
{
|
||||
dprintk(VIDC_DBG, "%s selected\n",
|
||||
dprintk(VIDC_HIGH, "%s selected\n",
|
||||
type == HFI_PACKETIZATION_4XX ?
|
||||
"4xx packetization" : "Unknown hfi");
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
(struct hfi_frame_size *) data_ptr;
|
||||
event_notify.width = frame_sz->width;
|
||||
event_notify.height = frame_sz->height;
|
||||
dprintk(VIDC_DBG, "height: %d width: %d\n",
|
||||
dprintk(VIDC_HIGH, "height: %d width: %d\n",
|
||||
frame_sz->height, frame_sz->width);
|
||||
data_ptr +=
|
||||
sizeof(struct hfi_frame_size);
|
||||
|
|
@ -152,7 +152,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
(struct hfi_profile_level *) data_ptr;
|
||||
event_notify.profile = profile_level->profile;
|
||||
event_notify.level = profile_level->level;
|
||||
dprintk(VIDC_DBG, "profile: %d level: %d\n",
|
||||
dprintk(VIDC_HIGH, "profile: %d level: %d\n",
|
||||
profile_level->profile,
|
||||
profile_level->level);
|
||||
data_ptr +=
|
||||
|
|
@ -184,7 +184,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
MSM_VIDC_BIT_DEPTH_10;
|
||||
else
|
||||
event_notify.bit_depth = luma_bit_depth;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"bitdepth(%d), luma_bit_depth(%d), chroma_bit_depth(%d)\n",
|
||||
event_notify.bit_depth, luma_bit_depth,
|
||||
chroma_bit_depth);
|
||||
|
|
@ -195,7 +195,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
pic_struct = (struct hfi_pic_struct *) data_ptr;
|
||||
event_notify.pic_struct =
|
||||
pic_struct->progressive_only;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Progressive only flag: %d\n",
|
||||
pic_struct->progressive_only);
|
||||
data_ptr +=
|
||||
|
|
@ -207,7 +207,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
(struct hfi_colour_space *) data_ptr;
|
||||
event_notify.colour_space =
|
||||
colour_info->colour_space;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Colour space value is: %d\n",
|
||||
colour_info->colour_space);
|
||||
data_ptr +=
|
||||
|
|
@ -217,7 +217,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
data_ptr = data_ptr + sizeof(u32);
|
||||
entropy_mode = *(u32 *)data_ptr;
|
||||
event_notify.entropy_mode = entropy_mode;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Entropy Mode: 0x%x\n", entropy_mode);
|
||||
data_ptr +=
|
||||
sizeof(u32);
|
||||
|
|
@ -229,7 +229,7 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
data_ptr;
|
||||
event_notify.capture_buf_count =
|
||||
buf_req->buffer_count_min;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Capture Count : 0x%x\n",
|
||||
event_notify.capture_buf_count);
|
||||
data_ptr +=
|
||||
|
|
@ -245,11 +245,11 @@ static int hfi_process_sess_evt_seq_changed(u32 device_id,
|
|||
event_notify.crop_data.width = crop_info->width;
|
||||
event_notify.crop_data.height =
|
||||
crop_info->height;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"CROP info : Left = %d Top = %d\n",
|
||||
crop_info->left,
|
||||
crop_info->top);
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"CROP info : Width = %d Height = %d\n",
|
||||
crop_info->width,
|
||||
crop_info->height);
|
||||
|
|
@ -280,7 +280,7 @@ static int hfi_process_evt_release_buffer_ref(u32 device_id,
|
|||
struct msm_vidc_cb_event event_notify = {0};
|
||||
struct hfi_msg_release_buffer_ref_event_packet *data;
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_LOW,
|
||||
"RECEIVED: EVENT_NOTIFY - release_buffer_reference\n");
|
||||
if (sizeof(struct hfi_msg_event_notify_packet)
|
||||
> pkt->size) {
|
||||
|
|
@ -329,13 +329,13 @@ static int hfi_process_session_error(u32 device_id,
|
|||
cmd_done.session_id = (void *)(uintptr_t)pkt->session_id;
|
||||
cmd_done.status = hfi_map_err_status(pkt->event_data1);
|
||||
info->response.cmd = cmd_done;
|
||||
dprintk(VIDC_INFO, "Received: SESSION_ERROR with event id : %#x %#x\n",
|
||||
dprintk(VIDC_HIGH, "Received: SESSION_ERROR with event id : %#x %#x\n",
|
||||
pkt->event_data1, pkt->event_data2);
|
||||
switch (pkt->event_data1) {
|
||||
/* Ignore below errors */
|
||||
case HFI_ERR_SESSION_INVALID_SCALE_FACTOR:
|
||||
case HFI_ERR_SESSION_UPSCALE_NOT_SUPPORTED:
|
||||
dprintk(VIDC_INFO, "Non Fatal: HFI_EVENT_SESSION_ERROR\n");
|
||||
dprintk(VIDC_HIGH, "Non Fatal: HFI_EVENT_SESSION_ERROR\n");
|
||||
info->response_type = HAL_RESPONSE_UNUSED;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -354,7 +354,7 @@ static int hfi_process_event_notify(u32 device_id,
|
|||
struct msm_vidc_cb_info *info)
|
||||
{
|
||||
struct hfi_msg_event_notify_packet *pkt = _pkt;
|
||||
dprintk(VIDC_DBG, "Received: EVENT_NOTIFY\n");
|
||||
dprintk(VIDC_LOW, "Received: EVENT_NOTIFY\n");
|
||||
|
||||
if (pkt->size < sizeof(struct hfi_msg_event_notify_packet)) {
|
||||
dprintk(VIDC_ERR, "Invalid Params\n");
|
||||
|
|
@ -367,17 +367,17 @@ static int hfi_process_event_notify(u32 device_id,
|
|||
pkt->event_data1, pkt->event_data2);
|
||||
return hfi_process_sys_error(device_id, pkt, info);
|
||||
case HFI_EVENT_SESSION_ERROR:
|
||||
dprintk(VIDC_INFO, "HFI_EVENT_SESSION_ERROR[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "HFI_EVENT_SESSION_ERROR[%#x]\n",
|
||||
pkt->session_id);
|
||||
return hfi_process_session_error(device_id, pkt, info);
|
||||
|
||||
case HFI_EVENT_SESSION_SEQUENCE_CHANGED:
|
||||
dprintk(VIDC_INFO, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "HFI_EVENT_SESSION_SEQUENCE_CHANGED[%#x]\n",
|
||||
pkt->session_id);
|
||||
return hfi_process_sess_evt_seq_changed(device_id, pkt, info);
|
||||
|
||||
case HFI_EVENT_RELEASE_BUFFER_REFERENCE:
|
||||
dprintk(VIDC_INFO, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%#x]\n",
|
||||
dprintk(VIDC_LOW, "HFI_EVENT_RELEASE_BUFFER_REFERENCE[%#x]\n",
|
||||
pkt->session_id);
|
||||
return hfi_process_evt_release_buffer_ref(device_id, pkt, info);
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ static int hfi_process_sys_init_done(u32 device_id,
|
|||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
enum vidc_status status = VIDC_ERR_NONE;
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SYS_INIT_DONE\n");
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SYS_INIT_DONE\n");
|
||||
if (sizeof(struct hfi_msg_sys_init_done_packet) > pkt->size) {
|
||||
dprintk(VIDC_ERR, "%s: bad_pkt_size: %d\n", __func__,
|
||||
pkt->size);
|
||||
|
|
@ -430,7 +430,7 @@ static int hfi_process_sys_rel_resource_done(u32 device_id,
|
|||
enum vidc_status status = VIDC_ERR_NONE;
|
||||
u32 pkt_size;
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n");
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SYS_RELEASE_RESOURCE_DONE\n");
|
||||
pkt_size = sizeof(struct hfi_msg_sys_release_resource_done_packet);
|
||||
if (pkt_size > pkt->size) {
|
||||
dprintk(VIDC_ERR,
|
||||
|
|
@ -485,7 +485,7 @@ static void hfi_process_sess_get_prop_buf_req(
|
|||
}
|
||||
|
||||
while (req_bytes) {
|
||||
dprintk(VIDC_DBG, "got buffer requirements for: %d\n",
|
||||
dprintk(VIDC_HIGH, "got buffer requirements for: %d\n",
|
||||
hfi_buf_req->buffer_type);
|
||||
switch (hfi_buf_req->buffer_type) {
|
||||
case HFI_BUFFER_INPUT:
|
||||
|
|
@ -576,7 +576,7 @@ static int hfi_process_session_prop_info(u32 device_id,
|
|||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
struct buffer_requirements buff_req = { { {0} } };
|
||||
|
||||
dprintk(VIDC_DBG, "Received SESSION_PROPERTY_INFO[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "Received SESSION_PROPERTY_INFO[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (pkt->size < sizeof(struct hfi_msg_session_property_info_packet)) {
|
||||
|
|
@ -603,7 +603,7 @@ static int hfi_process_session_prop_info(u32 device_id,
|
|||
|
||||
return 0;
|
||||
default:
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"hal_process_session_prop_info: unknown_prop_id: %x\n",
|
||||
pkt->rg_property_data[0]);
|
||||
return -ENOTSUPP;
|
||||
|
|
@ -617,7 +617,7 @@ static int hfi_process_session_init_done(u32 device_id,
|
|||
struct hfi_msg_sys_session_init_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_INIT_DONE[%x]\n", pkt->session_id);
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_INIT_DONE[%x]\n", pkt->session_id);
|
||||
|
||||
if (sizeof(struct hfi_msg_sys_session_init_done_packet) > pkt->size) {
|
||||
dprintk(VIDC_ERR,
|
||||
|
|
@ -642,7 +642,7 @@ static int hfi_process_session_load_res_done(u32 device_id,
|
|||
struct hfi_msg_session_load_resources_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_LOAD_RESOURCES_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (sizeof(struct hfi_msg_session_load_resources_done_packet) !=
|
||||
|
|
@ -671,7 +671,7 @@ static int hfi_process_session_flush_done(u32 device_id,
|
|||
struct hfi_msg_session_flush_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_FLUSH_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_FLUSH_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (sizeof(struct hfi_msg_session_flush_done_packet) != pkt->size) {
|
||||
|
|
@ -716,7 +716,7 @@ static int hfi_process_session_etb_done(u32 device_id,
|
|||
struct msm_vidc_cb_data_done data_done = {0};
|
||||
struct hfi_picture_type *hfi_picture_type = NULL;
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_ETB_DONE[%#x]\n", pkt->session_id);
|
||||
dprintk(VIDC_LOW, "RECEIVED: SESSION_ETB_DONE[%#x]\n", pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size <
|
||||
sizeof(struct hfi_msg_session_empty_buffer_done_packet)) {
|
||||
|
|
@ -749,7 +749,7 @@ static int hfi_process_session_etb_done(u32 device_id,
|
|||
data_done.input_done.flags =
|
||||
hfi_picture_type->picture_type;
|
||||
else
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_LOW,
|
||||
"Non-Sync frame sent for H264/HEVC\n");
|
||||
}
|
||||
|
||||
|
|
@ -791,7 +791,7 @@ static int hfi_process_session_ftb_done(
|
|||
struct hfi_msg_session_fill_buffer_done_compressed_packet *pkt =
|
||||
(struct hfi_msg_session_fill_buffer_done_compressed_packet *)
|
||||
msg_hdr;
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%#x]\n",
|
||||
dprintk(VIDC_LOW, "RECEIVED: SESSION_FTB_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
if (sizeof(struct
|
||||
hfi_msg_session_fill_buffer_done_compressed_packet)
|
||||
|
|
@ -831,7 +831,7 @@ static int hfi_process_session_ftb_done(
|
|||
(struct hfi_msg_session_fbd_uncompressed_plane0_packet *)
|
||||
msg_hdr;
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_FTB_DONE[%#x]\n",
|
||||
dprintk(VIDC_LOW, "RECEIVED: SESSION_FTB_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
if (sizeof(
|
||||
struct hfi_msg_session_fbd_uncompressed_plane0_packet) >
|
||||
|
|
@ -895,7 +895,7 @@ static int hfi_process_session_start_done(u32 device_id,
|
|||
struct hfi_msg_session_start_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_START_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_START_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size !=
|
||||
|
|
@ -922,7 +922,7 @@ static int hfi_process_session_stop_done(u32 device_id,
|
|||
struct hfi_msg_session_stop_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_STOP_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_STOP_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size !=
|
||||
|
|
@ -950,7 +950,7 @@ static int hfi_process_session_rel_res_done(u32 device_id,
|
|||
struct hfi_msg_session_release_resources_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_RELEASE_RESOURCES_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size !=
|
||||
|
|
@ -984,7 +984,7 @@ static int hfi_process_session_rel_buf_done(u32 device_id,
|
|||
pkt ? pkt->size : 0);
|
||||
return -E2BIG;
|
||||
}
|
||||
dprintk(VIDC_DBG, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED:SESSION_RELEASE_BUFFER_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
cmd_done.device_id = device_id;
|
||||
|
|
@ -1014,7 +1014,7 @@ static int hfi_process_session_register_buffer_done(u32 device_id,
|
|||
__func__, pkt ? pkt->size : 0);
|
||||
return -E2BIG;
|
||||
}
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_REGISTER_BUFFERS_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_REGISTER_BUFFERS_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
cmd_done.device_id = device_id;
|
||||
|
|
@ -1042,7 +1042,7 @@ static int hfi_process_session_unregister_buffer_done(u32 device_id,
|
|||
__func__, pkt ? pkt->size : 0);
|
||||
return -E2BIG;
|
||||
}
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_UNREGISTER_BUFFERS_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_UNREGISTER_BUFFERS_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
cmd_done.device_id = device_id;
|
||||
|
|
@ -1064,7 +1064,7 @@ static int hfi_process_session_end_done(u32 device_id,
|
|||
struct hfi_msg_sys_session_end_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_END_DONE[%#x]\n", pkt->session_id);
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_END_DONE[%#x]\n", pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size !=
|
||||
sizeof(struct hfi_msg_sys_session_end_done_packet)) {
|
||||
|
|
@ -1090,7 +1090,7 @@ static int hfi_process_session_abort_done(u32 device_id,
|
|||
struct hfi_msg_sys_session_abort_done_packet *pkt = _pkt;
|
||||
struct msm_vidc_cb_cmd_done cmd_done = {0};
|
||||
|
||||
dprintk(VIDC_DBG, "RECEIVED: SESSION_ABORT_DONE[%#x]\n",
|
||||
dprintk(VIDC_HIGH, "RECEIVED: SESSION_ABORT_DONE[%#x]\n",
|
||||
pkt->session_id);
|
||||
|
||||
if (!pkt || pkt->size !=
|
||||
|
|
@ -1142,7 +1142,7 @@ static void hfi_process_sys_get_prop_image_version(
|
|||
version[i] = ' ';
|
||||
}
|
||||
version[i] = '\0';
|
||||
dprintk(VIDC_DBG, "F/W version: %s\n", version);
|
||||
dprintk(VIDC_HIGH, "F/W version: %s\n", version);
|
||||
|
||||
smem_table_ptr = qcom_smem_get(QCOM_SMEM_HOST_ANY,
|
||||
SMEM_IMAGE_VERSION_TABLE, &smem_block_size);
|
||||
|
|
@ -1179,7 +1179,7 @@ static int hfi_process_sys_property_info(u32 device_id,
|
|||
};
|
||||
return 0;
|
||||
default:
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: unknown_prop_id: %x\n",
|
||||
__func__, pkt->rg_property_data[0]);
|
||||
return -ENOTSUPP;
|
||||
|
|
@ -1210,7 +1210,7 @@ int hfi_process_msg_packet(u32 device_id, struct vidc_hal_msg_pkt_hdr *msg_hdr,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "Parse response %#x\n", msg_hdr->packet);
|
||||
dprintk(VIDC_LOW, "Parse response %#x\n", msg_hdr->packet);
|
||||
switch (msg_hdr->packet) {
|
||||
case HFI_MSG_EVENT_NOTIFY:
|
||||
pkt_func = (pkt_func_def)hfi_process_event_notify;
|
||||
|
|
@ -1272,7 +1272,7 @@ int hfi_process_msg_packet(u32 device_id, struct vidc_hal_msg_pkt_hdr *msg_hdr,
|
|||
pkt_func = (pkt_func_def)hfi_process_ignore;
|
||||
break;
|
||||
default:
|
||||
dprintk(VIDC_DBG, "Unable to parse message: %#x\n",
|
||||
dprintk(VIDC_LOW, "Unable to parse message: %#x\n",
|
||||
msg_hdr->packet);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ static int msm_cvp_init_downscale_resolution(struct msm_vidc_inst *inst)
|
|||
ds_height = cvp->height;
|
||||
|
||||
if (!cvp->downscale) {
|
||||
dprintk(VIDC_DBG, "%s: downscaling not enabled\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: downscaling not enabled\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
@ -240,10 +240,10 @@ static void msm_cvp_deinit_downscale_buffers(struct msm_vidc_inst *inst)
|
|||
return;
|
||||
}
|
||||
cvp = inst->cvp;
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
if (cvp->src_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: src_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: src_buffer",
|
||||
inst, &cvp->src_buffer);
|
||||
if (msm_cvp_free_buffer(inst, &cvp->src_buffer))
|
||||
print_cvp_buffer(VIDC_ERR,
|
||||
|
|
@ -251,7 +251,7 @@ static void msm_cvp_deinit_downscale_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->src_buffer);
|
||||
}
|
||||
if (cvp->ref_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: ref_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: ref_buffer",
|
||||
inst, &cvp->ref_buffer);
|
||||
if (msm_cvp_free_buffer(inst, &cvp->ref_buffer))
|
||||
print_cvp_buffer(VIDC_ERR,
|
||||
|
|
@ -272,10 +272,10 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst)
|
|||
cvp = inst->cvp;
|
||||
|
||||
if (!cvp->downscale) {
|
||||
dprintk(VIDC_DBG, "%s: downscaling not enabled\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: downscaling not enabled\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
cvp->src_buffer.size = VENUS_BUFFER_SIZE(COLOR_FMT_NV12_UBWC,
|
||||
cvp->ds_width, cvp->ds_height);
|
||||
|
|
@ -286,7 +286,7 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->src_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: src_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: src_buffer",
|
||||
inst, &cvp->src_buffer);
|
||||
|
||||
cvp->ref_buffer.size = cvp->src_buffer.size;
|
||||
|
|
@ -297,7 +297,7 @@ static int msm_cvp_init_downscale_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->ref_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: ref_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: ref_buffer",
|
||||
inst, &cvp->ref_buffer);
|
||||
|
||||
return rc;
|
||||
|
|
@ -316,10 +316,10 @@ static void msm_cvp_deinit_context_buffers(struct msm_vidc_inst *inst)
|
|||
return;
|
||||
}
|
||||
cvp = inst->cvp;
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
if (cvp->context_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: context_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: context_buffer",
|
||||
inst, &cvp->context_buffer);
|
||||
if (msm_cvp_free_buffer(inst, &cvp->context_buffer))
|
||||
print_cvp_buffer(VIDC_ERR,
|
||||
|
|
@ -327,7 +327,7 @@ static void msm_cvp_deinit_context_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->context_buffer);
|
||||
}
|
||||
if (cvp->refcontext_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: refcontext_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: refcontext_buffer",
|
||||
inst, &cvp->refcontext_buffer);
|
||||
if (msm_cvp_free_buffer(inst, &cvp->refcontext_buffer))
|
||||
print_cvp_buffer(VIDC_ERR,
|
||||
|
|
@ -346,7 +346,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst)
|
|||
return -EINVAL;
|
||||
}
|
||||
cvp = inst->cvp;
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
cvp->context_buffer.size = HFI_DME_FRAME_CONTEXT_BUFFER_SIZE;
|
||||
rc = msm_cvp_allocate_buffer(inst, &cvp->context_buffer, false);
|
||||
|
|
@ -356,7 +356,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->context_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: context_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: context_buffer",
|
||||
inst, &cvp->context_buffer);
|
||||
|
||||
cvp->refcontext_buffer.size = cvp->context_buffer.size;
|
||||
|
|
@ -367,7 +367,7 @@ static int msm_cvp_init_context_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->refcontext_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: refcontext_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: refcontext_buffer",
|
||||
inst, &cvp->refcontext_buffer);
|
||||
|
||||
return rc;
|
||||
|
|
@ -390,10 +390,10 @@ static void msm_cvp_deinit_internal_buffers(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
cvp = inst->cvp;
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
if (cvp->output_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: output_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: output_buffer",
|
||||
inst, &cvp->output_buffer);
|
||||
rc = msm_cvp_free_buffer(inst, &cvp->output_buffer);
|
||||
if (rc)
|
||||
|
|
@ -403,7 +403,7 @@ static void msm_cvp_deinit_internal_buffers(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
if (cvp->persist2_buffer.dbuf) {
|
||||
print_cvp_buffer(VIDC_DBG, "free: persist2_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "free: persist2_buffer",
|
||||
inst, &cvp->persist2_buffer);
|
||||
memset(&persist2_packet, 0, sizeof(struct
|
||||
msm_cvp_session_release_persist_buffers_packet));
|
||||
|
|
@ -455,7 +455,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst)
|
|||
}
|
||||
cvp = inst->cvp;
|
||||
arg = cvp->arg;
|
||||
dprintk(VIDC_DBG, "%s:\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s:\n", __func__);
|
||||
|
||||
cvp->persist2_buffer.size = HFI_DME_INTERNAL_PERSIST_2_BUFFER_SIZE;
|
||||
rc = msm_cvp_allocate_buffer(inst, &cvp->persist2_buffer, false);
|
||||
|
|
@ -465,7 +465,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->persist2_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: persist2_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: persist2_buffer",
|
||||
inst, &cvp->persist2_buffer);
|
||||
|
||||
/* set buffer */
|
||||
|
|
@ -505,7 +505,7 @@ static int msm_cvp_init_internal_buffers(struct msm_vidc_inst *inst)
|
|||
inst, &cvp->output_buffer);
|
||||
goto error;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "alloc: output_buffer",
|
||||
print_cvp_buffer(VIDC_HIGH, "alloc: output_buffer",
|
||||
inst, &cvp->output_buffer);
|
||||
|
||||
return rc;
|
||||
|
|
@ -711,7 +711,7 @@ static int msm_cvp_frame_process(struct msm_vidc_inst *inst,
|
|||
skipframe = !(cvp->framecount % skip_framecount);
|
||||
}
|
||||
if (skipframe) {
|
||||
print_cvp_buffer(VIDC_DBG, "input frame skipped",
|
||||
print_cvp_buffer(VIDC_LOW, "input frame skipped",
|
||||
inst, &cvp->fullres_buffer);
|
||||
cvp->framecount++;
|
||||
cvp->metadata_available = false;
|
||||
|
|
@ -754,7 +754,7 @@ static int msm_cvp_frame_process(struct msm_vidc_inst *inst,
|
|||
frame->refframe_contextbuffer.buffer_addr = cvp->refcontext_buffer.fd;
|
||||
frame->refframe_contextbuffer.size = cvp->refcontext_buffer.size;
|
||||
|
||||
print_cvp_buffer(VIDC_DBG, "input frame", inst, &cvp->fullres_buffer);
|
||||
print_cvp_buffer(VIDC_LOW, "input frame", inst, &cvp->fullres_buffer);
|
||||
rc = msm_cvp_private(cvp->priv, CVP_KMD_SEND_CMD_PKT, arg);
|
||||
if (rc) {
|
||||
print_cvp_buffer(VIDC_ERR, "send failed: input frame",
|
||||
|
|
@ -825,7 +825,7 @@ static int msm_vidc_cvp_deinit(struct msm_vidc_inst *inst)
|
|||
}
|
||||
cvp = inst->cvp;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: cvp session %#x\n", __func__, cvp->session_id);
|
||||
dprintk(VIDC_HIGH, "%s: cvp session %#x\n", __func__, cvp->session_id);
|
||||
msm_cvp_deinit_internal_buffers(inst);
|
||||
msm_cvp_deinit_context_buffers(inst);
|
||||
msm_cvp_deinit_downscale_buffers(inst);
|
||||
|
|
@ -844,7 +844,7 @@ static int msm_vidc_cvp_close(struct msm_vidc_inst *inst)
|
|||
}
|
||||
cvp = inst->cvp;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: cvp session %#x\n", __func__, cvp->session_id);
|
||||
dprintk(VIDC_HIGH, "%s: cvp session %#x\n", __func__, cvp->session_id);
|
||||
rc = msm_cvp_close(cvp->priv);
|
||||
if (rc)
|
||||
dprintk(VIDC_ERR,
|
||||
|
|
@ -866,7 +866,7 @@ int msm_vidc_cvp_unprepare_preprocess(struct msm_vidc_inst *inst)
|
|||
return -EINVAL;
|
||||
}
|
||||
if (!inst->cvp) {
|
||||
dprintk(VIDC_DBG, "%s: cvp not enabled or closed\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: cvp not enabled or closed\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -904,7 +904,7 @@ static int msm_vidc_cvp_init(struct msm_vidc_inst *inst)
|
|||
if (rc)
|
||||
goto error;
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: pixelformat %#x, wxh %dx%d downscale %d ds_wxh %dx%d\n",
|
||||
__func__, f->fmt.pix_mp.pixelformat,
|
||||
cvp->width, cvp->height, cvp->downscale,
|
||||
|
|
@ -985,7 +985,7 @@ static int msm_vidc_cvp_open(struct msm_vidc_inst *inst)
|
|||
}
|
||||
arg = cvp->arg;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: opening cvp\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: opening cvp\n", __func__);
|
||||
cvp->priv = msm_cvp_open(0, MSM_VIDC_CVP);
|
||||
if (!cvp->priv) {
|
||||
dprintk(VIDC_ERR, "%s: failed to open cvp session\n", __func__);
|
||||
|
|
@ -1001,7 +1001,7 @@ static int msm_vidc_cvp_open(struct msm_vidc_inst *inst)
|
|||
goto error;
|
||||
}
|
||||
cvp->session_id = arg->data.session.session_id;
|
||||
dprintk(VIDC_DBG, "%s: cvp session id %#x\n",
|
||||
dprintk(VIDC_HIGH, "%s: cvp session id %#x\n",
|
||||
__func__, cvp->session_id);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ void handle_session_register_buffer_done(enum hal_command_response cmd,
|
|||
__func__, response->data.regbuf.client_data);
|
||||
goto exit;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "register_done", inst, cbuf);
|
||||
print_cvp_buffer(VIDC_HIGH, "register_done", inst, cbuf);
|
||||
|
||||
event.type = V4L2_EVENT_MSM_VIDC_REGISTER_BUFFER_DONE;
|
||||
data = (u32 *)event.u.data;
|
||||
|
|
@ -146,7 +146,7 @@ void handle_session_unregister_buffer_done(enum hal_command_response cmd,
|
|||
__func__, response->data.unregbuf.client_data);
|
||||
goto exit;
|
||||
}
|
||||
print_cvp_buffer(VIDC_DBG, "unregister_done", inst, cbuf);
|
||||
print_cvp_buffer(VIDC_HIGH, "unregister_done", inst, cbuf);
|
||||
|
||||
rc = inst->smem_ops->smem_unmap_dma_buf(inst, &cbuf->smem);
|
||||
if (rc) {
|
||||
|
|
@ -262,7 +262,7 @@ static int msm_cvp_get_session_info(struct msm_vidc_inst *inst,
|
|||
}
|
||||
|
||||
session->session_id = hash32_ptr(inst->session);
|
||||
dprintk(VIDC_DBG, "%s: id 0x%x\n", __func__, session->session_id);
|
||||
dprintk(VIDC_HIGH, "%s: id 0x%x\n", __func__, session->session_id);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -277,7 +277,7 @@ static int msm_cvp_request_power(struct msm_vidc_inst *inst,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: clock_cycles_a %d, clock_cycles_b %d, ddr_bw %d sys_cache_bw %d\n",
|
||||
__func__, power->clock_cycles_a, power->clock_cycles_b,
|
||||
power->ddr_bw, power->sys_cache_bw);
|
||||
|
|
@ -344,7 +344,7 @@ static int msm_cvp_register_buffer(struct msm_vidc_inst *inst,
|
|||
return -EINVAL;
|
||||
}
|
||||
hdev = inst->core->device;
|
||||
print_client_buffer(VIDC_DBG, "register", inst, buf);
|
||||
print_client_buffer(VIDC_HIGH, "register", inst, buf);
|
||||
|
||||
mutex_lock(&inst->cvpbufs.lock);
|
||||
found = false;
|
||||
|
|
@ -423,7 +423,7 @@ static int msm_cvp_unregister_buffer(struct msm_vidc_inst *inst,
|
|||
return -EINVAL;
|
||||
}
|
||||
hdev = inst->core->device;
|
||||
print_client_buffer(VIDC_DBG, "unregister", inst, buf);
|
||||
print_client_buffer(VIDC_HIGH, "unregister", inst, buf);
|
||||
|
||||
mutex_lock(&inst->cvpbufs.lock);
|
||||
found = false;
|
||||
|
|
@ -576,7 +576,7 @@ int msm_cvp_inst_deinit(struct msm_vidc_inst *inst)
|
|||
dprintk(VIDC_ERR, "%s: invalid params\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
dprintk(VIDC_DBG, "%s: inst %pK (%#x)\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: inst %pK (%#x)\n", __func__,
|
||||
inst, hash32_ptr(inst->session));
|
||||
|
||||
rc = msm_comm_try_state(inst, MSM_VIDC_CLOSE_DONE);
|
||||
|
|
@ -614,7 +614,7 @@ int msm_cvp_inst_init(struct msm_vidc_inst *inst)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: inst %pK (%#x)\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: inst %pK (%#x)\n", __func__,
|
||||
inst, hash32_ptr(inst->session));
|
||||
|
||||
/* set default frequency */
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ static int msm_dma_get_device_address(struct dma_buf *dbuf, unsigned long align,
|
|||
trace_msm_smem_buffer_iommu_op_end("MAP", 0, 0,
|
||||
align, *iova, *buffer_size);
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "iommu not present, use phys mem addr\n");
|
||||
dprintk(VIDC_HIGH, "iommu not present, use phys mem addr\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -132,14 +132,14 @@ static int msm_dma_put_device_address(u32 flags,
|
|||
int rc = 0;
|
||||
|
||||
if (!mapping_info) {
|
||||
dprintk(VIDC_WARN, "Invalid mapping_info\n");
|
||||
dprintk(VIDC_ERR, "Invalid mapping_info\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!mapping_info->dev || !mapping_info->table ||
|
||||
!mapping_info->buf || !mapping_info->attach ||
|
||||
!mapping_info->cb_info) {
|
||||
dprintk(VIDC_WARN, "Invalid params\n");
|
||||
dprintk(VIDC_ERR, "Invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ int msm_smem_unmap_dma_buf(struct msm_vidc_inst *inst, struct msm_smem *smem)
|
|||
if (smem->refcount) {
|
||||
smem->refcount--;
|
||||
} else {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"unmap called while refcount is zero already\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -344,13 +344,13 @@ static int alloc_dma_mem(size_t size, u32 align, u32 flags,
|
|||
|
||||
if (is_iommu_present(res)) {
|
||||
if (flags & SMEM_ADSP) {
|
||||
dprintk(VIDC_DBG, "Allocating from ADSP heap\n");
|
||||
dprintk(VIDC_HIGH, "Allocating from ADSP heap\n");
|
||||
heap_mask = ION_HEAP(ION_ADSP_HEAP_ID);
|
||||
} else {
|
||||
heap_mask = ION_HEAP(ION_SYSTEM_HEAP_ID);
|
||||
}
|
||||
} else {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"allocate shared memory from adsp heap size %zx align %d\n",
|
||||
size, align);
|
||||
heap_mask = ION_HEAP(ION_ADSP_HEAP_ID);
|
||||
|
|
@ -427,7 +427,7 @@ static int alloc_dma_mem(size_t size, u32 align, u32 flags,
|
|||
}
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: dma_buf = %pK, device_addr = %x, size = %d, kvaddr = %pK, buffer_type = %#x, flags = %#lx\n",
|
||||
__func__, mem->dma_buf, mem->device_addr, mem->size,
|
||||
mem->kvaddr, mem->buffer_type, mem->flags);
|
||||
|
|
@ -444,7 +444,7 @@ fail_shared_mem_alloc:
|
|||
|
||||
static int free_dma_mem(struct msm_smem *mem)
|
||||
{
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: dma_buf = %pK, device_addr = %x, size = %d, kvaddr = %pK, buffer_type = %#x\n",
|
||||
__func__, mem->dma_buf, mem->device_addr, mem->size,
|
||||
mem->kvaddr, mem->buffer_type);
|
||||
|
|
|
|||
|
|
@ -391,11 +391,11 @@ static ssize_t thermal_level_store(struct device *dev,
|
|||
|
||||
rc = kstrtoint(buf, 0, &val);
|
||||
if (rc || val < 0) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"Invalid thermal level value: %s\n", buf);
|
||||
return -EINVAL;
|
||||
}
|
||||
dprintk(VIDC_DBG, "Thermal level old %d new %d\n",
|
||||
dprintk(VIDC_HIGH, "Thermal level old %d new %d\n",
|
||||
vidc_driver->thermal_level, val);
|
||||
|
||||
if (val == vidc_driver->thermal_level)
|
||||
|
|
@ -551,7 +551,7 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev)
|
|||
if (rc != -EPROBE_DEFER)
|
||||
dprintk(VIDC_ERR, "Failed to create HFI device\n");
|
||||
else
|
||||
dprintk(VIDC_DBG, "msm_vidc: request probe defer\n");
|
||||
dprintk(VIDC_HIGH, "msm_vidc: request probe defer\n");
|
||||
goto err_cores_exceeded;
|
||||
}
|
||||
|
||||
|
|
@ -564,7 +564,7 @@ static int msm_vidc_probe_vidc_device(struct platform_device *pdev)
|
|||
|
||||
vidc_driver->sku_version = core->resources.sku_version;
|
||||
|
||||
dprintk(VIDC_DBG, "populating sub devices\n");
|
||||
dprintk(VIDC_HIGH, "populating sub devices\n");
|
||||
/*
|
||||
* Trigger probe for each sub-device i.e. qcom,msm-vidc,context-bank.
|
||||
* When msm_vidc_probe is called for each sub-device, parse the
|
||||
|
|
@ -709,7 +709,7 @@ static int msm_vidc_pm_suspend(struct device *dev)
|
|||
if (rc == -ENOTSUPP)
|
||||
rc = 0;
|
||||
else if (rc)
|
||||
dprintk(VIDC_WARN, "Failed to suspend: %d\n", rc);
|
||||
dprintk(VIDC_ERR, "Failed to suspend: %d\n", rc);
|
||||
|
||||
|
||||
return rc;
|
||||
|
|
@ -717,7 +717,7 @@ static int msm_vidc_pm_suspend(struct device *dev)
|
|||
|
||||
static int msm_vidc_pm_resume(struct device *dev)
|
||||
{
|
||||
dprintk(VIDC_INFO, "%s\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -711,7 +711,7 @@ int msm_vdec_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f)
|
|||
sizeof(f->description));
|
||||
f->pixelformat = fmt_desc->fourcc;
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "No more formats found\n");
|
||||
dprintk(VIDC_HIGH, "No more formats found\n");
|
||||
rc = -EINVAL;
|
||||
}
|
||||
return rc;
|
||||
|
|
@ -789,7 +789,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
|
|||
is_decode_session(temp) &&
|
||||
!is_thumbnail_session(temp)) {
|
||||
inst->decode_batching = false;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Disable decode-batching in multi sessions\n");
|
||||
break;
|
||||
}
|
||||
|
|
@ -833,7 +833,7 @@ int msm_vdec_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: %x : control name = %s, id = 0x%x value = %d\n",
|
||||
__func__, hash32_ptr(inst->session), ctrl->name,
|
||||
ctrl->id, ctrl->val);
|
||||
|
|
@ -937,7 +937,7 @@ int msm_vdec_set_frame_size(struct msm_vidc_inst *inst)
|
|||
frame_size.buffer_type = HFI_BUFFER_INPUT;
|
||||
frame_size.width = f->fmt.pix_mp.width;
|
||||
frame_size.height = f->fmt.pix_mp.height;
|
||||
dprintk(VIDC_DBG, "%s: input wxh %dx%d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: input wxh %dx%d\n", __func__,
|
||||
frame_size.width, frame_size.height);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_size, sizeof(frame_size));
|
||||
|
|
@ -1075,7 +1075,7 @@ int msm_vdec_set_profile_level(struct msm_vidc_inst *inst)
|
|||
profile_level.profile = inst->profile;
|
||||
profile_level.level = inst->level;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__,
|
||||
profile_level.profile, profile_level.level);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT, &profile_level,
|
||||
|
|
@ -1100,7 +1100,7 @@ int msm_vdec_set_output_order(struct msm_vidc_inst *inst)
|
|||
hdev = inst->core->device;
|
||||
|
||||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_DECODE_ORDER);
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, ctrl->val);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, ctrl->val);
|
||||
if (ctrl->val == V4L2_MPEG_MSM_VIDC_ENABLE)
|
||||
output_order = HFI_OUTPUT_ORDER_DECODE;
|
||||
else
|
||||
|
|
@ -1131,7 +1131,7 @@ int msm_vdec_set_sync_frame_mode(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_SYNC_FRAME_DECODE);
|
||||
hfi_property.enable = (bool)ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__, hfi_property.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__, hfi_property.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE, &hfi_property,
|
||||
sizeof(hfi_property));
|
||||
|
|
@ -1169,7 +1169,7 @@ int msm_vdec_set_secure_mode(struct msm_vidc_inst *inst)
|
|||
}
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__, ctrl->val);
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__, ctrl->val);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_SECURE_SESSION, &ctrl->val, sizeof(u32));
|
||||
if (rc)
|
||||
|
|
@ -1247,7 +1247,7 @@ int msm_vdec_set_output_stream_mode(struct msm_vidc_inst *inst)
|
|||
f = &inst->fmts[OUTPUT_PORT].v4l2_fmt;
|
||||
frame_sz.width = f->fmt.pix_mp.width;
|
||||
frame_sz.height = f->fmt.pix_mp.height;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"frame_size: hal buffer type %d, width %d, height %d\n",
|
||||
frame_sz.buffer_type, frame_sz.width, frame_sz.height);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
|
|
@ -1280,7 +1280,7 @@ int msm_vdec_set_priority(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY);
|
||||
hfi_property.enable = (bool)ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__, hfi_property.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__, hfi_property.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_REALTIME, &hfi_property,
|
||||
sizeof(hfi_property));
|
||||
|
|
@ -1309,7 +1309,7 @@ int msm_vdec_set_operating_rate(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE);
|
||||
operating_rate.operating_rate = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__,
|
||||
operating_rate.operating_rate);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_OPERATING_RATE, &operating_rate,
|
||||
|
|
@ -1339,7 +1339,7 @@ int msm_vdec_set_conceal_color(struct msm_vidc_inst *inst)
|
|||
conceal_color.conceal_color_8bit = ctrl_8b->val;
|
||||
conceal_color.conceal_color_10bit = ctrl_10b->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__,
|
||||
conceal_color.conceal_color_8bit,
|
||||
conceal_color.conceal_color_10bit);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
|
|
@ -1474,7 +1474,7 @@ exit:
|
|||
if (rc)
|
||||
dprintk(VIDC_ERR, "%s: failed with %d\n", __func__, rc);
|
||||
else
|
||||
dprintk(VIDC_DBG, "%s: set properties successful\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: set properties successful\n", __func__);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1154,7 +1154,7 @@ int msm_venc_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f)
|
|||
sizeof(f->description));
|
||||
f->pixelformat = fmt_desc->fourcc;
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "No more formats found\n");
|
||||
dprintk(VIDC_HIGH, "No more formats found\n");
|
||||
rc = -EINVAL;
|
||||
}
|
||||
return rc;
|
||||
|
|
@ -1370,7 +1370,7 @@ static int msm_venc_resolve_rc_enable(struct msm_vidc_inst *inst,
|
|||
u32 codec;
|
||||
|
||||
if (!ctrl->val) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"RC is not enabled. Setting RC OFF\n");
|
||||
inst->rc_type = RATE_CONTROL_OFF;
|
||||
} else {
|
||||
|
|
@ -1382,7 +1382,7 @@ static int msm_venc_resolve_rc_enable(struct msm_vidc_inst *inst,
|
|||
if (msm_vidc_lossless_encode
|
||||
&& (codec == V4L2_PIX_FMT_HEVC ||
|
||||
codec == V4L2_PIX_FMT_H264)) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Reset RC mode to RC_LOSSLESS for HEVC lossless encoding\n");
|
||||
inst->rc_type = RATE_CONTROL_LOSSLESS;
|
||||
}
|
||||
|
|
@ -1393,7 +1393,7 @@ static int msm_venc_resolve_rate_control(struct msm_vidc_inst *inst,
|
|||
struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
if (inst->rc_type == RATE_CONTROL_LOSSLESS) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Skip RC mode when enabling lossless encoding\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1431,7 +1431,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
cll_sei = &(inst->hdr10_sei_params.cll_sei);
|
||||
codec = get_v4l2_codec(inst);
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: %x : name %s, id 0x%x value %d\n",
|
||||
__func__, hash32_ptr(inst->session), ctrl->name,
|
||||
ctrl->id, ctrl->val);
|
||||
|
|
@ -1537,7 +1537,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
u32 info_type = ((u32)ctrl->val >> 28) & 0xF;
|
||||
u32 val = (ctrl->val & 0xFFFFFFF);
|
||||
|
||||
dprintk(VIDC_DBG, "Ctrl:%d, HDR Info with value %u (%#X)",
|
||||
dprintk(VIDC_HIGH, "Ctrl:%d, HDR Info with value %u (%#X)",
|
||||
info_type, val, ctrl->val);
|
||||
switch (info_type) {
|
||||
case MSM_VIDC_RGB_PRIMARY_00:
|
||||
|
|
@ -1767,7 +1767,7 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
case V4L2_CID_MPEG_VIDC_VENC_NATIVE_RECORDER:
|
||||
case V4L2_CID_MPEG_VIDC_VENC_RC_TIMESTAMP_DISABLE:
|
||||
case V4L2_CID_MPEG_VIDEO_VBV_DELAY:
|
||||
dprintk(VIDC_DBG, "Control set: ID : %x Val : %d\n",
|
||||
dprintk(VIDC_HIGH, "Control set: ID : %x Val : %d\n",
|
||||
ctrl->id, ctrl->val);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1796,7 +1796,7 @@ int msm_venc_set_frame_size(struct msm_vidc_inst *inst)
|
|||
frame_sz.buffer_type = HFI_BUFFER_INPUT;
|
||||
frame_sz.width = f->fmt.pix_mp.width;
|
||||
frame_sz.height = f->fmt.pix_mp.height;
|
||||
dprintk(VIDC_DBG, "%s: input %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: input %d %d\n", __func__,
|
||||
frame_sz.width, frame_sz.height);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_sz, sizeof(frame_sz));
|
||||
|
|
@ -1810,7 +1810,7 @@ int msm_venc_set_frame_size(struct msm_vidc_inst *inst)
|
|||
frame_sz.buffer_type = HFI_BUFFER_OUTPUT;
|
||||
frame_sz.width = f->fmt.pix_mp.width;
|
||||
frame_sz.height = f->fmt.pix_mp.height;
|
||||
dprintk(VIDC_DBG, "%s: output %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: output %d %d\n", __func__,
|
||||
frame_sz.width, frame_sz.height);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_FRAME_SIZE, &frame_sz, sizeof(frame_sz));
|
||||
|
|
@ -1839,7 +1839,7 @@ int msm_venc_set_frame_rate(struct msm_vidc_inst *inst)
|
|||
frame_rate.buffer_type = HFI_BUFFER_OUTPUT;
|
||||
frame_rate.frame_rate = inst->clk_data.frame_rate;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__, frame_rate.frame_rate);
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__, frame_rate.frame_rate);
|
||||
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
inst->session, HFI_PROPERTY_CONFIG_FRAME_RATE,
|
||||
|
|
@ -1946,7 +1946,7 @@ int msm_venc_set_secure_mode(struct msm_vidc_inst *inst)
|
|||
}
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_SECURE_SESSION, &enable, sizeof(enable));
|
||||
if (rc)
|
||||
|
|
@ -1971,7 +1971,7 @@ int msm_venc_set_priority(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_PRIORITY);
|
||||
enable.enable = !!ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_REALTIME, &enable, sizeof(enable));
|
||||
if (rc)
|
||||
|
|
@ -1996,7 +1996,7 @@ int msm_venc_set_operating_rate(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE);
|
||||
op_rate.operating_rate = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, op_rate.operating_rate >> 16);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, op_rate.operating_rate >> 16);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_OPERATING_RATE, &op_rate, sizeof(op_rate));
|
||||
if (rc) {
|
||||
|
|
@ -2028,7 +2028,7 @@ int msm_venc_set_profile_level(struct msm_vidc_inst *inst)
|
|||
profile_level.profile = inst->profile;
|
||||
profile_level.level = inst->level;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x %#x\n", __func__,
|
||||
profile_level.profile, profile_level.level);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT, &profile_level,
|
||||
|
|
@ -2058,7 +2058,7 @@ int msm_venc_set_idr_period(struct msm_vidc_inst *inst)
|
|||
|
||||
idr_period.idr_period = 1;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, idr_period.idr_period);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, idr_period.idr_period);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD, &idr_period,
|
||||
sizeof(idr_period));
|
||||
|
|
@ -2126,7 +2126,7 @@ void msm_venc_decide_bframe(struct msm_vidc_inst *inst)
|
|||
*/
|
||||
inst->prop.bframe_changed = true;
|
||||
bframe_ctrl->val = MAX_NUM_B_FRAMES;
|
||||
dprintk(VIDC_DBG, "Bframe is forcefully enabled\n");
|
||||
dprintk(VIDC_HIGH, "Bframe is forcefully enabled\n");
|
||||
} else {
|
||||
/*
|
||||
* Native recorder is not enabled
|
||||
|
|
@ -2135,7 +2135,7 @@ void msm_venc_decide_bframe(struct msm_vidc_inst *inst)
|
|||
goto disable_bframe;
|
||||
}
|
||||
}
|
||||
dprintk(VIDC_DBG, "Bframe can be enabled!\n");
|
||||
dprintk(VIDC_HIGH, "Bframe can be enabled!\n");
|
||||
|
||||
return;
|
||||
disable_bframe:
|
||||
|
|
@ -2147,9 +2147,9 @@ disable_bframe:
|
|||
*/
|
||||
inst->prop.bframe_changed = true;
|
||||
bframe_ctrl->val = 0;
|
||||
dprintk(VIDC_DBG, "Bframe is forcefully disabled!\n");
|
||||
dprintk(VIDC_HIGH, "Bframe is forcefully disabled!\n");
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "Bframe is disabled\n");
|
||||
dprintk(VIDC_HIGH, "Bframe is disabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2167,7 +2167,7 @@ int msm_venc_set_adaptive_bframes(struct msm_vidc_inst *inst)
|
|||
|
||||
enable.enable = true;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_ADAPTIVE_B, &enable, sizeof(enable));
|
||||
if (rc)
|
||||
|
|
@ -2243,7 +2243,7 @@ int msm_venc_set_intra_period(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_B_FRAMES);
|
||||
intra_period.bframes = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__, intra_period.pframes,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, intra_period.pframes,
|
||||
intra_period.bframes);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD, &intra_period,
|
||||
|
|
@ -2276,7 +2276,7 @@ int msm_venc_set_request_keyframe(struct msm_vidc_inst *inst)
|
|||
}
|
||||
hdev = inst->core->device;
|
||||
|
||||
dprintk(VIDC_DBG, "%s\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s\n", __func__);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME, NULL, 0);
|
||||
if (rc) {
|
||||
|
|
@ -2344,7 +2344,7 @@ int msm_venc_set_rate_control(struct msm_vidc_inst *inst)
|
|||
inst->rc_type);
|
||||
break;
|
||||
}
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, inst->rc_type);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, inst->rc_type);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_RATE_CONTROL, &hfi_rc,
|
||||
sizeof(u32));
|
||||
|
|
@ -2419,7 +2419,7 @@ int msm_venc_set_vbv_delay(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
set_vbv_delay:
|
||||
dprintk(VIDC_DBG, "Set hrd_buf_size %d",
|
||||
dprintk(VIDC_HIGH, "Set hrd_buf_size %d",
|
||||
hrd_buf_size.vbv_hrd_buf_size);
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
(void *)inst->session,
|
||||
|
|
@ -2456,7 +2456,7 @@ int msm_venc_set_input_timestamp_rc(struct msm_vidc_inst *inst)
|
|||
*/
|
||||
enable.enable = !!ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_DISABLE_RC_TIMESTAMP, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -2481,12 +2481,12 @@ int msm_venc_set_bitrate(struct msm_vidc_inst *inst)
|
|||
hdev = inst->core->device;
|
||||
|
||||
if (inst->layer_bitrate) {
|
||||
dprintk(VIDC_DBG, "%s: Layer bitrate is enabled\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: Layer bitrate is enabled\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
enable.enable = 0;
|
||||
dprintk(VIDC_DBG, "%s: bitrate type: %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: bitrate type: %d\n",
|
||||
__func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_BITRATE_TYPE, &enable,
|
||||
|
|
@ -2499,7 +2499,7 @@ int msm_venc_set_bitrate(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_BITRATE);
|
||||
bitrate.bit_rate = ctrl->val;
|
||||
bitrate.layer_id = MSM_VIDC_ALL_LAYER_ID;
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, bitrate.bit_rate);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, bitrate.bit_rate);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE, &bitrate,
|
||||
sizeof(bitrate));
|
||||
|
|
@ -2532,14 +2532,14 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst)
|
|||
V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER);
|
||||
|
||||
if (!max_layer->val || !layer->val) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Hierp layer not set. Ignore layer bitrate\n",
|
||||
__func__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (max_layer->val < layer->val) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Hierp layer greater than max isn't allowed\n",
|
||||
__func__);
|
||||
goto error;
|
||||
|
|
@ -2561,7 +2561,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst)
|
|||
/* Set layer bitrates only when highest layer br ratio is 100. */
|
||||
if (layer_br_ratios[layer->val-1]->val != MAX_BIT_RATE_RATIO ||
|
||||
layer_br_ratios[0]->val == 0) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Improper layer bitrate ratio\n",
|
||||
__func__);
|
||||
goto error;
|
||||
|
|
@ -2569,7 +2569,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst)
|
|||
|
||||
for (i = layer->val - 1; i > 0; --i) {
|
||||
if (layer_br_ratios[i]->val == 0) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Layer ratio must be non-zero\n",
|
||||
__func__);
|
||||
goto error;
|
||||
|
|
@ -2578,7 +2578,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
enable.enable = 1;
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_BITRATE_TYPE, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -2592,7 +2592,7 @@ int msm_venc_set_layer_bitrate(struct msm_vidc_inst *inst)
|
|||
layer_br.bit_rate =
|
||||
bitrate->val * layer_br_ratios[i]->val / 100;
|
||||
layer_br.layer_id = i;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Bitrate for Layer[%u]: [%u]\n",
|
||||
__func__, layer_br.layer_id, layer_br.bit_rate);
|
||||
|
||||
|
|
@ -2657,7 +2657,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst)
|
|||
return 0;
|
||||
} else {
|
||||
if (!(inst->client_set_ctrls & CLIENT_SET_I_QP)) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"%s: Client value is not valid\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -2673,7 +2673,7 @@ int msm_venc_set_frame_qp(struct msm_vidc_inst *inst)
|
|||
|
||||
qp.qp_packed = i_qp->val | p_qp->val << 8 | b_qp->val << 16;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: layers %#x frames %#x qp_packed %#x\n",
|
||||
dprintk(VIDC_HIGH, "%s: layers %#x frames %#x qp_packed %#x\n",
|
||||
__func__, qp.layer_id, qp.enable, qp.qp_packed);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_FRAME_QP, &qp, sizeof(qp));
|
||||
|
|
@ -2698,7 +2698,7 @@ int msm_venc_set_qp_range(struct msm_vidc_inst *inst)
|
|||
|
||||
if (!(inst->client_set_ctrls & CLIENT_SET_MIN_QP) &&
|
||||
!(inst->client_set_ctrls & CLIENT_SET_MAX_QP)) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: Client didn't set QP range.\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2712,7 +2712,7 @@ int msm_venc_set_qp_range(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP);
|
||||
qp_range.max_qp.qp_packed = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: layers %#x qp_min %#x qp_max %#x\n",
|
||||
__func__, qp_range.min_qp.layer_id,
|
||||
qp_range.min_qp.qp_packed, qp_range.max_qp.qp_packed);
|
||||
|
|
@ -2744,7 +2744,7 @@ int msm_venc_set_frame_quality(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_COMPRESSION_QUALITY);
|
||||
frame_quality.frame_quality = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, frame_quality.frame_quality);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, frame_quality.frame_quality);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY, &frame_quality,
|
||||
sizeof(frame_quality));
|
||||
|
|
@ -2778,7 +2778,7 @@ int msm_venc_set_grid(struct msm_vidc_inst *inst)
|
|||
else
|
||||
grid_enable.grid_enable = true;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, grid_enable.grid_enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, grid_enable.grid_enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_HEIC_GRID_ENABLE, &grid_enable,
|
||||
sizeof(grid_enable));
|
||||
|
|
@ -2810,7 +2810,7 @@ int msm_venc_set_entropy_mode(struct msm_vidc_inst *inst)
|
|||
ctrl->val);
|
||||
entropy.cabac_model = HFI_H264_CABAC_MODEL_2;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, entropy.entropy_mode);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, entropy.entropy_mode);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL, &entropy,
|
||||
sizeof(entropy));
|
||||
|
|
@ -2916,7 +2916,7 @@ set_and_exit:
|
|||
multi_slice_control.slice_size = slice_val;
|
||||
|
||||
hdev = inst->core->device;
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__,
|
||||
multi_slice_control.multi_slice,
|
||||
multi_slice_control.slice_size);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
|
|
@ -2972,7 +2972,7 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
|
|||
intra_refresh.mbs = 0;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__,
|
||||
intra_refresh.mode, intra_refresh.mbs);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH, &intra_refresh,
|
||||
|
|
@ -2999,12 +2999,12 @@ int msm_venc_set_bitrate_savings_mode(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS);
|
||||
enable.enable = !!ctrl->val;
|
||||
if (!ctrl->val && inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Can't disable bitrate savings for non-VBR_CFR\n");
|
||||
enable.enable = 1;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_BITRATE_SAVINGS, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -3041,7 +3041,7 @@ int msm_venc_set_loop_filter_mode(struct msm_vidc_inst *inst)
|
|||
h264_db_control.slice_alpha_offset = ctrl_a->val;
|
||||
h264_db_control.slice_beta_offset = ctrl_b->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d %d\n", __func__,
|
||||
h264_db_control.mode, h264_db_control.slice_alpha_offset,
|
||||
h264_db_control.slice_beta_offset);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
|
|
@ -3077,7 +3077,7 @@ int msm_venc_set_sequence_header_mode(struct msm_vidc_inst *inst)
|
|||
else
|
||||
enable.enable = false;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -3108,7 +3108,7 @@ int msm_venc_set_au_delimiter_mode(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_AU_DELIMITER);
|
||||
enable.enable = !!ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_GENERATE_AUDNAL, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -3175,7 +3175,7 @@ int msm_venc_set_base_layer_priority_id(struct msm_vidc_inst *inst)
|
|||
max_layer = get_ctrl(inst,
|
||||
V4L2_CID_MPEG_VIDC_VIDEO_HEVC_MAX_HIER_CODING_LAYER);
|
||||
if (max_layer->val <= 0) {
|
||||
dprintk(VIDC_DBG, "%s: Layer id can only be set with Hierp\n",
|
||||
dprintk(VIDC_HIGH, "%s: Layer id can only be set with Hierp\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -3183,7 +3183,7 @@ int msm_venc_set_base_layer_priority_id(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_BASELAYER_ID);
|
||||
baselayerid = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, baselayerid);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, baselayerid);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_BASELAYER_PRIORITYID, &baselayerid,
|
||||
sizeof(baselayerid));
|
||||
|
|
@ -3229,13 +3229,13 @@ int msm_venc_set_hp_max_layer(struct msm_vidc_inst *inst)
|
|||
hp_layer = ctrl->val - 1;
|
||||
|
||||
if (inst->hybrid_hp) {
|
||||
dprintk(VIDC_DBG, "%s: Hybrid hierp layer: %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: Hybrid hierp layer: %d\n",
|
||||
__func__, hp_layer);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE,
|
||||
&hp_layer, sizeof(hp_layer));
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "%s: Hierp max layer: %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: Hierp max layer: %d\n",
|
||||
__func__, hp_layer);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER,
|
||||
|
|
@ -3267,7 +3267,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst)
|
|||
return 0;
|
||||
|
||||
if (inst->hybrid_hp) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"%s: Setting layer isn't allowed with hybrid hp\n",
|
||||
__func__);
|
||||
return 0;
|
||||
|
|
@ -3279,7 +3279,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst)
|
|||
V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER);
|
||||
|
||||
if (max_layer->val < ctrl->val) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"%s: HP layer count greater than max isn't allowed\n",
|
||||
__func__);
|
||||
return 0;
|
||||
|
|
@ -3292,7 +3292,7 @@ int msm_venc_set_hp_layer(struct msm_vidc_inst *inst)
|
|||
if (ctrl->val)
|
||||
hp_layer = ctrl->val - 1;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: Hierp enhancement layer: %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: Hierp enhancement layer: %d\n",
|
||||
__func__, hp_layer);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER,
|
||||
|
|
@ -3323,7 +3323,7 @@ int msm_venc_set_vpx_error_resilience(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_VPX_ERROR_RESILIENCE);
|
||||
enable.enable = !!ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -3369,7 +3369,7 @@ int msm_venc_set_video_signal_info(struct msm_vidc_inst *inst)
|
|||
signal_info.transfer_characteristics = ctrl_tr->val;
|
||||
signal_info.matrix_coeffs = ctrl_mc->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d %d %d\n", __func__,
|
||||
signal_info.color_primaries, signal_info.video_full_range,
|
||||
signal_info.transfer_characteristics,
|
||||
signal_info.matrix_coeffs);
|
||||
|
|
@ -3415,7 +3415,7 @@ int msm_venc_set_rotation(struct msm_vidc_inst *inst)
|
|||
else if (vflip->val == V4L2_MPEG_MSM_VIDC_ENABLE)
|
||||
vpe_rotation.flip = HFI_FLIP_VERTICAL;
|
||||
|
||||
dprintk(VIDC_DBG, "Set rotation = %d, flip = %d\n",
|
||||
dprintk(VIDC_HIGH, "Set rotation = %d, flip = %d\n",
|
||||
vpe_rotation.rotation, vpe_rotation.flip);
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
(void *)inst->session,
|
||||
|
|
@ -3479,14 +3479,14 @@ int msm_venc_set_8x8_transform(struct msm_vidc_inst *inst)
|
|||
hdev = inst->core->device;
|
||||
|
||||
if (get_v4l2_codec(inst) != V4L2_PIX_FMT_H264) {
|
||||
dprintk(VIDC_DBG, "%s: skip as codec is not H264\n",
|
||||
dprintk(VIDC_HIGH, "%s: skip as codec is not H264\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (inst->profile != HFI_H264_PROFILE_HIGH &&
|
||||
inst->profile != HFI_H264_PROFILE_CONSTRAINED_HIGH) {
|
||||
dprintk(VIDC_DBG, "%s: skip due to %#x\n",
|
||||
dprintk(VIDC_HIGH, "%s: skip due to %#x\n",
|
||||
__func__, inst->profile);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -3494,7 +3494,7 @@ int msm_venc_set_8x8_transform(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM);
|
||||
enable.enable = !!ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, enable.enable);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, enable.enable);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_H264_8X8_TRANSFORM, &enable,
|
||||
sizeof(enable));
|
||||
|
|
@ -3542,7 +3542,7 @@ int msm_venc_set_vui_timing_info(struct msm_vidc_inst *inst)
|
|||
timing_info.fixed_frame_rate = cfr;
|
||||
timing_info.time_scale = NSEC_PER_SEC;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__, timing_info.enable,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__, timing_info.enable,
|
||||
timing_info.fixed_frame_rate);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_VUI_TIMING_INFO, &timing_info,
|
||||
|
|
@ -3591,7 +3591,7 @@ int msm_venc_set_nal_stream_format(struct msm_vidc_inst *inst)
|
|||
break;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__,
|
||||
stream_format.nal_stream_format_select);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT, &stream_format,
|
||||
|
|
@ -3637,7 +3637,7 @@ int msm_venc_set_ltr_mode(struct msm_vidc_inst *inst)
|
|||
ltr.ltr_count = ctrl->val;
|
||||
ltr.ltr_mode = HFI_LTR_MODE_MANUAL;
|
||||
ltr.trust_mode = 1;
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__,
|
||||
ltr.ltr_mode, ltr.ltr_count);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_LTRMODE, <r, sizeof(ltr));
|
||||
|
|
@ -3669,7 +3669,7 @@ int msm_venc_set_ltr_useframe(struct msm_vidc_inst *inst)
|
|||
use_ltr.ref_ltr = ctrl->val;
|
||||
use_ltr.use_constrnt = false;
|
||||
use_ltr.frames = 0;
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, use_ltr.ref_ltr);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, use_ltr.ref_ltr);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_USELTRFRAME, &use_ltr,
|
||||
sizeof(use_ltr));
|
||||
|
|
@ -3700,7 +3700,7 @@ int msm_venc_set_ltr_markframe(struct msm_vidc_inst *inst)
|
|||
ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_MARKLTRFRAME);
|
||||
mark_ltr.mark_frame = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d\n", __func__, mark_ltr.mark_frame);
|
||||
dprintk(VIDC_HIGH, "%s: %d\n", __func__, mark_ltr.mark_frame);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME, &mark_ltr,
|
||||
sizeof(mark_ltr));
|
||||
|
|
@ -3736,7 +3736,7 @@ int msm_venc_set_dyn_qp(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl)
|
|||
if (get_v4l2_codec(inst) == V4L2_PIX_FMT_VP8)
|
||||
qp.enable &= ~QP_ENABLE_B;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %#x\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %#x\n", __func__,
|
||||
ctrl->val);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_FRAME_QP, &qp, sizeof(qp));
|
||||
|
|
@ -3774,7 +3774,7 @@ int msm_venc_set_aspect_ratio(struct msm_vidc_inst *inst)
|
|||
return 0;
|
||||
sar.aspect_height = ctrl->val;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %d %d\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %d %d\n", __func__,
|
||||
sar.aspect_width, sar.aspect_height);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_ASPECT_RATIO, &sar, sizeof(sar));
|
||||
|
|
@ -3802,7 +3802,7 @@ int msm_venc_set_blur_resolution(struct msm_vidc_inst *inst)
|
|||
frame_sz.buffer_type = HFI_BUFFER_INPUT;
|
||||
frame_sz.height = ctrl->val & 0xFFFF;
|
||||
frame_sz.width = (ctrl->val & 0x7FFF0000) >> 16;
|
||||
dprintk(VIDC_DBG, "%s: type %u, height %u, width %u\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: type %u, height %u, width %u\n", __func__,
|
||||
frame_sz.buffer_type, frame_sz.height, frame_sz.width);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_CONFIG_VENC_BLUR_FRAME_SIZE, &frame_sz,
|
||||
|
|
@ -3833,7 +3833,7 @@ int msm_venc_set_hdr_info(struct msm_vidc_inst *inst)
|
|||
return 0;
|
||||
|
||||
/* No conversion to HFI needed as both structures are same */
|
||||
dprintk(VIDC_DBG, "%s: setting hdr info\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: setting hdr info\n", __func__);
|
||||
rc = call_hfi_op(hdev, session_set_property, inst->session,
|
||||
HFI_PROPERTY_PARAM_VENC_HDR10_PQ_SEI, &inst->hdr10_sei_params,
|
||||
sizeof(inst->hdr10_sei_params));
|
||||
|
|
@ -3884,7 +3884,7 @@ int msm_venc_set_extradata(struct msm_vidc_inst *inst)
|
|||
|
||||
if (inst->prop.extradata_ctrls & EXTRADATA_ENC_INPUT_CVP)
|
||||
value = 0x1;
|
||||
dprintk(VIDC_DBG, "%s: CVP extradata %d\n", __func__, value);
|
||||
dprintk(VIDC_HIGH, "%s: CVP extradata %d\n", __func__, value);
|
||||
rc = msm_comm_set_extradata(inst,
|
||||
HFI_PROPERTY_PARAM_VENC_CVP_METADATA_EXTRADATA, value);
|
||||
if (rc)
|
||||
|
|
@ -3904,7 +3904,7 @@ int msm_venc_set_lossless(struct msm_vidc_inst *inst)
|
|||
if (inst->rc_type != RATE_CONTROL_LOSSLESS)
|
||||
return 0;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: enable lossless encoding\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: enable lossless encoding\n", __func__);
|
||||
enable.enable = 1;
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
inst->session,
|
||||
|
|
@ -4060,7 +4060,7 @@ exit:
|
|||
if (rc)
|
||||
dprintk(VIDC_ERR, "%s: failed with %d\n", __func__, rc);
|
||||
else
|
||||
dprintk(VIDC_DBG, "%s: set properties successful\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: set properties successful\n", __func__);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
64
msm/vidc/msm_vidc.c
Normal file → Executable file
64
msm/vidc/msm_vidc.c
Normal file → Executable file
|
|
@ -152,7 +152,7 @@ int msm_vidc_query_ctrl(void *instance, struct v4l2_queryctrl *q_ctrl)
|
|||
else
|
||||
q_ctrl->flags = 0;
|
||||
|
||||
dprintk(VIDC_DBG, "query ctrl: %s: min %d, max %d, flags %#x\n",
|
||||
dprintk(VIDC_HIGH, "query ctrl: %s: min %d, max %d, flags %#x\n",
|
||||
ctrl->name, q_ctrl->minimum, q_ctrl->maximum, q_ctrl->flags);
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ int msm_vidc_s_fmt(void *instance, struct v4l2_format *f)
|
|||
if (inst->session_type == MSM_VIDC_ENCODER)
|
||||
rc = msm_venc_s_fmt(instance, f);
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"s_fmt: %x : type %d wxh %dx%d pixelfmt %#x num_planes %d size[0] %d size[1] %d in_reconfig %d\n",
|
||||
hash32_ptr(inst->session), f->type,
|
||||
f->fmt.pix_mp.width, f->fmt.pix_mp.height,
|
||||
|
|
@ -195,7 +195,7 @@ int msm_vidc_g_fmt(void *instance, struct v4l2_format *f)
|
|||
if (inst->session_type == MSM_VIDC_ENCODER)
|
||||
rc = msm_venc_g_fmt(instance, f);
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"g_fmt: %x : type %d wxh %dx%d pixelfmt %#x num_planes %d size[0] %d size[1] %d in_reconfig %d\n",
|
||||
hash32_ptr(inst->session), f->type,
|
||||
f->fmt.pix_mp.width, f->fmt.pix_mp.height,
|
||||
|
|
@ -309,12 +309,12 @@ int msm_vidc_release_buffer(void *instance, int type, unsigned int index)
|
|||
continue;
|
||||
|
||||
if (mbuf->flags & MSM_VIDC_FLAG_RBR_PENDING) {
|
||||
print_vidc_buffer(VIDC_DBG,
|
||||
print_vidc_buffer(VIDC_HIGH,
|
||||
"skip rel buf (rbr pending)", inst, mbuf);
|
||||
continue;
|
||||
}
|
||||
|
||||
print_vidc_buffer(VIDC_DBG, "release buf", inst, mbuf);
|
||||
print_vidc_buffer(VIDC_HIGH, "release buf", inst, mbuf);
|
||||
msm_comm_unmap_vidc_buffer(inst, mbuf);
|
||||
list_del(&mbuf->list);
|
||||
kref_put_mbuf(mbuf);
|
||||
|
|
@ -435,7 +435,7 @@ int msm_vidc_streamon(void *instance, enum v4l2_buf_type i)
|
|||
"Failed to find buffer queue for type = %d\n", i);
|
||||
return -EINVAL;
|
||||
}
|
||||
dprintk(VIDC_DBG, "Calling streamon\n");
|
||||
dprintk(VIDC_HIGH, "Calling streamon\n");
|
||||
mutex_lock(&q->lock);
|
||||
rc = vb2_streamon(&q->vb2_bufq, i);
|
||||
mutex_unlock(&q->lock);
|
||||
|
|
@ -464,7 +464,7 @@ int msm_vidc_streamoff(void *instance, enum v4l2_buf_type i)
|
|||
}
|
||||
|
||||
if (!inst->in_reconfig) {
|
||||
dprintk(VIDC_DBG, "%s: inst %pK release resources\n",
|
||||
dprintk(VIDC_HIGH, "%s: inst %pK release resources\n",
|
||||
__func__, inst);
|
||||
rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
|
||||
if (rc)
|
||||
|
|
@ -473,7 +473,7 @@ int msm_vidc_streamoff(void *instance, enum v4l2_buf_type i)
|
|||
__func__, inst);
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "Calling streamoff\n");
|
||||
dprintk(VIDC_HIGH, "Calling streamoff\n");
|
||||
mutex_lock(&q->lock);
|
||||
rc = vb2_streamoff(&q->vb2_bufq, i);
|
||||
mutex_unlock(&q->lock);
|
||||
|
|
@ -553,7 +553,7 @@ static void msm_vidc_cleanup_buffer(struct vb2_buffer *vb)
|
|||
}
|
||||
|
||||
if (q->vb2_bufq.streaming) {
|
||||
dprintk(VIDC_DBG, "%d PORT is streaming\n",
|
||||
dprintk(VIDC_HIGH, "%d PORT is streaming\n",
|
||||
vb->type);
|
||||
return;
|
||||
}
|
||||
|
|
@ -591,7 +591,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q,
|
|||
case INPUT_MPLANE: {
|
||||
fmt = &inst->fmts[INPUT_PORT];
|
||||
if (*num_buffers < fmt->count_min_host) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Client passed num buffers %d less than the min_host count %d\n",
|
||||
*num_buffers, fmt->count_min_host);
|
||||
}
|
||||
|
|
@ -612,7 +612,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q,
|
|||
if (inst->session_type != MSM_VIDC_DECODER &&
|
||||
inst->state > MSM_VIDC_LOAD_RESOURCES_DONE) {
|
||||
if (*num_buffers < fmt->count_min_host) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Client passed num buffers %d less than the min_host count %d\n",
|
||||
*num_buffers,
|
||||
fmt->count_min_host);
|
||||
|
|
@ -637,7 +637,7 @@ static int msm_vidc_queue_setup(struct vb2_queue *q,
|
|||
break;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"queue_setup: %x : type %d num_buffers %d num_planes %d sizes[0] %d sizes[1] %d\n",
|
||||
hash32_ptr(inst->session), q->type, *num_buffers,
|
||||
*num_planes, sizes[0], sizes[1]);
|
||||
|
|
@ -652,7 +652,7 @@ static inline int msm_vidc_verify_buffer_counts(struct msm_vidc_inst *inst)
|
|||
if (inst->session_type == MSM_VIDC_DECODER &&
|
||||
(inst->state < MSM_VIDC_LOAD_RESOURCES_DONE ||
|
||||
inst->state >= MSM_VIDC_RELEASE_RESOURCES_DONE)) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"No need to verify buffer counts : %pK\n", inst);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -661,7 +661,7 @@ static inline int msm_vidc_verify_buffer_counts(struct msm_vidc_inst *inst)
|
|||
struct hal_buffer_requirements *req = &inst->buff_req.buffer[i];
|
||||
|
||||
if (req && (req->buffer_type == HAL_BUFFER_OUTPUT)) {
|
||||
dprintk(VIDC_DBG, "Verifying Buffer : %d\n",
|
||||
dprintk(VIDC_HIGH, "Verifying Buffer : %d\n",
|
||||
req->buffer_type);
|
||||
if (req->buffer_count_actual <
|
||||
req->buffer_count_min_host ||
|
||||
|
|
@ -732,10 +732,10 @@ bool is_vidc_cvp_allowed(struct msm_vidc_inst *inst)
|
|||
inst->rc_type != V4L2_MPEG_VIDEO_BITRATE_MODE_CQ &&
|
||||
!inst->clk_data.is_legacy_cbr &&
|
||||
!is_secure_session(inst)) {
|
||||
dprintk(VIDC_DBG, "%s: cvp allowed\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: cvp allowed\n", __func__);
|
||||
allowed = true;
|
||||
} else {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: cvp not allowed, cvp_external %d cvp_disable %d extradata %#x rc_type %d legacy_cbr %d secure %d\n",
|
||||
__func__, core->resources.cvp_external,
|
||||
cvp_disable->val, inst->prop.extradata_ctrls,
|
||||
|
|
@ -757,27 +757,27 @@ static int msm_vidc_prepare_preprocess(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
if (!msm_vidc_cvp_usage) {
|
||||
dprintk(VIDC_DBG, "%s: cvp usage disabled\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: cvp usage disabled\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!is_vidc_cvp_allowed(inst)) {
|
||||
dprintk(VIDC_DBG, "%s: cvp not allowed\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: cvp not allowed\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = msm_vidc_cvp_prepare_preprocess(inst);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "%s: no cvp preprocessing\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s: no cvp preprocessing\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
dprintk(VIDC_DBG, "%s: cvp enabled\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: cvp enabled\n", __func__);
|
||||
|
||||
dprintk(VIDC_DBG, "%s: set CVP extradata\n", __func__);
|
||||
dprintk(VIDC_HIGH, "%s: set CVP extradata\n", __func__);
|
||||
rc = msm_comm_set_extradata(inst,
|
||||
HFI_PROPERTY_PARAM_VENC_CVP_METADATA_EXTRADATA, 1);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "%s: set CVP extradata failed\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s: set CVP extradata failed\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
|
@ -794,7 +794,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
|
|||
struct hfi_buffer_size_minimum b;
|
||||
struct v4l2_format *f;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %x : inst %pK\n", __func__,
|
||||
hash32_ptr(inst->session), inst);
|
||||
hdev = inst->core->device;
|
||||
|
||||
|
|
@ -808,7 +808,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
|
|||
if (is_encode_session(inst)) {
|
||||
rc = msm_vidc_prepare_preprocess(inst);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "%s: no preprocessing\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s: no preprocessing\n", __func__);
|
||||
/* ignore error */
|
||||
rc = 0;
|
||||
}
|
||||
|
|
@ -914,7 +914,7 @@ static inline int start_streaming(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
inst->batch.enable = is_batching_allowed(inst);
|
||||
dprintk(VIDC_DBG, "%s: batching %s for inst %pK (%#x)\n",
|
||||
dprintk(VIDC_HIGH, "%s: batching %s for inst %pK (%#x)\n",
|
||||
__func__, inst->batch.enable ? "enabled" : "disabled",
|
||||
inst, hash32_ptr(inst->session));
|
||||
|
||||
|
|
@ -978,7 +978,7 @@ static int msm_vidc_start_streaming(struct vb2_queue *q, unsigned int count)
|
|||
return -EINVAL;
|
||||
}
|
||||
hdev = inst->core->device;
|
||||
dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
|
||||
dprintk(VIDC_HIGH, "Streamon called on: %d capability for inst: %pK\n",
|
||||
q->type, inst);
|
||||
switch (q->type) {
|
||||
case INPUT_MPLANE:
|
||||
|
|
@ -1075,7 +1075,7 @@ static inline int stop_streaming(struct msm_vidc_inst *inst)
|
|||
{
|
||||
int rc = 0;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %x : inst %pK\n", __func__,
|
||||
dprintk(VIDC_HIGH, "%s: %x : inst %pK\n", __func__,
|
||||
hash32_ptr(inst->session), inst);
|
||||
|
||||
rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
|
||||
|
|
@ -1108,7 +1108,7 @@ static void msm_vidc_stop_streaming(struct vb2_queue *q)
|
|||
}
|
||||
|
||||
inst = q->drv_priv;
|
||||
dprintk(VIDC_DBG, "Streamoff called on: %d capability\n", q->type);
|
||||
dprintk(VIDC_HIGH, "Streamoff called on: %d capability\n", q->type);
|
||||
switch (q->type) {
|
||||
case INPUT_MPLANE:
|
||||
if (!inst->bufq[OUTPUT_PORT].vb2_bufq.streaming)
|
||||
|
|
@ -1434,13 +1434,13 @@ static int try_get_ctrl_for_instance(struct msm_vidc_inst *inst,
|
|||
break;
|
||||
case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:
|
||||
ctrl->val = inst->fmts[OUTPUT_PORT].count_min_host;
|
||||
dprintk(VIDC_DBG, "g_min: %x : hal_buffer %d min buffers %d\n",
|
||||
dprintk(VIDC_HIGH, "g_min: %x : hal_buffer %d min buffers %d\n",
|
||||
hash32_ptr(inst->session), HAL_BUFFER_OUTPUT,
|
||||
ctrl->val);
|
||||
break;
|
||||
case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:
|
||||
ctrl->val = inst->fmts[INPUT_PORT].count_min_host;
|
||||
dprintk(VIDC_DBG, "g_min: %x : hal_buffer %d min buffers %d\n",
|
||||
dprintk(VIDC_HIGH, "g_min: %x : hal_buffer %d min buffers %d\n",
|
||||
hash32_ptr(inst->session), HAL_BUFFER_INPUT, ctrl->val);
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDC_VIDEO_EXTRADATA:
|
||||
|
|
@ -1491,7 +1491,7 @@ void *msm_vidc_open(int core_id, int session_type)
|
|||
}
|
||||
|
||||
pr_info(VIDC_DBG_TAG "Opening video instance: %pK, %d\n",
|
||||
"info", inst, session_type);
|
||||
"high", inst, session_type);
|
||||
mutex_init(&inst->sync_lock);
|
||||
mutex_init(&inst->bufq[OUTPUT_PORT].lock);
|
||||
mutex_init(&inst->bufq[INPUT_PORT].lock);
|
||||
|
|
@ -1761,7 +1761,7 @@ int msm_vidc_destroy(struct msm_vidc_inst *inst)
|
|||
msm_vidc_debugfs_deinit_inst(inst);
|
||||
|
||||
pr_info(VIDC_DBG_TAG "Closed video instance: %pK\n",
|
||||
"info", inst);
|
||||
"high", inst);
|
||||
kfree(inst);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ int msm_vidc_init_buffer_count(struct msm_vidc_inst *inst)
|
|||
fmt->count_min_host = fmt->count_actual =
|
||||
fmt->count_min + extra_buff_count;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %x : input min %d min_host %d actual %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: %x : input min %d min_host %d actual %d\n",
|
||||
__func__, hash32_ptr(inst->session),
|
||||
fmt->count_min, fmt->count_min_host, fmt->count_actual);
|
||||
|
||||
|
|
@ -648,7 +648,7 @@ int msm_vidc_init_buffer_count(struct msm_vidc_inst *inst)
|
|||
fmt->count_min_host = fmt->count_actual =
|
||||
fmt->count_min + extra_buff_count;
|
||||
|
||||
dprintk(VIDC_DBG, "%s: %x : output min %d min_host %d actual %d\n",
|
||||
dprintk(VIDC_HIGH, "%s: %x : output min %d min_host %d actual %d\n",
|
||||
__func__, hash32_ptr(inst->session),
|
||||
fmt->count_min, fmt->count_min_host, fmt->count_actual);
|
||||
|
||||
|
|
@ -768,10 +768,10 @@ u32 msm_vidc_calculate_dec_input_frame_size(struct msm_vidc_inst *inst)
|
|||
if (inst->buffer_size_limit &&
|
||||
(inst->buffer_size_limit < frame_size)) {
|
||||
frame_size = inst->buffer_size_limit;
|
||||
dprintk(VIDC_DBG, "input buffer size limited to %d\n",
|
||||
dprintk(VIDC_HIGH, "input buffer size limited to %d\n",
|
||||
frame_size);
|
||||
} else {
|
||||
dprintk(VIDC_DBG, "set input buffer size to %d\n",
|
||||
dprintk(VIDC_HIGH, "set input buffer size to %d\n",
|
||||
frame_size);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ void __dump(struct dump dump[], int len)
|
|||
|
||||
}
|
||||
}
|
||||
dprintk(VIDC_DBG, "%s", formatted_line);
|
||||
dprintk(VIDC_LOW, "%s", formatted_line);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d,
|
|||
llc.line_buffer_write + ddr.total;
|
||||
|
||||
/* Dump all the variables for easier debugging */
|
||||
if (msm_vidc_debug & VIDC_PROF) {
|
||||
if (msm_vidc_debug & VIDC_PERF) {
|
||||
struct dump dump[] = {
|
||||
{"DECODER PARAMETERS", "", DUMP_HEADER_MAGIC},
|
||||
{"lcu size", "%d", lcu_size},
|
||||
|
|
@ -569,7 +569,7 @@ static unsigned long __calculate_encoder(struct vidc_bus_vote_data *d,
|
|||
ddr.total = fp_mult(ddr.total, qsmmu_bw_overhead_factor);
|
||||
llc.total = llc.ref_read_crcb + llc.line_buffer + ddr.total;
|
||||
|
||||
if (msm_vidc_debug & VIDC_PROF) {
|
||||
if (msm_vidc_debug & VIDC_PERF) {
|
||||
struct dump dump[] = {
|
||||
{"ENCODER PARAMETERS", "", DUMP_HEADER_MAGIC},
|
||||
{"width", "%d", width},
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d,
|
|||
llc.line_buffer_write + ddr.total;
|
||||
|
||||
/* Dump all the variables for easier debugging */
|
||||
if (msm_vidc_debug & VIDC_PROF) {
|
||||
if (msm_vidc_debug & VIDC_PERF) {
|
||||
struct dump dump[] = {
|
||||
{"DECODER PARAMETERS", "", DUMP_HEADER_MAGIC},
|
||||
{"lcu size", "%d", lcu_size},
|
||||
|
|
@ -508,7 +508,7 @@ static unsigned long __calculate_encoder(struct vidc_bus_vote_data *d,
|
|||
ddr.total = fp_mult(ddr.total, qsmmu_bw_overhead_factor);
|
||||
llc.total = llc.ref_read_crcb + llc.line_buffer + ddr.total;
|
||||
|
||||
if (msm_vidc_debug & VIDC_PROF) {
|
||||
if (msm_vidc_debug & VIDC_PERF) {
|
||||
struct dump dump[] = {
|
||||
{"ENCODER PARAMETERS", "", DUMP_HEADER_MAGIC},
|
||||
{"width", "%d", width},
|
||||
|
|
|
|||
100
msm/vidc/msm_vidc_clocks.c
Normal file → Executable file
100
msm/vidc/msm_vidc_clocks.c
Normal file → Executable file
|
|
@ -47,13 +47,13 @@ struct msm_vidc_core_ops core_ops_iris2 = {
|
|||
|
||||
static inline void msm_dcvs_print_dcvs_stats(struct clock_data *dcvs)
|
||||
{
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"DCVS: Load_Low %lld, Load Norm %lld, Load High %lld\n",
|
||||
dcvs->load_low,
|
||||
dcvs->load_norm,
|
||||
dcvs->load_high);
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"DCVS: min_threshold %d, max_threshold %d\n",
|
||||
dcvs->min_threshold, dcvs->max_threshold);
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ static int fill_dynamic_stats(struct msm_vidc_inst *inst,
|
|||
vote_data->use_dpb_read = true;
|
||||
}
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"Input CR = %d Recon CR = %d Complexity Factor = %d\n",
|
||||
vote_data->input_cr, vote_data->compression_ratio,
|
||||
vote_data->complexity_factor);
|
||||
|
|
@ -257,12 +257,12 @@ int msm_comm_vote_bus(struct msm_vidc_core *core)
|
|||
vote_data = kzalloc(sizeof(struct vidc_bus_vote_data) *
|
||||
MAX_SUPPORTED_INSTANCES, GFP_ATOMIC);
|
||||
if (!vote_data) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_LOW,
|
||||
"vote_data allocation with GFP_ATOMIC failed\n");
|
||||
vote_data = kzalloc(sizeof(struct vidc_bus_vote_data) *
|
||||
MAX_SUPPORTED_INSTANCES, GFP_KERNEL);
|
||||
if (!vote_data) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_ERR,
|
||||
"vote_data allocation failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ int msm_comm_vote_bus(struct msm_vidc_core *core)
|
|||
|
||||
if ((!filled_len || !device_addr) &&
|
||||
(inst->session_type != MSM_VIDC_CVP)) {
|
||||
dprintk(VIDC_DBG, "%s: no input for session %x\n",
|
||||
dprintk(VIDC_LOW, "%s: no input for session %x\n",
|
||||
__func__, hash32_ptr(inst->session));
|
||||
continue;
|
||||
}
|
||||
|
|
@ -414,7 +414,7 @@ static int msm_dcvs_scale_clocks(struct msm_vidc_inst *inst,
|
|||
inst->clk_data.dcvs_flags = 0;
|
||||
|
||||
if (!inst->clk_data.dcvs_mode || inst->batch.enable) {
|
||||
dprintk(VIDC_DBG, "Skip DCVS (dcvs %d, batching %d)\n",
|
||||
dprintk(VIDC_LOW, "Skip DCVS (dcvs %d, batching %d)\n",
|
||||
inst->clk_data.dcvs_mode, inst->batch.enable);
|
||||
/* update load (freq) with normal value */
|
||||
inst->clk_data.load = inst->clk_data.load_norm;
|
||||
|
|
@ -463,7 +463,7 @@ static int msm_dcvs_scale_clocks(struct msm_vidc_inst *inst,
|
|||
dcvs->dcvs_flags = 0;
|
||||
}
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"DCVS: %x : total bufs %d outside fw %d max threshold %d with fw %d min bufs %d flags %#x\n",
|
||||
hash32_ptr(inst->session), fmt->count_actual,
|
||||
bufs_with_client, dcvs->max_threshold, bufs_with_fw,
|
||||
|
|
@ -489,7 +489,7 @@ static void msm_vidc_update_freq_entry(struct msm_vidc_inst *inst,
|
|||
if (!found) {
|
||||
temp = kzalloc(sizeof(*temp), GFP_KERNEL);
|
||||
if (!temp) {
|
||||
dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
temp->freq = freq;
|
||||
|
|
@ -523,7 +523,7 @@ static unsigned long msm_vidc_max_freq(struct msm_vidc_core *core)
|
|||
|
||||
allowed_clks_tbl = core->resources.allowed_clks_tbl;
|
||||
freq = allowed_clks_tbl[0].clock_rate;
|
||||
dprintk(VIDC_PROF, "Max rate = %lu\n", freq);
|
||||
dprintk(VIDC_PERF, "Max rate = %lu\n", freq);
|
||||
return freq;
|
||||
}
|
||||
|
||||
|
|
@ -571,7 +571,7 @@ void msm_comm_update_input_cr(struct msm_vidc_inst *inst,
|
|||
if (!found) {
|
||||
temp = kzalloc(sizeof(*temp), GFP_KERNEL);
|
||||
if (!temp) {
|
||||
dprintk(VIDC_WARN, "%s: malloc failure.\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s: malloc failure.\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
temp->index = index;
|
||||
|
|
@ -642,7 +642,7 @@ static unsigned long msm_vidc_calc_freq_ar50(struct msm_vidc_inst *inst,
|
|||
freq = max(vpp_cycles, vsp_cycles);
|
||||
freq = max(freq, fw_cycles);
|
||||
|
||||
dprintk(VIDC_DBG, "Update DCVS Load\n");
|
||||
dprintk(VIDC_LOW, "Update DCVS Load\n");
|
||||
allowed_clks_tbl = core->resources.allowed_clks_tbl;
|
||||
for (i = core->resources.allowed_clks_tbl_size - 1; i >= 0; i--) {
|
||||
rate = allowed_clks_tbl[i].clock_rate;
|
||||
|
|
@ -658,7 +658,7 @@ static unsigned long msm_vidc_calc_freq_ar50(struct msm_vidc_inst *inst,
|
|||
|
||||
msm_dcvs_print_dcvs_stats(dcvs);
|
||||
|
||||
dprintk(VIDC_PROF, "%s Inst %pK : Filled Len = %d Freq = %llu\n",
|
||||
dprintk(VIDC_PERF, "%s Inst %pK : Filled Len = %d Freq = %llu\n",
|
||||
__func__, inst, filled_len, freq);
|
||||
|
||||
return (unsigned long) freq;
|
||||
|
|
@ -749,7 +749,7 @@ static unsigned long msm_vidc_calc_freq_iris1(struct msm_vidc_inst *inst,
|
|||
dcvs->load_high = i > 0 ? allowed_clks_tbl[i-1].clock_rate :
|
||||
dcvs->load_norm;
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"%s: inst %pK: %x : filled len %d required freq %llu load_norm %llu\n",
|
||||
__func__, inst, hash32_ptr(inst->session),
|
||||
filled_len, freq, dcvs->load_norm);
|
||||
|
|
@ -842,7 +842,7 @@ static unsigned long msm_vidc_calc_freq_iris2(struct msm_vidc_inst *inst,
|
|||
dcvs->load_high = i > 0 ? allowed_clks_tbl[i-1].clock_rate :
|
||||
dcvs->load_norm;
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"%s: inst %pK: %x : filled len %d required freq %llu load_norm %llu\n",
|
||||
__func__, inst, hash32_ptr(inst->session),
|
||||
filled_len, freq, dcvs->load_norm);
|
||||
|
|
@ -888,7 +888,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core)
|
|||
mutex_unlock(&inst->registeredbufs.lock);
|
||||
|
||||
if (!filled_len || !device_addr) {
|
||||
dprintk(VIDC_DBG, "%s no input for session %x\n",
|
||||
dprintk(VIDC_LOW, "%s no input for session %x\n",
|
||||
__func__, hash32_ptr(inst->session));
|
||||
continue;
|
||||
}
|
||||
|
|
@ -905,7 +905,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core)
|
|||
freq_core_max = max_t(unsigned long, freq_core_1, freq_core_2);
|
||||
|
||||
if (msm_vidc_clock_voting) {
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"msm_vidc_clock_voting %d\n",
|
||||
msm_vidc_clock_voting);
|
||||
freq_core_max = msm_vidc_clock_voting;
|
||||
|
|
@ -942,7 +942,7 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core)
|
|||
core->curr_freq = rate;
|
||||
mutex_unlock(&core->lock);
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"%s: clock rate %lu requested %lu increment %d decrement %d\n",
|
||||
__func__, core->curr_freq, core->min_freq,
|
||||
increment, decrement);
|
||||
|
|
@ -982,7 +982,7 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst)
|
|||
mutex_unlock(&inst->registeredbufs.lock);
|
||||
|
||||
if (!filled_len || !device_addr) {
|
||||
dprintk(VIDC_DBG, "%s no input for session %x\n",
|
||||
dprintk(VIDC_LOW, "%s no input for session %x\n",
|
||||
__func__, hash32_ptr(inst->session));
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1018,11 +1018,11 @@ int msm_comm_scale_clocks_and_bus(struct msm_vidc_inst *inst)
|
|||
hdev = core->device;
|
||||
|
||||
if (msm_comm_scale_clocks(inst)) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"Failed to scale clocks. Performance might be impacted\n");
|
||||
}
|
||||
if (msm_comm_vote_bus(core)) {
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
"Failed to scale DDR bus. Performance might be impacted\n");
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -1042,12 +1042,12 @@ int msm_dcvs_try_enable(struct msm_vidc_inst *inst)
|
|||
inst->batch.enable ||
|
||||
inst->rc_type == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ ||
|
||||
inst->grid_enable) {
|
||||
dprintk(VIDC_PROF, "DCVS disabled: %pK\n", inst);
|
||||
dprintk(VIDC_HIGH, "DCVS disabled: %pK\n", inst);
|
||||
inst->clk_data.dcvs_mode = false;
|
||||
return false;
|
||||
}
|
||||
inst->clk_data.dcvs_mode = true;
|
||||
dprintk(VIDC_PROF, "DCVS enabled: %pK\n", inst);
|
||||
dprintk(VIDC_HIGH, "DCVS enabled: %pK\n", inst);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1064,7 +1064,7 @@ int msm_comm_init_clocks_and_bus_data(struct msm_vidc_inst *inst)
|
|||
}
|
||||
|
||||
if (inst->session_type == MSM_VIDC_CVP) {
|
||||
dprintk(VIDC_DBG, "%s: cvp session\n", __func__);
|
||||
dprintk(VIDC_LOW, "%s: cvp session\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1100,7 +1100,7 @@ void msm_clock_data_reset(struct msm_vidc_inst *inst)
|
|||
struct clock_data *dcvs;
|
||||
struct msm_vidc_format *fmt;
|
||||
|
||||
dprintk(VIDC_DBG, "Init DCVS Load\n");
|
||||
dprintk(VIDC_HIGH, "Init DCVS Load\n");
|
||||
|
||||
if (!inst || !inst->core || !inst->clk_data.entry) {
|
||||
dprintk(VIDC_ERR, "%s Invalid args: Inst = %pK\n",
|
||||
|
|
@ -1224,7 +1224,7 @@ int msm_vidc_decide_work_route_iris1(struct msm_vidc_inst *inst)
|
|||
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR_VFR &&
|
||||
mbps <= CBR_VFR_MB_LIMIT)) {
|
||||
pdata.video_work_route = 1;
|
||||
dprintk(VIDC_DBG, "Configured work route = 1");
|
||||
dprintk(VIDC_HIGH, "Configured work route = 1");
|
||||
}
|
||||
} else {
|
||||
return -EINVAL;
|
||||
|
|
@ -1237,7 +1237,7 @@ decision_done:
|
|||
(void *)inst->session, HFI_PROPERTY_PARAM_WORK_ROUTE,
|
||||
(void *)&pdata, sizeof(pdata));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure work route %pK\n", inst);
|
||||
|
||||
return rc;
|
||||
|
|
@ -1285,14 +1285,14 @@ int msm_vidc_decide_work_route_iris2(struct msm_vidc_inst *inst)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "Configurng work route = %u",
|
||||
dprintk(VIDC_HIGH, "Configurng work route = %u",
|
||||
pdata.video_work_route);
|
||||
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
(void *)inst->session, HFI_PROPERTY_PARAM_WORK_ROUTE,
|
||||
(void *)&pdata, sizeof(pdata));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure work route %pK\n", inst);
|
||||
else
|
||||
inst->clk_data.work_route = pdata.video_work_route;
|
||||
|
|
@ -1348,7 +1348,7 @@ decision_done:
|
|||
(void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE,
|
||||
(void *)&pdata, sizeof(pdata));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure Work Mode %pK\n", inst);
|
||||
|
||||
/* For WORK_MODE_1, set Low Latency mode by default to HW. */
|
||||
|
|
@ -1388,7 +1388,7 @@ int msm_vidc_decide_work_mode_iris1(struct msm_vidc_inst *inst)
|
|||
|
||||
if (inst->clk_data.low_latency_mode) {
|
||||
pdata.video_work_mode = HFI_WORKMODE_1;
|
||||
dprintk(VIDC_DBG, "Configured work mode = 1");
|
||||
dprintk(VIDC_HIGH, "Configured work mode = 1");
|
||||
goto decision_done;
|
||||
}
|
||||
|
||||
|
|
@ -1432,7 +1432,7 @@ decision_done:
|
|||
(void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE,
|
||||
(void *)&pdata, sizeof(pdata));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure Work Mode %pK\n", inst);
|
||||
|
||||
/* For WORK_MODE_1, set Low Latency mode by default to HW. */
|
||||
|
|
@ -1494,7 +1494,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
|
|||
}
|
||||
if (inst->rc_type == RATE_CONTROL_LOSSLESS &&
|
||||
out_f->fmt.pix_mp.pixelformat == V4L2_PIX_FMT_H264) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Set work mode to low latency for AVC lossless encoding.");
|
||||
latency.enable = true;
|
||||
}
|
||||
|
|
@ -1502,7 +1502,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "Configuring work mode = %u low latency = %u",
|
||||
dprintk(VIDC_HIGH, "Configuring work mode = %u low latency = %u",
|
||||
pdata.video_work_mode,
|
||||
latency.enable);
|
||||
|
||||
|
|
@ -1512,7 +1512,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
|
|||
HFI_PROPERTY_PARAM_VENC_LOW_LATENCY_MODE,
|
||||
(void *)&latency, sizeof(latency));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure low latency %pK\n", inst);
|
||||
else
|
||||
inst->clk_data.low_latency_mode = latency.enable;
|
||||
|
|
@ -1522,7 +1522,7 @@ int msm_vidc_decide_work_mode_iris2(struct msm_vidc_inst *inst)
|
|||
(void *)inst->session, HFI_PROPERTY_PARAM_WORK_MODE,
|
||||
(void *)&pdata, sizeof(pdata));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure Work Mode %pK\n", inst);
|
||||
else
|
||||
inst->clk_data.work_mode = pdata.video_work_mode;
|
||||
|
|
@ -1541,7 +1541,7 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
|
|||
|
||||
hdev = inst->core->device;
|
||||
if (inst->session_type != MSM_VIDC_ENCODER) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_LOW,
|
||||
"%s : Not an encoder session. Nothing to do\n",
|
||||
__func__);
|
||||
return 0;
|
||||
|
|
@ -1576,7 +1576,7 @@ static inline int msm_vidc_power_save_mode_enable(struct msm_vidc_inst *inst,
|
|||
inst->flags | VIDC_LOW_POWER :
|
||||
inst->flags & ~VIDC_LOW_POWER;
|
||||
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Power Save Mode for inst: %pK Enable = %d\n", inst, enable);
|
||||
fail_power_mode_set:
|
||||
return rc;
|
||||
|
|
@ -1587,7 +1587,7 @@ static int msm_vidc_move_core_to_power_save_mode(struct msm_vidc_core *core,
|
|||
{
|
||||
struct msm_vidc_inst *inst = NULL;
|
||||
|
||||
dprintk(VIDC_PROF, "Core %d : Moving all inst to LP mode\n", core_id);
|
||||
dprintk(VIDC_HIGH, "Core %d : Moving all inst to LP mode\n", core_id);
|
||||
mutex_lock(&core->lock);
|
||||
list_for_each_entry(inst, &core->instances, list) {
|
||||
if (inst->clk_data.core_id == core_id &&
|
||||
|
|
@ -1692,12 +1692,12 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst)
|
|||
cur_inst_lp_load = (msm_comm_get_inst_load(inst,
|
||||
LOAD_CALC_NO_QUIRKS) * lp_cycles)/inst->clk_data.work_route;
|
||||
|
||||
dprintk(VIDC_DBG, "Core 0 RT Load = %d Core 1 RT Load = %d\n",
|
||||
dprintk(VIDC_HIGH, "Core 0 RT Load = %d Core 1 RT Load = %d\n",
|
||||
core0_load, core1_load);
|
||||
dprintk(VIDC_DBG, "Core 0 RT LP Load = %d Core 1 RT LP Load = %d\n",
|
||||
dprintk(VIDC_HIGH, "Core 0 RT LP Load = %d Core 1 RT LP Load = %d\n",
|
||||
core0_lp_load, core1_lp_load);
|
||||
dprintk(VIDC_DBG, "Max Load = %lu\n", max_freq);
|
||||
dprintk(VIDC_DBG, "Current Load = %d Current LP Load = %d\n",
|
||||
dprintk(VIDC_HIGH, "Max Load = %lu\n", max_freq);
|
||||
dprintk(VIDC_HIGH, "Current Load = %d Current LP Load = %d\n",
|
||||
current_inst_load, cur_inst_lp_load);
|
||||
|
||||
if (inst->session_type == MSM_VIDC_ENCODER) {
|
||||
|
|
@ -1728,14 +1728,14 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst)
|
|||
|
||||
if (current_inst_load + min_load < max_freq) {
|
||||
inst->clk_data.core_id = min_core_id;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Selected normally : Core ID = %d\n",
|
||||
inst->clk_data.core_id);
|
||||
msm_vidc_power_save_mode_enable(inst, false);
|
||||
} else if (cur_inst_lp_load + min_load < max_freq) {
|
||||
/* Move current instance to LP and return */
|
||||
inst->clk_data.core_id = min_core_id;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Selected by moving current to LP : Core ID = %d\n",
|
||||
inst->clk_data.core_id);
|
||||
msm_vidc_power_save_mode_enable(inst, true);
|
||||
|
|
@ -1743,7 +1743,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst)
|
|||
} else if (cur_inst_lp_load + min_lp_load < max_freq) {
|
||||
/* Move all instances to LP mode and return */
|
||||
inst->clk_data.core_id = min_lp_core_id;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Moved all inst's to LP: Core ID = %d\n",
|
||||
inst->clk_data.core_id);
|
||||
msm_vidc_move_core_to_power_save_mode(core, min_lp_core_id);
|
||||
|
|
@ -1756,7 +1756,7 @@ int msm_vidc_decide_core_and_power_mode_iris1(struct msm_vidc_inst *inst)
|
|||
|
||||
decision_done:
|
||||
core_info.video_core_enable_mask = inst->clk_data.core_id;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Core Enable Mask %d\n", core_info.video_core_enable_mask);
|
||||
|
||||
rc = call_hfi_op(hdev, session_set_property,
|
||||
|
|
@ -1764,7 +1764,7 @@ decision_done:
|
|||
HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE, &core_info,
|
||||
sizeof(core_info));
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN,
|
||||
dprintk(VIDC_ERR,
|
||||
" Failed to configure CORE ID %pK\n", inst);
|
||||
|
||||
rc = msm_comm_scale_clocks_and_bus(inst);
|
||||
|
|
@ -1802,7 +1802,7 @@ void msm_print_core_status(struct msm_vidc_core *core, u32 core_id)
|
|||
struct v4l2_format *out_f;
|
||||
struct v4l2_format *inp_f;
|
||||
|
||||
dprintk(VIDC_PROF, "Instances running on core %u", core_id);
|
||||
dprintk(VIDC_PERF, "Instances running on core %u", core_id);
|
||||
mutex_lock(&core->lock);
|
||||
list_for_each_entry(inst, &core->instances, list) {
|
||||
|
||||
|
|
@ -1811,7 +1811,7 @@ void msm_print_core_status(struct msm_vidc_core *core, u32 core_id)
|
|||
continue;
|
||||
out_f = &inst->fmts[OUTPUT_PORT].v4l2_fmt;
|
||||
inp_f = &inst->fmts[INPUT_PORT].v4l2_fmt;
|
||||
dprintk(VIDC_PROF,
|
||||
dprintk(VIDC_PERF,
|
||||
"inst %pK (%4ux%4u) to (%4ux%4u) %3u %s %s %s %s %lu\n",
|
||||
inst,
|
||||
inp_f->fmt.pix_mp.width,
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,7 +9,7 @@
|
|||
#include "vidc_hfi_api.h"
|
||||
#include <linux/of_fdt.h>
|
||||
|
||||
int msm_vidc_debug = VIDC_ERR | VIDC_WARN | VIDC_PRINTK |
|
||||
int msm_vidc_debug = VIDC_ERR | VIDC_PRINTK |
|
||||
FW_HIGH | FW_ERROR | FW_FATAL | FW_FTRACE;
|
||||
EXPORT_SYMBOL(msm_vidc_debug);
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ static ssize_t core_info_read(struct file *file, char __user *buf,
|
|||
cur += write_str(cur, end - cur, "Core state: %d\n", core->state);
|
||||
rc = call_hfi_op(hdev, get_fw_info, hdev->hfi_device_data, &fw_info);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "Failed to read FW info\n");
|
||||
dprintk(VIDC_ERR, "Failed to read FW info\n");
|
||||
goto err_fw_info;
|
||||
}
|
||||
|
||||
|
|
@ -129,14 +129,14 @@ static ssize_t trigger_ssr_write(struct file *filp, const char __user *buf,
|
|||
size = count;
|
||||
|
||||
if (copy_from_user(kbuf, buf, size)) {
|
||||
dprintk(VIDC_WARN, "%s User memory fault\n", __func__);
|
||||
dprintk(VIDC_ERR, "%s User memory fault\n", __func__);
|
||||
rc = -EFAULT;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rc = kstrtoul(kbuf, 0, &ssr_trigger_val);
|
||||
if (rc) {
|
||||
dprintk(VIDC_WARN, "returning error err %d\n", rc);
|
||||
dprintk(VIDC_ERR, "returning error err %d\n", rc);
|
||||
rc = -EINVAL;
|
||||
} else {
|
||||
msm_vidc_trigger_ssr(core, ssr_trigger_val);
|
||||
|
|
@ -233,7 +233,7 @@ failed_create_dir:
|
|||
|
||||
static int inst_info_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
dprintk(VIDC_INFO, "Open inode ptr: %pK\n", inode->i_private);
|
||||
dprintk(VIDC_LOW, "Open inode ptr: %pK\n", inode->i_private);
|
||||
file->private_data = inode->i_private;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -395,7 +395,7 @@ failed_alloc:
|
|||
|
||||
static int inst_info_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
dprintk(VIDC_INFO, "Release inode ptr: %pK\n", inode->i_private);
|
||||
dprintk(VIDC_LOW, "Release inode ptr: %pK\n", inode->i_private);
|
||||
file->private_data = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -463,7 +463,7 @@ void msm_vidc_debugfs_deinit_inst(struct msm_vidc_inst *inst)
|
|||
|
||||
dentry = inst->debugfs_root;
|
||||
if (dentry->d_inode) {
|
||||
dprintk(VIDC_INFO, "Destroy %pK\n", dentry->d_inode->i_private);
|
||||
dprintk(VIDC_LOW, "Destroy %pK\n", dentry->d_inode->i_private);
|
||||
kfree(dentry->d_inode->i_private);
|
||||
dentry->d_inode->i_private = NULL;
|
||||
}
|
||||
|
|
@ -489,10 +489,10 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
|
|||
inst->count.ebd++;
|
||||
if (inst->count.ebd && inst->count.ebd == inst->count.etb) {
|
||||
toc(inst, FRAME_PROCESSING);
|
||||
dprintk(VIDC_PROF, "EBD: FW needs input buffers\n");
|
||||
dprintk(VIDC_PERF, "EBD: FW needs input buffers\n");
|
||||
}
|
||||
if (inst->count.ftb == inst->count.fbd)
|
||||
dprintk(VIDC_PROF, "EBD: FW needs output buffers\n");
|
||||
dprintk(VIDC_PERF, "EBD: FW needs output buffers\n");
|
||||
break;
|
||||
case MSM_VIDC_DEBUGFS_EVENT_FTB: {
|
||||
inst->count.ftb++;
|
||||
|
|
@ -508,10 +508,10 @@ void msm_vidc_debugfs_update(struct msm_vidc_inst *inst,
|
|||
if (inst->count.fbd &&
|
||||
inst->count.fbd == inst->count.ftb) {
|
||||
toc(inst, FRAME_PROCESSING);
|
||||
dprintk(VIDC_PROF, "FBD: FW needs output buffers\n");
|
||||
dprintk(VIDC_PERF, "FBD: FW needs output buffers\n");
|
||||
}
|
||||
if (inst->count.etb == inst->count.ebd)
|
||||
dprintk(VIDC_PROF, "FBD: FW needs input buffers\n");
|
||||
dprintk(VIDC_PERF, "FBD: FW needs input buffers\n");
|
||||
break;
|
||||
default:
|
||||
dprintk(VIDC_ERR, "Invalid state in debugfs: %d\n", e);
|
||||
|
|
|
|||
|
|
@ -33,11 +33,10 @@
|
|||
|
||||
enum vidc_msg_prio {
|
||||
VIDC_ERR = 0x00000001,
|
||||
VIDC_WARN = 0x00000002,
|
||||
VIDC_INFO = 0x00000004,
|
||||
VIDC_DBG = 0x00000008,
|
||||
VIDC_PROF = 0x00000010,
|
||||
VIDC_PKT = 0x00000020,
|
||||
VIDC_HIGH = 0x00000002,
|
||||
VIDC_LOW = 0x00000004,
|
||||
VIDC_PERF = 0x00000008,
|
||||
VIDC_PKT = 0x00000010,
|
||||
VIDC_PRINTK = 0x00001000,
|
||||
VIDC_FTRACE = 0x00002000,
|
||||
FW_LOW = 0x00010000,
|
||||
|
|
@ -119,7 +118,7 @@ extern bool msm_vidc_cvp_usage;
|
|||
|
||||
#define MSM_VIDC_ERROR(value) \
|
||||
do { if (value) \
|
||||
dprintk(VIDC_DBG, "BugOn"); \
|
||||
dprintk(VIDC_ERR, "BugOn"); \
|
||||
BUG_ON(value); \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -139,14 +138,12 @@ static inline char *get_debug_level_str(int level)
|
|||
switch (level) {
|
||||
case VIDC_ERR:
|
||||
return "err";
|
||||
case VIDC_WARN:
|
||||
return "warn";
|
||||
case VIDC_INFO:
|
||||
return "info";
|
||||
case VIDC_DBG:
|
||||
return "dbg";
|
||||
case VIDC_PROF:
|
||||
return "prof";
|
||||
case VIDC_HIGH:
|
||||
return "high";
|
||||
case VIDC_LOW:
|
||||
return "low";
|
||||
case VIDC_PERF:
|
||||
return "perf";
|
||||
case VIDC_PKT:
|
||||
return "pkt";
|
||||
default:
|
||||
|
|
@ -161,7 +158,7 @@ static inline void tic(struct msm_vidc_inst *i, enum profiling_points p,
|
|||
|
||||
if (!i->debug.pdata[p].name[0])
|
||||
memcpy(i->debug.pdata[p].name, b, 64);
|
||||
if ((msm_vidc_debug & VIDC_PROF) &&
|
||||
if ((msm_vidc_debug & VIDC_PERF) &&
|
||||
i->debug.pdata[p].sampling) {
|
||||
do_gettimeofday(&__ddl_tv);
|
||||
i->debug.pdata[p].start =
|
||||
|
|
@ -174,7 +171,7 @@ static inline void toc(struct msm_vidc_inst *i, enum profiling_points p)
|
|||
{
|
||||
struct timeval __ddl_tv;
|
||||
|
||||
if ((msm_vidc_debug & VIDC_PROF) &&
|
||||
if ((msm_vidc_debug & VIDC_PERF) &&
|
||||
!i->debug.pdata[p].sampling) {
|
||||
do_gettimeofday(&__ddl_tv);
|
||||
i->debug.pdata[p].stop = (__ddl_tv.tv_sec * 1000)
|
||||
|
|
@ -191,15 +188,15 @@ static inline void show_stats(struct msm_vidc_inst *i)
|
|||
|
||||
for (x = 0; x < MAX_PROFILING_POINTS; x++) {
|
||||
if (i->debug.pdata[x].name[0] &&
|
||||
(msm_vidc_debug & VIDC_PROF)) {
|
||||
(msm_vidc_debug & VIDC_PERF)) {
|
||||
if (i->debug.samples) {
|
||||
dprintk(VIDC_PROF, "%s averaged %d ms/sample\n",
|
||||
dprintk(VIDC_PERF, "%s averaged %d ms/sample\n",
|
||||
i->debug.pdata[x].name,
|
||||
i->debug.pdata[x].cumulative /
|
||||
i->debug.samples);
|
||||
}
|
||||
|
||||
dprintk(VIDC_PROF, "%s Samples: %d\n",
|
||||
dprintk(VIDC_PERF, "%s Samples: %d\n",
|
||||
i->debug.pdata[x].name,
|
||||
i->debug.samples);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,7 @@ static int msm_vidc_read_efuse(
|
|||
data->sku_version =
|
||||
(efuse & (efuse_data[i]).mask) >>
|
||||
(efuse_data[i]).shift;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"efuse 0x%x, platform version 0x%x\n",
|
||||
efuse, data->sku_version);
|
||||
|
||||
|
|
@ -1124,7 +1124,7 @@ void *vidc_get_drv_data(struct device *dev)
|
|||
dprintk(VIDC_ERR,
|
||||
"Failed to get ddr type, use LPDDR5\n");
|
||||
}
|
||||
dprintk(VIDC_DBG, "DDR Type %x\n", ddr_type);
|
||||
dprintk(VIDC_HIGH, "DDR Type %x\n", ddr_type);
|
||||
|
||||
if (driver_data->ubwc_config &&
|
||||
(ddr_type == DDR_TYPE_LPDDR4 ||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res)
|
|||
* qcom,reg-presets is an optional property. It likely won't be
|
||||
* present if we don't have any register settings to program
|
||||
*/
|
||||
dprintk(VIDC_DBG, "qcom,reg-presets not found\n");
|
||||
dprintk(VIDC_HIGH, "qcom,reg-presets not found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res)
|
|||
reg_set->count /= sizeof(*reg_set->reg_tbl) / sizeof(u32);
|
||||
|
||||
if (!reg_set->count) {
|
||||
dprintk(VIDC_DBG, "no elements in reg set\n");
|
||||
dprintk(VIDC_HIGH, "no elements in reg set\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ static int msm_vidc_load_reg_table(struct msm_vidc_platform_resources *res)
|
|||
return -EINVAL;
|
||||
}
|
||||
for (i = 0; i < reg_set->count; i++) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"reg = %x, value = %x\n",
|
||||
reg_set->reg_tbl[i].reg,
|
||||
reg_set->reg_tbl[i].value
|
||||
|
|
@ -192,7 +192,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res)
|
|||
* qcom,qdss-presets is an optional property. It likely won't be
|
||||
* present if we don't have any register settings to program
|
||||
*/
|
||||
dprintk(VIDC_DBG, "qcom,qdss-presets not found\n");
|
||||
dprintk(VIDC_HIGH, "qcom,qdss-presets not found\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res)
|
|||
qdss_addr_set->count /= sizeof(*qdss_addr_set->addr_tbl) / sizeof(u32);
|
||||
|
||||
if (!qdss_addr_set->count) {
|
||||
dprintk(VIDC_DBG, "no elements in qdss reg set\n");
|
||||
dprintk(VIDC_HIGH, "no elements in qdss reg set\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ static int msm_vidc_load_qdss_table(struct msm_vidc_platform_resources *res)
|
|||
}
|
||||
|
||||
for (i = 0; i < qdss_addr_set->count; i++) {
|
||||
dprintk(VIDC_DBG, "qdss addr = %x, value = %x\n",
|
||||
dprintk(VIDC_HIGH, "qdss addr = %x, value = %x\n",
|
||||
qdss_addr_set->addr_tbl[i].start,
|
||||
qdss_addr_set->addr_tbl[i].size);
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ static int msm_vidc_load_subcache_info(struct msm_vidc_platform_resources *res)
|
|||
num_subcaches = of_property_count_strings(pdev->dev.of_node,
|
||||
"cache-slice-names");
|
||||
if (num_subcaches <= 0) {
|
||||
dprintk(VIDC_DBG, "No subcaches found\n");
|
||||
dprintk(VIDC_HIGH, "No subcaches found\n");
|
||||
goto err_load_subcache_table_fail;
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ static int msm_vidc_load_subcache_info(struct msm_vidc_platform_resources *res)
|
|||
}
|
||||
|
||||
subcaches->count = num_subcaches;
|
||||
dprintk(VIDC_DBG, "Found %d subcaches\n", num_subcaches);
|
||||
dprintk(VIDC_HIGH, "Found %d subcaches\n", num_subcaches);
|
||||
|
||||
for (c = 0; c < num_subcaches; ++c) {
|
||||
struct subcache_info *vsc = &res->subcache_set.subcache_tbl[c];
|
||||
|
|
@ -303,7 +303,7 @@ int msm_vidc_load_u32_table(struct platform_device *pdev,
|
|||
u32 *ptbl = NULL;
|
||||
|
||||
if (!of_find_property(of_node, table_name, NULL)) {
|
||||
dprintk(VIDC_DBG, "%s not found\n", table_name);
|
||||
dprintk(VIDC_HIGH, "%s not found\n", table_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ static int msm_vidc_load_allowed_clocks_table(
|
|||
|
||||
if (!of_find_property(pdev->dev.of_node,
|
||||
"qcom,allowed-clock-rates", NULL)) {
|
||||
dprintk(VIDC_DBG, "qcom,allowed-clock-rates not found\n");
|
||||
dprintk(VIDC_HIGH, "qcom,allowed-clock-rates not found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -436,7 +436,7 @@ static int msm_vidc_populate_bus(struct device *dev,
|
|||
range, ARRAY_SIZE(range));
|
||||
if (rc) {
|
||||
rc = 0;
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"'qcom,range' not found defaulting to <0 INT_MAX>\n");
|
||||
range[0] = 0;
|
||||
range[1] = INT_MAX;
|
||||
|
|
@ -447,7 +447,7 @@ static int msm_vidc_populate_bus(struct device *dev,
|
|||
|
||||
buses->count++;
|
||||
bus->dev = dev;
|
||||
dprintk(VIDC_DBG, "Found bus %s [%d->%d] with mode %s\n",
|
||||
dprintk(VIDC_HIGH, "Found bus %s [%d->%d] with mode %s\n",
|
||||
bus->name, bus->master, bus->slave, bus->mode);
|
||||
err_bus:
|
||||
return rc;
|
||||
|
|
@ -467,7 +467,7 @@ static int msm_vidc_load_buffer_usage_table(
|
|||
* likely won't be present if the core doesn't support content
|
||||
* protection
|
||||
*/
|
||||
dprintk(VIDC_DBG, "buffer-type-tz-usage-table not found\n");
|
||||
dprintk(VIDC_HIGH, "buffer-type-tz-usage-table not found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ static int msm_vidc_load_buffer_usage_table(
|
|||
buffer_usage_set->count /=
|
||||
sizeof(*buffer_usage_set->buffer_usage_tbl) / sizeof(u32);
|
||||
if (!buffer_usage_set->count) {
|
||||
dprintk(VIDC_DBG, "no elements in buffer usage set\n");
|
||||
dprintk(VIDC_HIGH, "no elements in buffer usage set\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -565,7 +565,7 @@ static int msm_vidc_load_regulator_table(
|
|||
regulator_node = of_parse_phandle(domains_parent_node,
|
||||
domains_property->name, 0);
|
||||
if (IS_ERR(regulator_node)) {
|
||||
dprintk(VIDC_WARN, "%s is not a phandle\n",
|
||||
dprintk(VIDC_ERR, "%s is not a phandle\n",
|
||||
domains_property->name);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -587,13 +587,13 @@ static int msm_vidc_load_regulator_table(
|
|||
rinfo->has_hw_power_collapse = of_property_read_bool(
|
||||
regulator_node, "qcom,support-hw-trigger");
|
||||
|
||||
dprintk(VIDC_DBG, "Found regulator %s: h/w collapse = %s\n",
|
||||
dprintk(VIDC_HIGH, "Found regulator %s: h/w collapse = %s\n",
|
||||
rinfo->name,
|
||||
rinfo->has_hw_power_collapse ? "yes" : "no");
|
||||
}
|
||||
|
||||
if (!regulators->count)
|
||||
dprintk(VIDC_DBG, "No regulators found");
|
||||
dprintk(VIDC_HIGH, "No regulators found");
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -614,7 +614,7 @@ static int msm_vidc_load_clock_table(
|
|||
num_clocks = of_property_count_strings(pdev->dev.of_node,
|
||||
"clock-names");
|
||||
if (num_clocks <= 0) {
|
||||
dprintk(VIDC_DBG, "No clocks found\n");
|
||||
dprintk(VIDC_HIGH, "No clocks found\n");
|
||||
clocks->count = 0;
|
||||
rc = 0;
|
||||
goto err_load_clk_table_fail;
|
||||
|
|
@ -645,7 +645,7 @@ static int msm_vidc_load_clock_table(
|
|||
}
|
||||
|
||||
clocks->count = num_clocks;
|
||||
dprintk(VIDC_DBG, "Found %d clocks\n", num_clocks);
|
||||
dprintk(VIDC_HIGH, "Found %d clocks\n", num_clocks);
|
||||
|
||||
for (c = 0; c < num_clocks; ++c) {
|
||||
struct clock_info *vc = &res->clock_set.clock_tbl[c];
|
||||
|
|
@ -664,7 +664,7 @@ static int msm_vidc_load_clock_table(
|
|||
else
|
||||
vc->has_mem_retention = false;
|
||||
|
||||
dprintk(VIDC_DBG, "Found clock %s: scale-able = %s\n", vc->name,
|
||||
dprintk(VIDC_HIGH, "Found clock %s: scale-able = %s\n", vc->name,
|
||||
vc->has_scaling ? "yes" : "no");
|
||||
}
|
||||
|
||||
|
|
@ -686,7 +686,7 @@ static int msm_vidc_load_reset_table(
|
|||
num_clocks = of_property_count_strings(pdev->dev.of_node,
|
||||
"reset-names");
|
||||
if (num_clocks <= 0) {
|
||||
dprintk(VIDC_DBG, "No reset clocks found\n");
|
||||
dprintk(VIDC_HIGH, "No reset clocks found\n");
|
||||
rst->count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -697,7 +697,7 @@ static int msm_vidc_load_reset_table(
|
|||
return -ENOMEM;
|
||||
|
||||
rst->count = num_clocks;
|
||||
dprintk(VIDC_DBG, "Found %d reset clocks\n", num_clocks);
|
||||
dprintk(VIDC_HIGH, "Found %d reset clocks\n", num_clocks);
|
||||
|
||||
for (c = 0; c < num_clocks; ++c) {
|
||||
struct reset_info *rc = &res->reset_set.reset_tbl[c];
|
||||
|
|
@ -719,12 +719,12 @@ static int msm_decide_dt_node(
|
|||
rc = of_property_read_u32(pdev->dev.of_node, "sku-index",
|
||||
&sku_index);
|
||||
if (rc) {
|
||||
dprintk(VIDC_DBG, "'sku_index' not found in node\n");
|
||||
dprintk(VIDC_HIGH, "'sku_index' not found in node\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sku_index != res->sku_version) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Failed to parser dt: sku_index %d res->sku_version - %d\n",
|
||||
sku_index, res->sku_version);
|
||||
return -EINVAL;
|
||||
|
|
@ -772,7 +772,7 @@ int read_platform_resources_from_drv_data(
|
|||
|
||||
res->fw_name = "venus";
|
||||
|
||||
dprintk(VIDC_DBG, "Firmware filename: %s\n", res->fw_name);
|
||||
dprintk(VIDC_HIGH, "Firmware filename: %s\n", res->fw_name);
|
||||
|
||||
res->max_load = find_key_value(platform_data,
|
||||
"qcom,max-hw-load");
|
||||
|
|
@ -859,7 +859,7 @@ static int msm_vidc_populate_cx_ipeak_context(
|
|||
if (IS_ERR(res->cx_ipeak_context)) {
|
||||
rc = PTR_ERR(res->cx_ipeak_context);
|
||||
if (rc == -EPROBE_DEFER)
|
||||
dprintk(VIDC_INFO,
|
||||
dprintk(VIDC_HIGH,
|
||||
"cx-ipeak register failed. Deferring probe!");
|
||||
else
|
||||
dprintk(VIDC_ERR,
|
||||
|
|
@ -870,14 +870,14 @@ static int msm_vidc_populate_cx_ipeak_context(
|
|||
}
|
||||
|
||||
if (res->cx_ipeak_context)
|
||||
dprintk(VIDC_INFO, "cx-ipeak register successful");
|
||||
dprintk(VIDC_HIGH, "cx-ipeak register successful");
|
||||
else
|
||||
dprintk(VIDC_INFO, "cx-ipeak register not implemented");
|
||||
dprintk(VIDC_HIGH, "cx-ipeak register not implemented");
|
||||
|
||||
of_property_read_u32(pdev->dev.of_node,
|
||||
"qcom,clock-freq-threshold",
|
||||
&res->clk_freq_threshold);
|
||||
dprintk(VIDC_DBG, "cx ipeak threshold frequency = %u\n",
|
||||
dprintk(VIDC_HIGH, "cx ipeak threshold frequency = %u\n",
|
||||
res->clk_freq_threshold);
|
||||
|
||||
return rc;
|
||||
|
|
@ -914,11 +914,11 @@ int read_platform_resources_from_dt(
|
|||
|
||||
rc = msm_vidc_load_subcache_info(res);
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN, "Failed to load subcache info: %d\n", rc);
|
||||
dprintk(VIDC_ERR, "Failed to load subcache info: %d\n", rc);
|
||||
|
||||
rc = msm_vidc_load_qdss_table(res);
|
||||
if (rc)
|
||||
dprintk(VIDC_WARN, "Failed to load qdss reg table: %d\n", rc);
|
||||
dprintk(VIDC_ERR, "Failed to load qdss reg table: %d\n", rc);
|
||||
|
||||
rc = msm_vidc_load_reg_table(res);
|
||||
if (rc) {
|
||||
|
|
@ -1026,8 +1026,8 @@ static int msm_vidc_setup_context_bank(struct msm_vidc_platform_resources *res,
|
|||
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
|
||||
dma_set_seg_boundary(dev, DMA_BIT_MASK(64));
|
||||
|
||||
dprintk(VIDC_DBG, "Attached %s and created mapping\n", dev_name(dev));
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH, "Attached %s and created mapping\n", dev_name(dev));
|
||||
dprintk(VIDC_HIGH,
|
||||
"Context bank name:%s, buffer_type: %#x, is_secure: %d, address range start: %#x, size: %#x, dev: %pK, domain: %pK",
|
||||
cb->name, cb->buffer_type, cb->is_secure, cb->addr_range.start,
|
||||
cb->addr_range.size, cb->dev, cb->domain);
|
||||
|
|
@ -1098,12 +1098,12 @@ static int msm_vidc_populate_context_bank(struct device *dev,
|
|||
|
||||
rc = of_property_read_string(np, "label", &cb->name);
|
||||
if (rc) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"Failed to read cb label from device tree\n");
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
dprintk(VIDC_DBG, "%s: context bank has name %s\n", __func__, cb->name);
|
||||
dprintk(VIDC_HIGH, "%s: context bank has name %s\n", __func__, cb->name);
|
||||
rc = of_property_read_u32_array(np, "virtual-addr-pool",
|
||||
(u32 *)&cb->addr_range, 2);
|
||||
if (rc) {
|
||||
|
|
@ -1114,7 +1114,7 @@ static int msm_vidc_populate_context_bank(struct device *dev,
|
|||
}
|
||||
|
||||
cb->is_secure = of_property_read_bool(np, "qcom,secure-context-bank");
|
||||
dprintk(VIDC_DBG, "context bank %s : secure = %d\n",
|
||||
dprintk(VIDC_HIGH, "context bank %s : secure = %d\n",
|
||||
cb->name, cb->is_secure);
|
||||
|
||||
/* setup buffer type for each sub device*/
|
||||
|
|
@ -1124,7 +1124,7 @@ static int msm_vidc_populate_context_bank(struct device *dev,
|
|||
rc = -ENOENT;
|
||||
goto err_setup_cb;
|
||||
}
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"context bank %s address start = %x address size = %x buffer_type = %x\n",
|
||||
cb->name, cb->addr_range.start,
|
||||
cb->addr_range.size, cb->buffer_type);
|
||||
|
|
@ -1164,7 +1164,7 @@ static int msm_vidc_populate_legacy_context_bank(
|
|||
domains_parent_node = of_find_node_by_name(pdev->dev.of_node,
|
||||
"qcom,vidc-iommu-domains");
|
||||
if (!domains_parent_node) {
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s legacy iommu domains not present\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1231,7 +1231,7 @@ static int msm_vidc_populate_legacy_context_bank(
|
|||
dprintk(VIDC_ERR, "Cannot setup context bank %d\n", rc);
|
||||
goto err_setup_cb;
|
||||
}
|
||||
dprintk(VIDC_DBG,
|
||||
dprintk(VIDC_HIGH,
|
||||
"%s: context bank %s secure %d addr start = %#x addr size = %#x buffer_type = %#x\n",
|
||||
__func__, cb->name, cb->is_secure, cb->addr_range.start,
|
||||
cb->addr_range.size, cb->buffer_type);
|
||||
|
|
@ -1268,7 +1268,7 @@ int read_context_bank_resources_from_dt(struct platform_device *pdev)
|
|||
if (rc)
|
||||
dprintk(VIDC_ERR, "Failed to probe context bank\n");
|
||||
else
|
||||
dprintk(VIDC_DBG, "Successfully probed context bank\n");
|
||||
dprintk(VIDC_HIGH, "Successfully probed context bank\n");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue