本文整理汇总了C++中MALI_DEBUG_PRINT函数的典型用法代码示例。如果您正苦于以下问题:C++ MALI_DEBUG_PRINT函数的具体用法?C++ MALI_DEBUG_PRINT怎么用?C++ MALI_DEBUG_PRINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MALI_DEBUG_PRINT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mali_regulator_set_voltage
void mali_regulator_set_voltage(int min_uV, int max_uV)
{
int voltage;
#if !MALI_DVFS_ENABLED
min_uV = mali_gpu_vol;
max_uV = mali_gpu_vol;
#endif
/*
#if MALI_VOLTAGE_LOCK
if (mali_vol_lock_flag == MALI_FALSE) {
if (min_uV < MALI_BOTTOMLOCK_VOL || max_uV < MALI_BOTTOMLOCK_VOL) {
min_uV = MALI_BOTTOMLOCK_VOL;
max_uV = MALI_BOTTOMLOCK_VOL;
}
} else if (_mali_osk_atomic_read(&voltage_lock_status) > 0 ) {
if (min_uV < mali_lock_vol || max_uV < mali_lock_vol) {
#if MALI_DVFS_ENABLED
int mali_vol_get;
mali_vol_get = mali_vol_get_from_table(mali_lock_vol);
if (mali_vol_get) {
min_uV = mali_vol_get;
max_uV = mali_vol_get;
}
#else
min_uV = mali_lock_vol;
max_uV = mali_lock_vol;
#endif
}
}
#endif
*/
_mali_osk_lock_wait(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
if( IS_ERR_OR_NULL(g3d_regulator) )
{
MALI_DEBUG_PRINT(1, ("error on mali_regulator_set_voltage : g3d_regulator is null\n"));
return;
}
MALI_DEBUG_PRINT(2, ("= regulator_set_voltage: %d, %d \n",min_uV, max_uV));
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
MALI_PROFILING_EVENT_REASON_SINGLE_SW_GPU_VOLTS,
min_uV, max_uV, 1, 0, 0);
#endif
regulator_set_voltage(g3d_regulator,min_uV,max_uV);
voltage = regulator_get_voltage(g3d_regulator);
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
MALI_PROFILING_EVENT_REASON_SINGLE_SW_GPU_VOLTS,
voltage, 0, 2, 0, 0);
#endif
mali_gpu_vol = voltage;
MALI_DEBUG_PRINT(1, ("= regulator_get_voltage: %d \n",mali_gpu_vol));
_mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
}
开发者ID:gokussjx,项目名称:Googy-Max-Kernel,代码行数:64,代码来源:mali_platform.c
示例2: mali_dvfs_work_handler
static void mali_dvfs_work_handler(struct work_struct *w)
{
int change_clk = 0;
int change_step = 0;
bMaliDvfsRun=1;
/* dvfs table change when clock was changed */
if (step0_clk != mali_dvfs[0].clock) {
MALI_PRINT(("::: step0_clk change to %d Mhz\n", step0_clk));
change_clk = step0_clk;
change_step = 0;
step0_clk = change_dvfs_tableset(change_clk, change_step);
}
#if (MALI_DVFS_STEPS > 1)
if (step1_clk != mali_dvfs[1].clock) {
MALI_PRINT(("::: step1_clk change to %d Mhz\n", step1_clk));
change_clk = step1_clk;
change_step = 1;
step1_clk = change_dvfs_tableset(change_clk, change_step);
}
if (step0_up != mali_dvfs_threshold[0].upthreshold) {
MALI_PRINT(("::: step0_up change to %d %\n", step0_up));
mali_dvfs_threshold[0].upthreshold = step0_up;
}
if (step1_down != mali_dvfs_threshold[1].downthreshold) {
MALI_PRINT((":::step1_down change to %d %\n", step1_down));
mali_dvfs_threshold[1].downthreshold = step1_down;
}
#if (MALI_DVFS_STEPS > 2)
if (step2_clk != mali_dvfs[2].clock) {
MALI_PRINT(("::: step2_clk change to %d Mhz\n", step2_clk));
change_clk = step2_clk;
change_step = 2;
step2_clk = change_dvfs_tableset(change_clk, change_step);
}
if (step1_up != mali_dvfs_threshold[1].upthreshold) {
MALI_PRINT((":::step1_up change to %d %\n", step1_up));
mali_dvfs_threshold[1].upthreshold = step1_up;
}
if (step2_down != mali_dvfs_threshold[2].downthreshold) {
MALI_PRINT((":::step2_down change to %d %\n", step2_down));
mali_dvfs_threshold[2].downthreshold = step2_down;
}
#if (MALI_DVFS_STEPS > 3)
if (step3_clk != mali_dvfs[3].clock) {
MALI_PRINT(("::: step3_clk change to %d Mhz\n", step3_clk));
change_clk = step3_clk;
change_step = 3;
step3_clk = change_dvfs_tableset(change_clk, change_step);
}
if (step2_up != mali_dvfs_threshold[2].upthreshold) {
MALI_PRINT((":::step2_up change to %d %\n", step2_up));
mali_dvfs_threshold[2].upthreshold = step2_up;
}
if (step3_down != mali_dvfs_threshold[3].downthreshold) {
MALI_PRINT((":::step3_down change to %d %\n", step3_down));
mali_dvfs_threshold[3].downthreshold = step3_down;
}
#if (MALI_DVFS_STEPS > 4)
if (step4_clk != mali_dvfs[4].clock) {
MALI_PRINT(("::: step4_clk change to %d Mhz\n", step4_clk));
change_clk = step4_clk;
change_step = 4;
step4_clk = change_dvfs_tableset(change_clk, change_step);
}
if (step3_up != mali_dvfs_threshold[3].upthreshold) {
MALI_PRINT((":::step3_up change to %d %\n", step3_up));
mali_dvfs_threshold[3].upthreshold = step3_up;
}
if (step4_down != mali_dvfs_threshold[4].downthreshold) {
MALI_PRINT((":::step4_down change to %d %\n", step4_down));
mali_dvfs_threshold[4].downthreshold = step4_down;
}
#endif
#endif
#endif
#endif
#ifdef DEBUG
mali_dvfs[0].vol = step0_vol;
mali_dvfs[1].vol = step1_vol;
mali_dvfs[2].vol = step2_vol;
mali_dvfs[3].vol = step3_vol;
mali_dvfs[4].vol = step4_vol;
#endif
MALI_DEBUG_PRINT(3, ("=== mali_dvfs_work_handler\n"));
if (!mali_dvfs_status(mali_dvfs_utilization))
MALI_DEBUG_PRINT(1,( "error on mali dvfs status in mali_dvfs_work_handler"));
bMaliDvfsRun=0;
}
开发者ID:aatjitra,项目名称:PR26,代码行数:93,代码来源:mali_platform_dvfs.c
示例3: mali_allocation_engine_allocate_memory
_mali_osk_errcode_t mali_allocation_engine_allocate_memory(mali_allocation_engine mem_engine, mali_memory_allocation * descriptor, mali_physical_memory_allocator * physical_allocators, _mali_osk_list_t *tracking_list )
{
memory_engine * engine = (memory_engine*)mem_engine;
MALI_DEBUG_ASSERT_POINTER(engine);
MALI_DEBUG_ASSERT_POINTER(descriptor);
MALI_DEBUG_ASSERT_POINTER(physical_allocators);
/* ASSERT that the list member has been initialized, even if it won't be
* used for tracking. We need it to be initialized to see if we need to
* delete it from a list in the release function. */
MALI_DEBUG_ASSERT( NULL != descriptor->list.next && NULL != descriptor->list.prev );
if (_MALI_OSK_ERR_OK == engine->mali_address->allocate(descriptor))
{
_mali_osk_errcode_t res = _MALI_OSK_ERR_OK;
if ( descriptor->flags & MALI_MEMORY_ALLOCATION_FLAG_MAP_INTO_USERSPACE )
{
res = engine->process_address->allocate(descriptor);
}
if ( _MALI_OSK_ERR_OK == res )
{
/* address space setup OK, commit physical memory to the allocation */
mali_physical_memory_allocator * active_allocator = physical_allocators;
struct mali_physical_memory_allocation * active_allocation_tracker = &descriptor->physical_allocation;
u32 offset = 0;
while ( NULL != active_allocator )
{
switch (active_allocator->allocate(active_allocator->ctx, mem_engine, descriptor, &offset, active_allocation_tracker))
{
case MALI_MEM_ALLOC_FINISHED:
if ( NULL != tracking_list )
{
/* Insert into the memory session list */
/* ASSERT that it is not already part of a list */
MALI_DEBUG_ASSERT( _mali_osk_list_empty( &descriptor->list ) );
_mali_osk_list_add( &descriptor->list, tracking_list );
}
MALI_SUCCESS; /* all done */
case MALI_MEM_ALLOC_NONE:
/* reuse current active_allocation_tracker */
MALI_DEBUG_PRINT( 4, ("Memory Engine Allocate: No allocation on %s, resorting to %s\n",
( active_allocator->name ) ? active_allocator->name : "UNNAMED",
( active_allocator->next ) ? (( active_allocator->next->name )? active_allocator->next->name : "UNNAMED") : "NONE") );
active_allocator = active_allocator->next;
break;
case MALI_MEM_ALLOC_PARTIAL:
if (NULL != active_allocator->next)
{
/* need a new allocation tracker */
active_allocation_tracker->next = _mali_osk_calloc(1, sizeof(mali_physical_memory_allocation));
if (NULL != active_allocation_tracker->next)
{
active_allocation_tracker = active_allocation_tracker->next;
MALI_DEBUG_PRINT( 2, ("Memory Engine Allocate: Partial allocation on %s, resorting to %s\n",
( active_allocator->name ) ? active_allocator->name : "UNNAMED",
( active_allocator->next ) ? (( active_allocator->next->name )? active_allocator->next->name : "UNNAMED") : "NONE") );
active_allocator = active_allocator->next;
break;
}
}
/* FALL THROUGH */
case MALI_MEM_ALLOC_INTERNAL_FAILURE:
active_allocator = NULL; /* end the while loop */
break;
}
}
MALI_PRINT(("Memory allocate failed, could not allocate size %d kB.\n", descriptor->size/1024));
/* allocation failure, start cleanup */
/* loop over any potential partial allocations */
active_allocation_tracker = &descriptor->physical_allocation;
while (NULL != active_allocation_tracker)
{
/* handle blank trackers which will show up during failure */
if (NULL != active_allocation_tracker->release)
{
active_allocation_tracker->release(active_allocation_tracker->ctx, active_allocation_tracker->handle);
}
active_allocation_tracker = active_allocation_tracker->next;
}
/* free the allocation tracker objects themselves, skipping the tracker stored inside the descriptor itself */
for ( active_allocation_tracker = descriptor->physical_allocation.next; active_allocation_tracker != NULL; )
{
void * buf = active_allocation_tracker;
active_allocation_tracker = active_allocation_tracker->next;
_mali_osk_free(buf);
}
/* release the address spaces */
if ( descriptor->flags & MALI_MEMORY_ALLOCATION_FLAG_MAP_INTO_USERSPACE )
{
engine->process_address->release(descriptor);
}
}
engine->mali_address->release(descriptor);
//.........这里部分代码省略.........
开发者ID:Andro-Boy,项目名称:Googy-Max2-Kernel,代码行数:101,代码来源:mali_kernel_memory_engine.c
示例4: mali_platform_device_register
int mali_platform_device_register(void)
{
int err = -1;
#if defined(CONFIG_ARCH_REALVIEW)
u32 m400_gp_version;
#endif
MALI_DEBUG_PRINT(4, ("mali_platform_device_register() called\n"));
/* Detect present Mali GPU and connect the correct resources to the device */
#if defined(CONFIG_ARCH_VEXPRESS)
if (mali_read_phys(0xFC020000) == 0x00010100)
{
MALI_DEBUG_PRINT(4, ("Registering Mali-450 MP8 device\n"));
err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources_m450_mp8, sizeof(mali_gpu_resources_m450_mp8) / sizeof(mali_gpu_resources_m450_mp8[0]));
}
#elif defined(CONFIG_ARCH_REALVIEW)
m400_gp_version = mali_read_phys(0xC000006C);
if (m400_gp_version == 0x00000000 && (mali_read_phys(0xC000206c) & 0xFFFF0000) == 0x0A070000)
{
MALI_DEBUG_PRINT(4, ("Registering Mali-200 device\n"));
err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources_m200, sizeof(mali_gpu_resources_m200) / sizeof(mali_gpu_resources_m200[0]));
mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */
}
else if ((m400_gp_version & 0xFFFF0000) == 0x0C070000)
{
MALI_DEBUG_PRINT(4, ("Registering Mali-300 device\n"));
err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources_m300, sizeof(mali_gpu_resources_m300) / sizeof(mali_gpu_resources_m300[0]));
mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */
}
else if ((m400_gp_version & 0xFFFF0000) == 0x0B070000)
{
u32 fpga_fw_version = mali_read_phys(0xC0010000);
if (fpga_fw_version == 0x130C008F || fpga_fw_version == 0x110C008F)
{
/* Mali-400 MP1 r1p0 or r1p1 */
MALI_DEBUG_PRINT(4, ("Registering Mali-400 MP1 device\n"));
err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources_m400_mp1, sizeof(mali_gpu_resources_m400_mp1) / sizeof(mali_gpu_resources_m400_mp1[0]));
mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */
}
else if (fpga_fw_version == 0x130C000F)
{
/* Mali-400 MP2 r1p1 */
MALI_DEBUG_PRINT(4, ("Registering Mali-400 MP2 device\n"));
err = platform_device_add_resources(&mali_gpu_device, mali_gpu_resources_m400_mp2, sizeof(mali_gpu_resources_m400_mp2) / sizeof(mali_gpu_resources_m400_mp2[0]));
mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */
}
}
#endif
if (0 == err)
{
err = platform_device_add_data(&mali_gpu_device, &mali_gpu_data, sizeof(mali_gpu_data));
if (0 == err)
{
/* Register the platform device */
err = platform_device_register(&mali_gpu_device);
if (0 == err)
{
#ifdef CONFIG_PM_RUNTIME
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
pm_runtime_set_autosuspend_delay(&(mali_gpu_device.dev), 1000);
pm_runtime_use_autosuspend(&(mali_gpu_device.dev));
#endif
pm_runtime_enable(&(mali_gpu_device.dev));
#endif
return 0;
}
}
platform_device_unregister(&mali_gpu_device);
}
return err;
}
开发者ID:ColinIanKing,项目名称:m576,代码行数:80,代码来源:arm.c
示例5: mali_pp_job_start
void mali_pp_job_start(struct mali_pp_core *core, struct mali_pp_job *job, u32 sub_job, mali_bool restart_virtual)
{
u32 relative_address;
u32 start_index;
u32 nr_of_regs;
u32 *frame_registers = mali_pp_job_get_frame_registers(job);
u32 *wb0_registers = mali_pp_job_get_wb0_registers(job);
u32 *wb1_registers = mali_pp_job_get_wb1_registers(job);
u32 *wb2_registers = mali_pp_job_get_wb2_registers(job);
u32 counter_src0 = mali_pp_job_get_perf_counter_src0(job, sub_job);
u32 counter_src1 = mali_pp_job_get_perf_counter_src1(job, sub_job);
MALI_DEBUG_ASSERT_POINTER(core);
/* Write frame registers */
/*
* There are two frame registers which are different for each sub job:
* 1. The Renderer List Address Register (MALI200_REG_ADDR_FRAME)
* 2. The FS Stack Address Register (MALI200_REG_ADDR_STACK)
*/
mali_hw_core_register_write_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_FRAME, mali_pp_job_get_addr_frame(job, sub_job), mali_frame_registers_reset_values[MALI200_REG_ADDR_FRAME / sizeof(u32)]);
/* For virtual jobs, the stack address shouldn't be broadcast but written individually */
if (!mali_pp_job_is_virtual(job) || restart_virtual) {
mali_hw_core_register_write_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_STACK, mali_pp_job_get_addr_stack(job, sub_job), mali_frame_registers_reset_values[MALI200_REG_ADDR_STACK / sizeof(u32)]);
}
/* Write registers between MALI200_REG_ADDR_FRAME and MALI200_REG_ADDR_STACK */
relative_address = MALI200_REG_ADDR_RSW;
start_index = MALI200_REG_ADDR_RSW / sizeof(u32);
nr_of_regs = (MALI200_REG_ADDR_STACK - MALI200_REG_ADDR_RSW) / sizeof(u32);
mali_hw_core_register_write_array_relaxed_conditional(&core->hw_core,
relative_address, &frame_registers[start_index],
nr_of_regs, &mali_frame_registers_reset_values[start_index]);
/* MALI200_REG_ADDR_STACK_SIZE */
relative_address = MALI200_REG_ADDR_STACK_SIZE;
start_index = MALI200_REG_ADDR_STACK_SIZE / sizeof(u32);
mali_hw_core_register_write_relaxed_conditional(&core->hw_core,
relative_address, frame_registers[start_index],
mali_frame_registers_reset_values[start_index]);
/* Skip 2 reserved registers */
/* Write remaining registers */
relative_address = MALI200_REG_ADDR_ORIGIN_OFFSET_X;
start_index = MALI200_REG_ADDR_ORIGIN_OFFSET_X / sizeof(u32);
nr_of_regs = MALI_PP_MALI400_NUM_FRAME_REGISTERS - MALI200_REG_ADDR_ORIGIN_OFFSET_X / sizeof(u32);
mali_hw_core_register_write_array_relaxed_conditional(&core->hw_core,
relative_address, &frame_registers[start_index],
nr_of_regs, &mali_frame_registers_reset_values[start_index]);
/* Write WBx registers */
if (wb0_registers[0]) { /* M200_WB0_REG_SOURCE_SELECT register */
mali_hw_core_register_write_array_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_WB0, wb0_registers, _MALI_PP_MAX_WB_REGISTERS, mali_wb_registers_reset_values);
}
if (wb1_registers[0]) { /* M200_WB1_REG_SOURCE_SELECT register */
mali_hw_core_register_write_array_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_WB1, wb1_registers, _MALI_PP_MAX_WB_REGISTERS, mali_wb_registers_reset_values);
}
if (wb2_registers[0]) { /* M200_WB2_REG_SOURCE_SELECT register */
mali_hw_core_register_write_array_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_WB2, wb2_registers, _MALI_PP_MAX_WB_REGISTERS, mali_wb_registers_reset_values);
}
if (MALI_HW_CORE_NO_COUNTER != counter_src0) {
mali_hw_core_register_write_relaxed(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_0_SRC, counter_src0);
mali_hw_core_register_write_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_0_ENABLE, MALI200_REG_VAL_PERF_CNT_ENABLE, mali_perf_cnt_enable_reset_value);
}
if (MALI_HW_CORE_NO_COUNTER != counter_src1) {
mali_hw_core_register_write_relaxed(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_1_SRC, counter_src1);
mali_hw_core_register_write_relaxed_conditional(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_1_ENABLE, MALI200_REG_VAL_PERF_CNT_ENABLE, mali_perf_cnt_enable_reset_value);
}
#ifdef CONFIG_MALI400_HEATMAPS_ENABLED
if(job->uargs.perf_counter_flag & _MALI_PERFORMANCE_COUNTER_FLAG_HEATMAP_ENABLE) {
mali_hw_core_register_write_relaxed(&core->hw_core, MALI200_REG_ADDR_MGMT_PERFMON_CONTR, ((job->uargs.tilesx & 0x3FF) << 16) | 1);
mali_hw_core_register_write_relaxed(&core->hw_core, MALI200_REG_ADDR_MGMT_PERFMON_BASE, job->uargs.heatmap_mem & 0xFFFFFFF8);
}
#endif /* CONFIG_MALI400_HEATMAPS_ENABLED */
MALI_DEBUG_PRINT(3, ("Mali PP: Starting job 0x%08X part %u/%u on PP core %s\n", job, sub_job + 1, mali_pp_job_get_sub_job_count(job), core->hw_core.description));
/* Adding barrier to make sure all rester writes are finished */
_mali_osk_write_mem_barrier();
/* This is the command that starts the core. */
mali_hw_core_register_write_relaxed(&core->hw_core, MALI200_REG_ADDR_MGMT_CTRL_MGMT, MALI200_REG_VAL_CTRL_MGMT_START_RENDERING);
/* Adding barrier to make sure previous rester writes is finished */
_mali_osk_write_mem_barrier();
}
开发者ID:CobraJet93,项目名称:kernel-3.10.54,代码行数:96,代码来源:mali_pp.c
示例6: mali_pp_print_state
void mali_pp_print_state(struct mali_pp_core *core)
{
MALI_DEBUG_PRINT(2, ("Mali PP: State: 0x%08x\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_STATUS) ));
}
开发者ID:CobraJet93,项目名称:kernel-3.10.54,代码行数:4,代码来源:mali_pp.c
示例7: _mali_osk_wait_queue_wait_event
void _mali_osk_wait_queue_wait_event( _mali_osk_wait_queue_t *queue, mali_bool (*condition)(void) )
{
MALI_DEBUG_ASSERT_POINTER( queue );
MALI_DEBUG_PRINT(6, ("Adding to wait queue %p\n", queue));
wait_event(queue->wait_queue, condition());
}
开发者ID:AndreiLux,项目名称:Perseus-S3,代码行数:6,代码来源:mali_osk_wait_queue.c
示例8: mali_mmu_print_state
void mali_mmu_print_state(struct mali_mmu_core *mmu)
{
MALI_DEBUG_PRINT(2, ("MMU: State of %s is 0x%08x\n", mmu->hw_core.description, mali_hw_core_register_read(&mmu->hw_core, MALI_MMU_REGISTER_STATUS)));
}
开发者ID:SeKwonLee,项目名称:Hongik_NECSST_Tizen2.2_kernel,代码行数:4,代码来源:mali_mmu.c
示例9: MALI_DEBUG_PRINT
struct mali_l2_cache_core *mali_l2_cache_create(_mali_osk_resource_t *resource)
{
struct mali_l2_cache_core *cache = NULL;
MALI_DEBUG_PRINT(2, ("Mali L2 cache: Creating Mali L2 cache: %s\n", resource->description));
if (mali_global_num_l2_cache_cores >= MALI_MAX_NUMBER_OF_L2_CACHE_CORES)
{
MALI_PRINT_ERROR(("Mali L2 cache: Too many L2 cache core objects created\n"));
return NULL;
}
cache = _mali_osk_malloc(sizeof(struct mali_l2_cache_core));
if (NULL != cache)
{
cache->core_id = mali_global_num_l2_cache_cores;
cache->counter_src0 = MALI_HW_CORE_NO_COUNTER;
cache->counter_src1 = MALI_HW_CORE_NO_COUNTER;
if (_MALI_OSK_ERR_OK == mali_hw_core_create(&cache->hw_core, resource, MALI400_L2_CACHE_REGISTERS_SIZE))
{
cache->command_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE,
0, _MALI_OSK_LOCK_ORDER_L2_COMMAND);
if (NULL != cache->command_lock)
{
cache->counter_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_ORDERED | _MALI_OSK_LOCKFLAG_SPINLOCK | _MALI_OSK_LOCKFLAG_NONINTERRUPTABLE,
0, _MALI_OSK_LOCK_ORDER_L2_COUNTER);
if (NULL != cache->counter_lock)
{
if (_MALI_OSK_ERR_OK == mali_l2_cache_reset(cache))
{
mali_global_l2_cache_cores[mali_global_num_l2_cache_cores] = cache;
mali_global_num_l2_cache_cores++;
return cache;
}
else
{
MALI_PRINT_ERROR(("Mali L2 cache: Failed to reset L2 cache core %s\n", cache->hw_core.description));
}
_mali_osk_lock_term(cache->counter_lock);
}
else
{
MALI_PRINT_ERROR(("Mali L2 cache: Failed to create counter lock for L2 cache core %s\n", cache->hw_core.description));
}
_mali_osk_lock_term(cache->command_lock);
}
else
{
MALI_PRINT_ERROR(("Mali L2 cache: Failed to create command lock for L2 cache core %s\n", cache->hw_core.description));
}
mali_hw_core_delete(&cache->hw_core);
}
_mali_osk_free(cache);
}
else
{
MALI_PRINT_ERROR(("Mali L2 cache: Failed to allocate memory for L2 cache core\n"));
}
return NULL;
}
开发者ID:791254467,项目名称:u8500_kernel,代码行数:66,代码来源:mali_l2_cache.c
示例10: init_mali_clock
static mali_bool init_mali_clock(void)
{
mali_bool ret = MALI_TRUE;
gpu_power_state = 0;
if (mali_clock != 0)
return ret; // already initialized
mali_dvfs_lock = _mali_osk_lock_init(_MALI_OSK_LOCKFLAG_NONINTERRUPTABLE
| _MALI_OSK_LOCKFLAG_ONELOCK, 0, 0);
if (mali_dvfs_lock == NULL)
return _MALI_OSK_ERR_FAULT;
if (mali_clk_set_rate(mali_gpu_clk, GPU_MHZ) == MALI_FALSE)
{
ret = MALI_FALSE;
goto err_clock_get;
}
MALI_PRINT(("init_mali_clock mali_clock %p \n", mali_clock));
#ifdef CONFIG_REGULATOR
#if USING_MALI_PMM
g3d_regulator = regulator_get(&mali_gpu_device.dev, "vdd_g3d");
#else
g3d_regulator = regulator_get(NULL, "vdd_g3d");
#endif
if (IS_ERR(g3d_regulator))
{
MALI_PRINT( ("MALI Error : failed to get vdd_g3d\n"));
ret = MALI_FALSE;
goto err_regulator;
}
regulator_enable(g3d_regulator);
MALI_DEBUG_PRINT(1, ("= regulator_enable -> use cnt: %d \n",mali_regulator_get_usecount()));
mali_regulator_set_voltage(mali_gpu_vol, mali_gpu_vol);
#endif
MALI_DEBUG_PRINT(2, ("MALI Clock is set at mali driver\n"));
MALI_DEBUG_PRINT(3,("::clk_put:: %s mali_parent_clock - normal\n", __FUNCTION__));
MALI_DEBUG_PRINT(3,("::clk_put:: %s mpll_clock - normal\n", __FUNCTION__));
mali_clk_put(MALI_FALSE);
return MALI_TRUE;
#ifdef CONFIG_REGULATOR
err_regulator:
regulator_put(g3d_regulator);
#endif
err_clock_get:
mali_clk_put(MALI_TRUE);
return ret;
}
开发者ID:gokussjx,项目名称:Googy-Max-Kernel,代码行数:64,代码来源:mali_platform.c
示例11: mali_clk_set_rate
mali_bool mali_clk_set_rate(unsigned int clk, unsigned int mhz)
{
unsigned long rate = 0;
mali_bool bis_vpll = MALI_TRUE;
#ifndef CONFIG_VPLL_USE_FOR_TVENC
bis_vpll = MALI_TRUE;
#endif
#if !MALI_DVFS_ENABLED
clk = mali_gpu_clk;
#endif
_mali_osk_lock_wait(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
if (mali_clk_get(bis_vpll) == MALI_FALSE)
return MALI_FALSE;
rate = (unsigned long)clk * (unsigned long)mhz;
MALI_DEBUG_PRINT(3,("= clk_set_rate : %d , %d \n",clk, mhz ));
if (bis_vpll)
{
clk_set_rate(fout_vpll_clock, (unsigned int)clk * GPU_MHZ);
clk_set_parent(vpll_src_clock, ext_xtal_clock);
clk_set_parent(sclk_vpll_clock, fout_vpll_clock);
clk_set_parent(mali_parent_clock, sclk_vpll_clock);
clk_set_parent(mali_clock, mali_parent_clock);
}
else
{
clk_set_parent(mali_parent_clock, mpll_clock);
clk_set_parent(mali_clock, mali_parent_clock);
}
if (clk_enable(mali_clock) < 0)
return MALI_FALSE;
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
MALI_PROFILING_EVENT_REASON_SINGLE_SW_GPU_FREQ,
rate, 0, 0, 0, 0);
#endif
clk_set_rate(mali_clock, rate);
rate = clk_get_rate(mali_clock);
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
MALI_PROFILING_EVENT_REASON_SINGLE_SW_GPU_FREQ,
rate, 1, 0, 0, 0);
#endif
if (bis_vpll)
mali_gpu_clk = (int)(rate / mhz);
else
mali_gpu_clk = (int)((rate + 500000) / mhz);
GPU_MHZ = mhz;
MALI_DEBUG_PRINT(3,("= clk_get_rate: %d \n",mali_gpu_clk));
mali_clk_put(MALI_FALSE);
_mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
return MALI_TRUE;
}
开发者ID:gokussjx,项目名称:Googy-Max-Kernel,代码行数:70,代码来源:mali_platform.c
示例12: mali_ioctl
static int mali_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
#endif
{
int err;
struct mali_session_data *session_data;
#ifndef HAVE_UNLOCKED_IOCTL
/* inode not used */
(void)inode;
#endif
MALI_DEBUG_PRINT(7, ("Ioctl received 0x%08X 0x%08lX\n", cmd, arg));
session_data = (struct mali_session_data *)filp->private_data;
if (NULL == session_data)
{
MALI_DEBUG_PRINT(7, ("filp->private_data was NULL\n"));
return -ENOTTY;
}
if (NULL == (void *)arg)
{
MALI_DEBUG_PRINT(7, ("arg was NULL\n"));
return -ENOTTY;
}
switch(cmd)
{
case MALI_IOC_WAIT_FOR_NOTIFICATION:
err = wait_for_notification_wrapper(session_data, (_mali_uk_wait_for_notification_s __user *)arg);
break;
case MALI_IOC_GET_API_VERSION:
err = get_api_version_wrapper(session_data, (_mali_uk_get_api_version_s __user *)arg);
break;
case MALI_IOC_POST_NOTIFICATION:
err = post_notification_wrapper(session_data, (_mali_uk_post_notification_s __user *)arg);
break;
case MALI_IOC_GET_USER_SETTINGS:
err = get_user_settings_wrapper(session_data, (_mali_uk_get_user_settings_s __user *)arg);
break;
#if MALI_TIMELINE_PROFILING_ENABLED
case MALI_IOC_PROFILING_START:
err = profiling_start_wrapper(session_data, (_mali_uk_profiling_start_s __user *)arg);
break;
case MALI_IOC_PROFILING_ADD_EVENT:
err = profiling_add_event_wrapper(session_data, (_mali_uk_profiling_add_event_s __user *)arg);
break;
case MALI_IOC_PROFILING_STOP:
err = profiling_stop_wrapper(session_data, (_mali_uk_profiling_stop_s __user *)arg);
break;
case MALI_IOC_PROFILING_GET_EVENT:
err = profiling_get_event_wrapper(session_data, (_mali_uk_profiling_get_event_s __user *)arg);
break;
case MALI_IOC_PROFILING_CLEAR:
err = profiling_clear_wrapper(session_data, (_mali_uk_profiling_clear_s __user *)arg);
break;
case MALI_IOC_PROFILING_GET_CONFIG:
/* Deprecated: still compatible with get_user_settings */
err = get_user_settings_wrapper(session_data, (_mali_uk_get_user_settings_s __user *)arg);
break;
case MALI_IOC_PROFILING_REPORT_SW_COUNTERS:
err = profiling_report_sw_counters_wrapper(session_data, (_mali_uk_sw_counters_report_s __user *)arg);
break;
#else
case MALI_IOC_PROFILING_START: /* FALL-THROUGH */
case MALI_IOC_PROFILING_ADD_EVENT: /* FALL-THROUGH */
case MALI_IOC_PROFILING_STOP: /* FALL-THROUGH */
case MALI_IOC_PROFILING_GET_EVENT: /* FALL-THROUGH */
case MALI_IOC_PROFILING_CLEAR: /* FALL-THROUGH */
case MALI_IOC_PROFILING_GET_CONFIG: /* FALL-THROUGH */
case MALI_IOC_PROFILING_REPORT_SW_COUNTERS: /* FALL-THROUGH */
MALI_DEBUG_PRINT(2, ("Profiling not supported\n"));
err = -ENOTTY;
break;
#endif
case MALI_IOC_MEM_INIT:
err = mem_init_wrapper(session_data, (_mali_uk_init_mem_s __user *)arg);
break;
case MALI_IOC_MEM_TERM:
err = mem_term_wrapper(session_data, (_mali_uk_term_mem_s __user *)arg);
break;
case MALI_IOC_MEM_MAP_EXT:
err = mem_map_ext_wrapper(session_data, (_mali_uk_map_external_mem_s __user *)arg);
break;
//.........这里部分代码省略.........
开发者ID:kijodoari,项目名称:kernel-s2,代码行数:101,代码来源:mali_kernel_linux.c
示例13: mali_sysfs_register
//.........这里部分代码省略.........
if (NULL != pp_core)
{
char buf[16];
struct dentry *mali_pp_ppx_dir;
_mali_osk_snprintf(buf, sizeof(buf), "pp%u", mali_pp_core_get_id(pp_core));
mali_pp_ppx_dir = debugfs_create_dir(buf, mali_pp_dir);
if (NULL != mali_pp_ppx_dir)
{
debugfs_create_file("counter_src0", 0600, mali_pp_ppx_dir, pp_core, &pp_ppx_counter_src0_fops);
debugfs_create_file("counter_src1", 0600, mali_pp_ppx_dir, pp_core, &pp_ppx_counter_src1_fops);
}
}
/* try next group */
gi++;
group = mali_cluster_get_group(cluster, gi);
}
/* try next cluster */
ci++;
cluster = mali_cluster_get_global_cluster(ci);
}
}
mali_l2_dir = debugfs_create_dir("l2", mali_debugfs_dir);
if (mali_l2_dir != NULL)
{
struct dentry *mali_l2_all_dir;
u32 l2_id;
struct mali_l2_cache_core *l2_cache;
mali_l2_all_dir = debugfs_create_dir("all", mali_l2_dir);
if (mali_l2_all_dir != NULL)
{
debugfs_create_file("counter_src0", 0400, mali_l2_all_dir, NULL, &l2_all_counter_src0_fops);
debugfs_create_file("counter_src1", 0400, mali_l2_all_dir, NULL, &l2_all_counter_src1_fops);
}
l2_id = 0;
l2_cache = mali_l2_cache_core_get_glob_l2_core(l2_id);
while (NULL != l2_cache)
{
char buf[16];
struct dentry *mali_l2_l2x_dir;
_mali_osk_snprintf(buf, sizeof(buf), "l2%u", l2_id);
mali_l2_l2x_dir = debugfs_create_dir(buf, mali_l2_dir);
if (NULL != mali_l2_l2x_dir)
{
debugfs_create_file("counter_src0", 0600, mali_l2_l2x_dir, l2_cache, &l2_l2x_counter_src0_fops);
debugfs_create_file("counter_src1", 0600, mali_l2_l2x_dir, l2_cache, &l2_l2x_counter_src1_fops);
}
/* try next L2 */
l2_id++;
l2_cache = mali_l2_cache_core_get_glob_l2_core(l2_id);
}
}
debugfs_create_file("memory_usage", 0400, mali_debugfs_dir, NULL, &memory_usage_fops);
#if MALI_INTERNAL_TIMELINE_PROFILING_ENABLED
mali_profiling_dir = debugfs_create_dir("profiling", mali_debugfs_dir);
if (mali_profiling_dir != NULL)
{
struct dentry *mali_profiling_proc_dir = debugfs_create_dir("proc", mali_profiling_dir);
if (mali_profiling_proc_dir != NULL)
{
struct dentry *mali_profiling_proc_default_dir = debugfs_create_dir("default", mali_profiling_proc_dir);
if (mali_profiling_proc_default_dir != NULL)
{
debugfs_create_file("enable", 0600, mali_profiling_proc_default_dir, (void*)_MALI_UK_USER_SETTING_SW_EVENTS_ENABLE, &user_settings_fops);
}
}
debugfs_create_file("record", 0600, mali_profiling_dir, NULL, &profiling_record_fops);
debugfs_create_file("events", 0400, mali_profiling_dir, NULL, &profiling_events_fops);
}
#endif
#if MALI_STATE_TRACKING
debugfs_create_file("state_dump", 0400, mali_debugfs_dir, NULL, &mali_seq_internal_state_fops);
#endif
if (mali_sysfs_user_settings_register())
{
/* Failed to create the debugfs entries for the user settings DB. */
MALI_DEBUG_PRINT(2, ("Failed to create user setting debugfs files. Ignoring...\n"));
}
}
}
/* Success! */
return 0;
/* Error handling */
init_mdev_err:
class_destroy(device->mali_class);
init_class_err:
return err;
}
开发者ID:4yush5663,项目名称:android_kernel_samsung_i9500,代码行数:101,代码来源:mali_kernel_sysfs.c
示例14: MALI_DEBUG_PRINT
struct mali_pp_core *mali_pp_create(const _mali_osk_resource_t *resource, struct mali_group *group, mali_bool is_virtual, u32 bcast_id)
{
struct mali_pp_core* core = NULL;
MALI_DEBUG_PRINT(2, ("Mali PP: Creating Mali PP core: %s\n", resource->description));
MALI_DEBUG_PRINT(2, ("Mali PP: Base address of PP core: 0x%x\n", resource->base));
if (mali_global_num_pp_cores >= MALI_MAX_NUMBER_OF_PP_CORES) {
MALI_PRINT_ERROR(("Mali PP: Too many PP core objects created\n"));
return NULL;
}
core = _mali_osk_malloc(sizeof(struct mali_pp_core));
if (NULL != core) {
core->core_id = mali_global_num_pp_cores;
core->bcast_id = bcast_id;
if (_MALI_OSK_ERR_OK == mali_hw_core_create(&core->hw_core, resource, MALI200_REG_SIZEOF_REGISTER_BANK)) {
_mali_osk_errcode_t ret;
if (!is_virtual) {
ret = mali_pp_reset(core);
} else {
ret = _MALI_OSK_ERR_OK;
}
if (_MALI_OSK_ERR_OK == ret) {
ret = mali_group_add_pp_core(group, core);
if (_MALI_OSK_ERR_OK == ret) {
/* Setup IRQ handlers (which will do IRQ probing if needed) */
MALI_DEBUG_ASSERT(!is_virtual || -1 != resource->irq);
core->irq = _mali_osk_irq_init(resource->irq,
mali_group_upper_half_pp,
group,
mali_pp_irq_probe_trigger,
mali_pp_irq_probe_ack,
core,
resource->description);
if (NULL != core->irq) {
mali_global_pp_cores[mali_global_num_pp_cores] = core;
mali_global_num_pp_cores++;
return core;
} else {
MALI_PRINT_ERROR(("Mali PP: Failed to setup interrupt handlers for PP core %s\n", core->hw_core.description));
}
mali_group_remove_pp_core(group);
} else {
MALI_PRINT_ERROR(("Mali PP: Failed to add core %s to group\n", core->hw_core.description));
}
}
mali_hw_core_delete(&core->hw_core);
}
_mali_osk_free(core);
} else {
MALI_PRINT_ERROR(("Mali PP: Failed to allocate memory for PP core\n"));
}
return NULL;
}
开发者ID:CobraJet93,项目名称:kernel-3.10.54,代码行数:62,代码来源:mali_pp.c
示例15: block_allocator_allocate
static mali_physical_memory_allocation_result block_allocator_allocate(void* ctx, mali_allocation_engine * engine, mali_memory_allocation * descriptor, u32* offset, mali_physical_memory_allocation * alloc_info)
{
block_allocator * info;
u32 left;
block_info * last_allocated = NULL;
mali_physical_memory_allocation_result result = MALI_MEM_ALLOC_NONE;
block_allocator_allocation *ret_allocation;
MALI_DEBUG_ASSERT_POINTER(ctx);
MALI_DEBUG_ASSERT_POINTER(descriptor);
MALI_DEBUG_ASSERT_POINTER(offset);
MALI_DEBUG_ASSERT_POINTER(alloc_info);
info = (block_allocator*)ctx;
left = descriptor->size - *offset;
MALI_DEBUG_ASSERT(0 != left);
if (_MALI_OSK_ERR_OK != _mali_osk_lock_wait(info->mutex, _MALI_OSK_LOCKMODE_RW)) return MALI_MEM_ALLOC_INTERNAL_FAILURE;
ret_allocation = _mali_osk_malloc( sizeof(block_allocator_allocation) );
if ( NULL == ret_allocation )
{
/* Failure; try another allocator by returning MALI_MEM_ALLOC_NONE */
_mali_osk_lock_signal(info->mutex, _MALI_OSK_LOCKMODE_RW);
return result;
}
ret_allocation->start_offset = *offset;
ret_allocation->mapping_length = 0;
while ((left > 0) && (info->first_free))
{
block_info * block;
u32 phys_addr;
u32 padding;
u32 current_mapping_size;
block = info->first_free;
info->first_free = info->first_free->next;
block->next = last_allocated;
last_allocated = block;
phys_addr = get_phys(info, block);
padding = *offset & (MALI_BLOCK_SIZE-1);
if (MALI_BLOCK_SIZE - padding < left)
{
current_mapping_size = MALI_BLOCK_SIZE - padding;
}
else
{
current_mapping_size = left;
}
if (_MALI_OSK_ERR_OK != mali_allocation_engine_map_physical(engine, descriptor, *offset, phys_addr + padding, info->cpu_usage_adjust, current_mapping_size))
{
MALI_DEBUG_PRINT(1, ("Mapping of physical memory failed\n"));
result = MALI_MEM_ALLOC_INTERNAL_FAILURE;
mali_allocation_engine_unmap_physical(engine, descriptor, ret_allocation->start_offset, ret_allocation->mapping_length, (_mali_osk_mem_mapregion_flags_t)0);
/* release all memory back to the pool */
while (last_allocated)
{
/* This relinks every block we've just allocated back into the free-list */
block = last_allocated->next;
last_allocated->next = info->first_free;
info->first_free = last_allocated;
last_allocated = block;
}
break;
}
*offset += current_mapping_size;
left -= current_mapping_size;
ret_allocation->mapping_length += current_mapping_size;
}
_mali_osk_lock_signal(info->mutex, _MALI_OSK_LOCKMODE_RW);
if (last_allocated)
{
if (left) result = MALI_MEM_ALLOC_PARTIAL;
else result = MALI_MEM_ALLOC_FINISHED;
/* Record all the information about this allocation */
ret_allocation->last_allocated = last_allocated;
ret_allocation->engine = engine;
ret_allocation->descriptor = descriptor;
alloc_info->ctx = info;
alloc_info->handle = ret_allocation;
alloc_info->release = block_allocator_release;
}
else
{
/* Free the allocation information - nothing to be passed back */
_mali_osk_free( ret_allocation );
//.........这里部分代码省略.........
开发者ID:vision8520,项目名称:kernel-amlogic-mx,代码行数:101,代码来源:mali_block_allocator.c
示例16: mali_pp_print_registers
static void mali_pp_print_registers(struct mali_pp_core *core)
{
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_VERSION = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_VERSION)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_CURRENT_REND_LIST_ADDR = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_CURRENT_REND_LIST_ADDR)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_STATUS = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_STATUS)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_INT_RAWSTAT = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_INT_RAWSTAT)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_INT_MASK = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_INT_MASK)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_INT_STATUS = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_INT_STATUS)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_BUS_ERROR_STATUS = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_BUS_ERROR_STATUS)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_0_ENABLE = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_0_ENABLE)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_0_SRC = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_0_SRC)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_0_VALUE = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_0_VALUE)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_1_ENABLE = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_1_ENABLE)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_1_SRC = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_1_SRC)));
MALI_DEBUG_PRINT(2, ("Mali PP: Register MALI200_REG_ADDR_MGMT_PERF_CNT_1_VALUE = 0x%08X\n", mali_hw_core_register_read(&core->hw_core, MALI200_REG_ADDR_MGMT_PERF_CNT_1_VALUE)));
}
开发者ID:CobraJet93,项目名称:kernel-3.10.54,代码行数:16,代码来源:mali_pp.c
示例17: mali_block_allocator_create
mali_physical_memory_allocator * mali_block_allocator_create(u32 base_address, u32 cpu_usage_adjust, u32 size, const char *name)
{
mali_physical_memory_allocator * allocator;
block_allocator * info;
u32 usable_size;
u32 num_blocks;
usable_size = size & ~(MALI_BLOCK_SIZE - 1);
MALI_DEBUG_PRINT(3, ("Mali block allocator create for region starting at 0x%08X length 0x%08X\n", base_address, size));
MALI_DEBUG_PRINT(4, ("%d usable bytes\n", usable_size));
num_blocks = usable_size / MALI_BLOCK_SIZE;
MALI_DEBUG_PRINT(4, ("which becomes %d blocks\n", num_blocks));
|
请发表评论