| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
the root cause is video memory mutex is not global variable,
it will cause video memory managment problem with mixed 2D/3D/VG.
kernel panic with multiple instances stress test running glesx_viv.sh.
Date: Jul 31, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 9cec1cbd7ca2378e5c429f57d088d23d73d9c2f3)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-When system memory is less than 200M, we will block further
memory allocation for webgl.
It's for pass webgl 1.0.2 conformance case conformance/rendering/multisample-cor
ruption.html
It's a temperory patch from vivante, should be removed in 5.0.11p2.
Original patch name:5x_crash_patch.diff
Date: Jul 03, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
| |
Date: Jun 16, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit a6f5349968e494d67f9da339dad433b528ce52fe)
|
|
|
|
|
|
|
|
|
| |
Since i.MX6SX doesn't supports MLB150 , it is not strictly explicit to
name driver module as mxc_mlb150.ko. Rename it to mxc_mlb.ko.It would be
more common.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
(cherry picked from commit dbe1a350e2f61e827501fd322951b9ea255461a5)
|
|
|
|
|
|
|
|
|
|
| |
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of
modules during system suspend and resume procedure. Thus, ASRC needs to save
all the values of registers before the system suspend and restore them after
the system resume.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
|
|
|
|
|
| |
We actually do nothing to process input buffer. Thus simplify it.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
wait_for_compeltion code
After dropping the extra task for last period buffer fetching, we have a total
symmetrical wait_for_compeltion here so it's better to abstract a function to
make the driver neat.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
period data
The original design:
-> Input DMA task -> complete()
|
-> Output DMA task -> complete()
| |
| -> Last period polling work thread -> complete()
|
Main thread --------------> wait_for_completion() of Input and last period
It's too complicated and worthless to use an extra work thread for last period data.
So this patch just switches the flow into a simpler approach:
-> Input DMA task -> complete()
|
-> Output DMA task -> complete()
|
Main thread --------------> wait_for_completion() of In/Output -> Last period polling
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The abnormal flow with the monkey test freeze problem is as below:
gckKERNEL_DestroyProcessDB--> aquire mutex --> gckCOMMAND_Detach(gckEVENT_FreeContiguousMemory) -->
___RemoveRecordFromProcessDB --> gckKERNEL_RemoveProcessDB --> aquire the same mutex
the fix is to disable mutex lock when perform record destory operations
Date: May 19, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
| |
counterMutex is not necessary after refine dabase mutex
remove counterMutex to avoid duplicated mutex protection
Date: May 15, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
system hang in webGL conformance test with the following log
galcore daemon D 807430b4 0 105 2 0x00000000
[<807430b4>] (__schedule+0x34c/0x720) from [<807438c8>] (schedule_preempt_disabled+0x14/0x20)
[<807438c8>] (schedule_preempt_disabled+0x14/0x20) from [<80742328>] (__mutex_lock_slowpath+0x158/0x21c)
[<80742328>] (__mutex_lock_slowpath+0x158/0x21c) from [<80742434>] (mutex_lock+0x48/0x4c)
[<80742434>] (mutex_lock+0x48/0x4c) from [<8052aa68>] (gckOS_AcquireMutex+0x64/0x6c)
[<8052aa68>] (gckOS_AcquireMutex+0x64/0x6c) from [<80534e0c>] (gckKERNEL_AddProcessDB+0x30/0x37c)
[<80534e0c>] (gckKERNEL_AddProcessDB+0x30/0x37c) from [<8052d628>] (gckOS_Broadcast+0xe0/0xe8)
[<8052d628>] (gckOS_Broadcast+0xe0/0xe8) from [<80536fa8>] (_TryToIdleGPU+0x124/0x12c)
[<80536fa8>] (_TryToIdleGPU+0x124/0x12c) from [<8053887c>] (gckEVENT_Notify+0x520/0x574)
[<8053887c>] (gckEVENT_Notify+0x520/0x574) from [<80540468>] (gckHARDWARE_Interrupt+0x60/0x70)
[<80540468>] (gckHARDWARE_Interrupt+0x60/0x70) from [<805271cc>] (threadRoutine2D+0x20/0x78)
[<805271cc>] (threadRoutine2D+0x20/0x78) from [<80045728>] (kthread+0xa4/0xb0)
[<80045728>] (kthread+0xa4/0xb0) from [<8000e158>] (ret_from_fork+0x14/0x3c)
this is integration issue introduced by database mutex enhancement,
remove duplicated mutex unlock when remove database
Date: May 15, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
|
|
| |
-ES11 conformance "Must Pass test" and "LogicOp Function test" failed b
-This patch from vivante. Vivante Comments:"If gcdCMD_NO_2D_CONTEXT is
Patch content
-Remove context->dirty2D flag setting when gcdCMD_NO_2D_CONTEXT is set.
Date: May 05, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
| |
Move wl_surface_commit to work thread.
Add wl_display_sync after commit buffer.
Fix memory leak in wl_egl_window_resize.
Enable triple buffer rendering.
Disable skip worker in veglSwapWorker.
Date: Apr 21, 2014
Signed-off-by Yong Gan <B45748@freescale.com>
|
|
|
|
|
|
|
|
|
| |
This patch is from Vivante (part of #831). It adds missing ioctls to VG
kernel driver. Now VG355 can be enabled for X11.
Date: Apr 24, 2014
Signed-off-by: Zhenyong Chen <b07273@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
| |
this patch fix gpu database query failure with gmem_info
Date: Apr 28, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this patch can fix NULL pointer issue in GPU kernel driver with the following log
[<7f240438>] (gckEVENT_AddList+0x0/0x810 [galcore]) from [<7f239ebc>] (gckCOMMAND_Commit+0xf28/0x118c [galcore])
[<7f238f94>] (gckCOMMAND_Commit+0x0/0x118c [galcore]) from [<7f2362dc>] (gckKERNEL_Dispatch+0x120c/0x24e4 [galcore])
[<7f2350d0>] (gckKERNEL_Dispatch+0x0/0x24e4 [galcore]) from [<7f222280>] (drv_ioctl+0x390/0x540 [galcore])
[<7f221ef0>] (drv_ioctl+0x0/0x540 [galcore]) from [<800facd0>] (vfs_ioctl+0x30/0x44)
The false code is at 0x217bc where the 0-pointer happens (r3 = 0)
gcuVIDMEM_NODE_PTR node = (gcuVIDMEM_NODE_PTR)(gcmUINT64_TO_PTR(Record->info.u.FreeVideoMemory.node));
217b8: e5953028 ldr r3, [r5, #40] ; 0x28
if (node->VidMem.memory->object.type == gcvOBJ_VIDMEM)
217bc: e5932000 ldr r2, [r3]
217c0: e5922000 ldr r2, [r2]
217c4: e152000a cmp r2, sl
{
gcmkVERIFY_OK(gckKERNEL_RemoveProcessDB(Event->kernel,
Date: Apr 23, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
|
| |
fixed 3D context switch issue, the original comments from Vivante
Set command->using2D correctly when gcdCMD_NO_2D_CONTEXT = 1
this patch is to fix Android mess UI issue on GC400T
Date: Apr 21, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
| |
gcvVERSION_STRING is not consistent with gcvVERSION_BUILD. Vivante
will provide a more flexible way in future release.
Date: Apr 18, 2014
Signed-off-by: Zhenyong Chen <b07273@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
| |
-When allocation failed, the node will be null.
node->Virtual.type access will cause kernel panic
when forceContiguous is enabled.
Date: Apr 21,2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Virtual command buffer is forcibly enabled and causes gpu hang on i.MX6SLX
- Android GPU hang
- X11 GPU hang when run es2gears
- Dfb 2D test case df_dok may cause gpu hang.
The safe fix is to disable virtual command buffer temporarily
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit f0aaa7521e0e58b4a7c9f104271343ab277fed56)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This issue could be reproduced on Android i.MX6SX with SD boot,
the root cause is memory allocator pointer is not created correctly.
gcsALLOCATOR is structure, while gckALLOCATOR is struct pointer
Date: Apr 18, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 5000ad55f9a27cba472e09a94189fa7018bc58c3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
database list corruption is caused by the extensive surface type(>=0x100)
some random kernel crash issues will be introduced by data corruption
this fix is to clear the extensive surface type with 0xFF mask, referring to
gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
/* Combinations. */
gcvSURF_NO_TILE_STATUS = 0x100,
gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
In Android, vidmem node is allocated by another process. */
gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 0f79bbd805402a8dcdf22bb119f99f05d8b9e4c3)
|
|
|
|
|
|
|
|
|
|
|
|
| |
the potential risk is found in special case when application exit,
deleting record will cause the unexpected issue when process database is destoryed without atom protection
the enhanced database patch should be applied to avoid the unexpected kernel issue
Date: Apr 17, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 00ef75b4f50933749a2fd569488510ab760de4a9)
|
|
|
|
|
|
|
|
|
| |
-Fix a issue during cma 5.0.11 integration.
With this issue cma allocation will not return error when allocation failed.
Date: Apr 17, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
| |
Integrated 5.0.11 kernel part change.
Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dma zone memory used up, gckOS_AllocateCMAMemoryFSL() will try to
free non paged memory cache and allocate again. Such operation will cause
twice memory mutex request and cause gpu driver hang.
The solution is free the memory mutex at first before trying to free non
paged memory cache.
Date: Feb 27, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 79ed8edd23f990f6c1429154c2ee773c83bfd72e)
|
|
|
|
|
|
|
|
|
|
|
| |
Gpu kernel driver used spinlock in inerrupt context for debug
purpose. So when enabled debug mode in gpu kernel driver, it may
cause gpu kernel driver deadlock.
Changed spinlock to spinlock_irqsave to resolve this issue.
Patch from vivante.
Date: Apr 11, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
|
|
|
|
|
|
|
|
|
|
| |
This issue happens when multiple thread is trying to idle GPU at the
same time, root cause is some wrong logic related with powerMutex which
cause cpu still access GPU AHB register after GPU is suspend(clock off),
that cause the bus lockup and make the whole system hang.
Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
| |
-Update gpu kernel driver to 5.0.9.1 release
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
| |
The optimal resize ratio should be used if the downscaler is not needed. This
will fix a vertical line in the center for some scaling ratios.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
|
|
|
|
|
|
|
| |
2G above address will cause system reboot and fixed in original patch,
error check code is added based on the original logic.
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 7d85c98bf781eb047c2000bd82ea7559c24a2446)
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes test mode clock setting in function
ipu_csi_init_interface(), since the setting is only
necessary for function _ipu_csi_set_test_generator().
This unnecessary setting is added wrongly by commit
f8e1a3bb62eecf93a31a51c4dbe08a0214fa1d57.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 482c30821d0aad0ab500a9d5db95654917986a3c)
|
|
|
|
|
|
|
|
|
| |
We reversed CCIR code1/2 setting before, which may brings
captured frame quality issue(jaggy edge can be seen). This
patch revert that change.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit abdb4369f6ebcd90656b5fc319ee79eeb3bec7c5)
|
|
|
|
|
|
|
| |
Add MLB50 driver supported on i.MX6SX chip. MLB50 will not support
frame rate over 1024 per second.
Signed-off-by: Luwei Zhou <b45643@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following error was reported.
-----------------------------------------------------------
root@imx6qdlsolo:~# /unit_tests/mxc_v4l2_capture.out -d /dev/video1 1.yuv
in_width = 176, in_height = 144
out_width = 176, out_height = 144
top = 0, left = 0
mipi csi2 can not receive sensor clk!
sensor chip is ov5640_mipi_camera
sensor supported frame size:
640x480
320x240
720x480
720x576
1280x720
1920x1080
2592x1944
176x144
1024x768
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
sensor frame format: UYVY
mipi csi2 can not receive sensor clk!
mxc_v4l2_s_param: vidioc_int_s_parm returned an error -1
VIDIOC_S_PARM failed
get format failed
-----------------------------------------------------------
Root cause analysis:
It only happens when HDMI is not used/enabled. There is a clock named
video_27m which are needed by HDMI (as isfrclk's parent) and MIPI-CSI2 (as
cfg_clk's parent). MIPI-CSI2 driver is lack of enabling this clock before
start to work and only happen to work when HDMI driver enables this clock.
Signed-off-by: Robby Cai <R63905@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASRC needs three clocks from SoC, they are:
mem_clk: Peripheral access clock
ipg_clk: Peripheral clock
asrck_clk: ASRC module clock
while the current driver only maintains two of them and has confusing
clock names. Thus fix it.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When dma zone memory used up, gckOS_AllocateNonPagedMemory() will try to
free non paged memory cache and allocate again. Such operation will cause
twice memory mutex request and cause gpu driver hang.
The solution is free the memory mutex at first before trying to free non
paged memory cache.
Date: Feb 27, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
| |
When split mode deinterlacing is the ipu_calc_stripes_sizes() was failing due
to an unnecessary test. Added logic to use the maximal_stripe_width only if
the flag parameter has the bit 0 clear for not equal stripe sizes.
Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernel will dump when run deinterlace stress test.
It is caused by vditmpbuf being reallocated by another thread
when one thread accesses it.
Issue is fixed by putting these code in mutex.
Kernel dump log:
[Playing ][Vol=01][00:00:10/00:00:30][fps:32]Unable to handle kernel
paging request at virtual address 607d6085
pgd = 80004000
[607d6085] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 50 Comm: ipu2_task Not tainted 3.10.17-02308-g3700819 #28
task: ac1dc700 ti: ac1ba000 task.ti: ac1ba000
PC is at __kmalloc+0x40/0x114
LR is at __kmalloc+0x14/0x114
pc : [<800bbd40>] lr : [<800bbd14>] psr: 200f0013
sp : ac1bbbc8 ip : 008cc000 fp : 00001e40
r10: ac772e00 r9 : 0057b255 r8 : 000000d0
r7 : 00000790 r6 : ac773800 r5 : 607d6085 r4 : ac001b00
r3 : 00000000 r2 : 814f92a0 r1 : 000000d0 r0 : 000398c9
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 3c4c004a DAC: 00000015
Process ipu2_task (pid: 50, stack limit = 0xac1ba238)
Stack: (0xac1bbbc8 to 0xac1bc000)
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__va function only can handle frame buffer from low memory.
Use page_address function to replace it, that can handle
frame buffer from both lower and high memory.
Use ioremap_nocache function to handle Frame buffer
from GPU reserve memory pool.
Correct vdi data save buffer size, save both luma and chroma part for
interleaved YUV format.
For non-interleaved and partial-interleaved YUV format,
save luma part data, chroma part is not covered in the patch.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
|
|
|
|
|
|
|
|
|
| |
-If _FlushMMU() return error, commitMutex and powerSemaphore will be
locked forever.
-Correct file attribute for gc_hal_base.h
Date: Jan 15, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Most vg memory must requires reserved memory, when reserved memory is
used up by 3d appliction. vg hardware can't be constructed successfully,
which cause whole context creation failure(including 3d context).
-Allow allocating vg memory from small block reserved memory can help such
multi context cases.
Date: Jan 15, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two possible reasons to cause AXI bus error
1.Allocate Tile status buffer from virtual memory. It seems gc2000
and gc880 doesn't support tile status buffer from virtual memory.
2.Stream buffer using very beginning gpu mmu address. In this condition,
a faked non gpu mmu address maybe generated and fill into gpu which cause
AXI bus error.
[DATE]09-01-2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
| |
non_page memory cache will only be freed when application exit.
It will have waste when contiguous memory used up.
Add logic to free it when contiguous memory is used up.
[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
| |
The root cause is kernelVirtual is not initialized which
may cause incorrect kernel virtual address for vg.
[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
| |
When application is using virtual memory, ctrl+c it will have
kernel panic caused by null pointer.
The reason is hardware struture already is freed when driver wants
to use it.
[DATE]16-12-2013
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
| |
add eglSetSwapRectangleANDROID back and enable swap rectange,
fix a swap rectange bug which will swap whole screen instead
of the indicate swap region if region's left and top is (0,0).
Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gpu kernel dump the error message when enable DEBUG mode:
gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.
gckCONTEXT_Update(1493): State 0x0518 is not mapped.
gckCONTEXT_Update(1493): State 0x0520 is not mapped.
align gpu kernel driver to fix the error message
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sync the code with commit 255ee1de in gpu-viv git.
Mainly covered tickets:
ENGR00288588 fixed system reboot when run webGL test
ENGR00284988 Camera recording kernel crash on WFD source
ENGR00283494 Modify Status to status to avoid build error
ENGR00278179-1 query video memory with seperate types
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original IPUv3 driver uses readl()/writel() to
access the IPUv3 registers in the following way where
ipu->reg_base is a pointer which points to a 32 bit
I/O memory cell of a certain IPUv3 deblock's base address:
writel(value, ipu->reg_base + offset);
readl(ipu->reg_base + offset);
This makes the register offset values shrink 4 times,
comparing to the offset values documented in the
reference manual. For example, we need to change the
offset value from 0x003C to 0x003C/4 so that we may
access the register IPU_INT_CTRL_1 correctly.
This patch redefines the type of ipu->reg_base to
'void __iomem *', then the offset values can be the
same to what they are documented.
Also, this patch corrects some register relevant
macros by wrapping their arguments with parentheses
to avoid any unsafe decipher.
Reviewed-by: Robby Cai <R63905@freescale.com>
Cc: Oliver Brown <oliver.brown@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
|