mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
vidc: Add required variables in platform data for content protection
Add, initialize variables for firmware addr & secure write back buffers in vidc platform data. Change-Id: Ibb1e464af2e0e9038c8d43d6756d5a8481c7f618 Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
This commit is contained in:
parent
74d6d6695b
commit
249e5104d7
6 changed files with 20 additions and 3 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue