Skip to content

Commit

Permalink
msm: vidc: Remove Idle indicator configuration
Browse files Browse the repository at this point in the history
For power collapse, idle check will be enabled by default
by venus fw. So no need to configure this property.

Change-Id: I8decb5874f24f9d0f50e874080694c3249499762
CRs-Fixed: 2194587
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
  • Loading branch information
Shivendra Kakrania authored and Gerrit - the friendly Code Review server committed Feb 23, 2018
1 parent 66f2205 commit 8889a7d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 66 deletions.
20 changes: 0 additions & 20 deletions drivers/media/platform/msm/vidc/hfi_packetization.c
Expand Up @@ -252,25 +252,6 @@ int create_pkt_cmd_sys_pc_prep(struct hfi_cmd_sys_pc_prep_packet *pkt)
return rc;
}

int create_pkt_cmd_sys_idle_indicator(
struct hfi_cmd_sys_set_property_packet *pkt,
u32 enable)
{
struct hfi_enable *hfi;

if (!pkt)
return -EINVAL;

pkt->size = sizeof(struct hfi_cmd_sys_set_property_packet) +
sizeof(struct hfi_enable) + sizeof(u32);
pkt->packet_type = HFI_CMD_SYS_SET_PROPERTY;
pkt->num_properties = 1;
pkt->rg_property_data[0] = HFI_PROPERTY_SYS_IDLE_INDICATOR;
hfi = (struct hfi_enable *) &pkt->rg_property_data[1];
hfi->enable = enable;
return 0;
}

