diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c index 472a87e7aba2..33b411aeb3f7 100644 --- a/arch/arm/mach-msm/devices-8064.c +++ b/arch/arm/mach-msm/devices-8064.c @@ -1192,6 +1192,7 @@ struct msm_vidc_platform_data apq8064_vidc_platform_data = { .disable_dmx = 0, .disable_fullhd = 0, .cont_mode_dpb_count = 18, + .fw_addr = 0x9fe00000, }; struct platform_device apq8064_msm_device_vidc = { diff --git a/arch/arm/mach-msm/devices-8930.c b/arch/arm/mach-msm/devices-8930.c index 6ea8d7bd1808..aba467beac3b 100644 --- a/arch/arm/mach-msm/devices-8930.c +++ b/arch/arm/mach-msm/devices-8930.c @@ -695,6 +695,7 @@ struct msm_vidc_platform_data apq8930_vidc_platform_data = { #endif .disable_dmx = 1, .disable_fullhd = 0, + .fw_addr = 0x9fe00000, }; struct platform_device apq8930_msm_device_vidc = { diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c index 3522e8020317..8b7e097f32a1 100644 --- a/arch/arm/mach-msm/devices-8960.c +++ b/arch/arm/mach-msm/devices-8960.c @@ -729,6 +729,7 @@ struct msm_vidc_platform_data vidc_platform_data = { .disable_dmx = 0, .disable_fullhd = 0, .cont_mode_dpb_count = 18, + .fw_addr = 0x9fe00000, }; struct platform_device msm_device_vidc = { diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c index 8bc455e72692..f36b4ec2f72c 100644 --- a/arch/arm/mach-msm/devices-msm8x60.c +++ b/arch/arm/mach-msm/devices-msm8x60.c @@ -2286,15 +2286,18 @@ struct msm_vidc_platform_data vidc_platform_data = { #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION .memtype = ION_CP_MM_HEAP_ID, .enable_ion = 1, - .cp_enabled = 0, + .cp_enabled = 1, + .secure_wb_heap = 1, #else .memtype = MEMTYPE_SMI_KERNEL, .enable_ion = 0, + .secure_wb_heap = 0, #endif .disable_dmx = 0, .disable_fullhd = 0, .cont_mode_dpb_count = 8, .disable_turbo = 1, + .fw_addr = 0x38000000, }; struct platform_device msm_device_vidc = { diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h index ef0b51708815..1aa381481915 100644 --- a/arch/arm/mach-msm/include/mach/board.h +++ b/arch/arm/mach-msm/include/mach/board.h @@ -519,11 +519,13 @@ struct msm_vidc_platform_data { int disable_dmx; int disable_fullhd; u32 cp_enabled; + u32 secure_wb_heap; #ifdef CONFIG_MSM_BUS_SCALING struct msm_bus_scale_pdata *vidc_bus_client_pdata; #endif int cont_mode_dpb_count; int disable_turbo; + unsigned long fw_addr; }; struct vcap_platform_data { diff --git a/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c b/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c index a5171f01d05a..291de5fa463b 100644 --- a/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c +++ b/drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c @@ -25,7 +25,6 @@ #include "vidc.h" #include "vcd_res_tracker.h" -#define PIL_FW_BASE_ADDR 0x9fe00000 #define PIL_FW_SIZE 0x200000 static unsigned int vidc_clk_table[4] = { @@ -181,6 +180,7 @@ static int res_trk_pmem_alloc { u32 alloc_size; struct ddl_context *ddl_context; + unsigned long fw_addr; int rc = 0; DBG_PMEM("\n%s() IN: Requested alloc size(%u)", __func__, (u32)sz); if (!addr) { @@ -216,8 +216,9 @@ static int res_trk_pmem_alloc goto bail_out; } } else { + fw_addr = resource_context.vidc_platform_data->fw_addr; addr->alloc_handle = NULL; - addr->alloced_phys_addr = PIL_FW_BASE_ADDR; + addr->alloced_phys_addr = fw_addr; addr->buffer_size = sz; } } else { @@ -966,6 +967,10 @@ int res_trk_open_secure_session() } msm_ion_secure_heap(ION_HEAP(resource_context.memtype)); msm_ion_secure_heap(ION_HEAP(resource_context.cmd_mem_type)); + + if (resource_context.vidc_platform_data->secure_wb_heap) + msm_ion_secure_heap(ION_HEAP(ION_CP_WB_HEAP_ID)); + res_trk_disable_iommu_clocks(); mutex_unlock(&resource_context.secure_lock); } @@ -988,6 +993,10 @@ int res_trk_close_secure_session() } msm_ion_unsecure_heap(ION_HEAP(resource_context.cmd_mem_type)); msm_ion_unsecure_heap(ION_HEAP(resource_context.memtype)); + + if (resource_context.vidc_platform_data->secure_wb_heap) + msm_ion_unsecure_heap(ION_HEAP(ION_CP_WB_HEAP_ID)); + res_trk_disable_iommu_clocks(); mutex_unlock(&resource_context.secure_lock); }