case RK_FORMAT_RGBA_8888 :\r
stride = (w * 4 + 3) & (~3);\r
size_yrgb = stride*h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_RGBX_8888 :\r
stride = (w * 4 + 3) & (~3);\r
size_yrgb = stride*h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_RGB_888 :\r
stride = (w * 3 + 3) & (~3);\r
size_yrgb = stride*h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_BGRA_8888 :\r
size_yrgb = w*h*4;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_RGB_565 :\r
stride = (w*2 + 3) & (~3);\r
size_yrgb = stride * h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_RGBA_5551 :\r
stride = (w*2 + 3) & (~3);\r
size_yrgb = stride * h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_RGBA_4444 :\r
stride = (w*2 + 3) & (~3);\r
size_yrgb = stride * h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
case RK_FORMAT_BGR_888 :\r
stride = (w*3 + 3) & (~3);\r
size_yrgb = stride * h;\r
- end = (yrgb_addr + (size_yrgb + PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
start = yrgb_addr >> PAGE_SHIFT;\r
- pageCount = end - start;\r
+ pageCount = (size_yrgb + PAGE_SIZE - 1) >> PAGE_SHIFT;\r
break;\r
\r
/* YUV FORMAT */\r
size_yrgb = stride * h;\r
size_uv = stride * h;\r
start = MIN(yrgb_addr, uv_addr);\r
+\r
start >>= PAGE_SHIFT;\r
end = MAX((yrgb_addr + size_yrgb), (uv_addr + size_uv));\r
end = (end + (PAGE_SIZE - 1)) >> PAGE_SHIFT;\r
while (0);\r
\r
#else\r
-\r
do\r
{\r
pte_t * pte;\r