int create_pkt_cmd_sys_debug_config(
struct hfi_cmd_sys_set_property_packet *pkt,
u32 mode)
Expand Down Expand Up @@ -1949,7 +1930,6 @@ int create_pkt_cmd_session_sync_process(
static struct hfi_packetization_ops hfi_default = {
.sys_init = create_pkt_cmd_sys_init,
.sys_pc_prep = create_pkt_cmd_sys_pc_prep,
.sys_idle_indicator = create_pkt_cmd_sys_idle_indicator,
.sys_power_control = create_pkt_cmd_sys_power_control,
.sys_set_resource = create_pkt_cmd_sys_set_resource,
.sys_debug_config = create_pkt_cmd_sys_debug_config,
Expand Down
4 changes: 1 addition & 3 deletions drivers/media/platform/msm/vidc/hfi_packetization.h
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -29,8 +29,6 @@ enum hfi_packetization_type {
struct hfi_packetization_ops {
int (*sys_init)(struct hfi_cmd_sys_init_packet *pkt, u32 arch_type);
int (*sys_pc_prep)(struct hfi_cmd_sys_pc_prep_packet *pkt);
int (*sys_idle_indicator)(struct hfi_cmd_sys_set_property_packet *pkt,
u32 enable);
int (*sys_power_control)(struct hfi_cmd_sys_set_property_packet *pkt,
u32 enable);
int (*sys_set_resource)(
Expand Down
5 changes: 1 addition & 4 deletions drivers/media/platform/msm/vidc/msm_vidc_debug.c
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -26,7 +26,6 @@ int msm_vidc_fw_debug = 0x18;
int msm_vidc_fw_debug_mode = 1;
int msm_vidc_fw_low_power_mode = 1;
bool msm_vidc_fw_coverage = !true;
bool msm_vidc_sys_idle_indicator = !true;
bool msm_vidc_thermal_mitigation_disabled = !true;
bool msm_vidc_clock_scaling = true;
bool msm_vidc_syscache_disable = !true;
Expand Down Expand Up @@ -199,8 +198,6 @@ struct dentry *msm_vidc_debugfs_init_drv(void)
__debugfs_create(u32, "fw_low_power_mode",
&msm_vidc_fw_low_power_mode) &&
__debugfs_create(u32, "debug_output", &msm_vidc_debug_out) &&
__debugfs_create(bool, "sys_idle_indicator",
&msm_vidc_sys_idle_indicator) &&
__debugfs_create(bool, "disable_thermal_mitigation",
&msm_vidc_thermal_mitigation_disabled) &&
__debugfs_create(bool, "clock_scaling",
Expand Down
1 change: 0 additions & 1 deletion drivers/media/platform/msm/vidc/msm_vidc_debug.h
Expand Up @@ -57,7 +57,6 @@ extern int msm_vidc_fw_debug;
extern int msm_vidc_fw_debug_mode;
extern int msm_vidc_fw_low_power_mode;
extern bool msm_vidc_fw_coverage;
extern bool msm_vidc_sys_idle_indicator;
extern bool msm_vidc_thermal_mitigation_disabled;
extern bool msm_vidc_clock_scaling;
extern bool msm_vidc_syscache_disable;
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
Expand Up @@ -765,8 +765,6 @@ int read_platform_resources_from_drv_data(

res->slave_side_cp = find_key_value(platform_data,
"qcom,slave-side-cp");
res->sys_idle_indicator = find_key_value(platform_data,
"qcom,enable-idle-indicator");
res->thermal_mitigable = find_key_value(platform_data,
"qcom,enable-thermal-mitigation");
res->msm_vidc_pwr_collapse_delay = find_key_value(platform_data,
Expand Down
3 changes: 1 addition & 2 deletions drivers/media/platform/msm/vidc/msm_vidc_resources.h
@@ -1,4 +1,4 @@
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -170,7 +170,6 @@ struct msm_vidc_platform_resources {
struct bus_set bus_set;
bool use_non_secure_pil;
bool sw_power_collapsible;
bool sys_idle_indicator;
bool slave_side_cp;
struct list_head context_banks;
bool thermal_mitigable;
Expand Down
34 changes: 6 additions & 28 deletions drivers/media/platform/msm/vidc/venus_hfi.c
Expand Up @@ -400,7 +400,7 @@ static int __write_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
static void __hal_sim_modify_msg_packet(u8 *packet,
struct venus_hfi_device *device)
{
struct hfi_msg_sys_session_init_done_packet *sys_idle;
struct hfi_msg_sys_session_init_done_packet *init_done;
struct hal_session *session = NULL;
phys_addr_t fw_bias = 0;

Expand All @@ -413,16 +413,16 @@ static void __hal_sim_modify_msg_packet(u8 *packet,
}

fw_bias = device->hal_data->firmware_base;
sys_idle = (struct hfi_msg_sys_session_init_done_packet *)packet;
session = __get_session(device, sys_idle->session_id);
init_done = (struct hfi_msg_sys_session_init_done_packet *)packet;
session = __get_session(device, init_done->session_id);

if (!session) {
dprintk(VIDC_DBG, "%s: Invalid session id: %x\n",
__func__, sys_idle->session_id);
__func__, init_done->session_id);
return;
}

switch (sys_idle->packet_type) {
switch (init_done->packet_type) {
case HFI_MSG_SESSION_FILL_BUFFER_DONE:
if (session->is_decoder) {
struct
Expand Down Expand Up @@ -1623,24 +1623,6 @@ static int __sys_set_coverage(struct venus_hfi_device *device, u32 mode)
return 0;
}

static int __sys_set_idle_message(struct venus_hfi_device *device,
bool enable)
{
u8 packet[VIDC_IFACEQ_VAR_SMALL_PKT_SIZE];
struct hfi_cmd_sys_set_property_packet *pkt =
(struct hfi_cmd_sys_set_property_packet *) &packet;

if (!enable) {
dprintk(VIDC_DBG, "sys_idle_indicator is not enabled\n");
return 0;
}

call_hfi_pkt_op(device, sys_idle_indicator, pkt, enable);
if (__iface_cmdq_write(device, pkt))
return -ENOTEMPTY;
return 0;
}

static int __sys_set_power_control(struct venus_hfi_device *device,
bool enable)
{
Expand Down Expand Up @@ -1998,9 +1980,6 @@ static void __set_default_sys_properties(struct venus_hfi_device *device)
{
if (__sys_set_debug(device, msm_vidc_fw_debug))
dprintk(VIDC_WARN, "Setting fw_debug msg ON failed\n");
if (__sys_set_idle_message(device,
device->res->sys_idle_indicator || msm_vidc_sys_idle_indicator))
dprintk(VIDC_WARN, "Setting idle response ON failed\n");
if (__sys_set_power_control(device, msm_vidc_fw_low_power_mode))
dprintk(VIDC_WARN, "Setting h/w power collapse ON failed\n");
}
Expand Down Expand Up @@ -2753,8 +2732,7 @@ static void venus_hfi_pm_handler(struct work_struct *work)
wfi_status);
goto skip_power_off;
}
if (device->res->sys_idle_indicator &&
!(idle_status & BIT(30))) {
if (!(idle_status & BIT(30))) {
dprintk(VIDC_WARN,
"Skipping PC as idle_status (%#x) bit not set\n",
idle_status);
Expand Down
7 changes: 1 addition & 6 deletions drivers/media/platform/msm/vidc/vidc_hfi.h
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -511,11 +511,6 @@ struct hfi_msg_sys_session_abort_done_packet {
u32 error_type;
};

struct hfi_msg_sys_idle_packet {
u32 size;
u32 packet_type;
};

struct hfi_msg_sys_ping_ack_packet {
u32 size;
u32 packet_type;
Expand Down

0 comments on commit 8889a7d

Please sign in to comment.