186 Commits

Author SHA1 Message Date
Matt Sealey
c0489d5cdc amd-gpu: remove unneeded barriers on hardware access
matches Freescale 2.6.38 kernel (ENGR00171209)
2012-11-19 21:32:45 +00:00
Matt Sealey
42f79c36bf amd-gpu: cleaned/added extra debug, plus use kzalloc instead of kmalloc/memset
Adds similar functionality as the following Freescale patch:

ENGR00142591 GPU: add some print message to help debug
2012-11-19 21:20:43 +00:00
Xinyu Chen
210b9c4040 ENGR00160722 amd gpu: add best fit algorithm to memory manager
The AMD gpu driver memory manager is stupid to allocating
a memory block from the first free block. Neither check the
best fit free block. Here just add a little codes to
let allocation to find a best size fitted free block.
To avoid memory fragement.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
2012-11-19 11:52:31 -06:00
Richard Zhao
1cae50aa16 ENGR00162464 update pm4 microcode: pm4_microcode_r18_20111020.a.inl.rel
It fix gpu hang.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
2012-11-19 11:41:33 -06:00
Richard Liu
8482a4dae7 ENGR00162193 amd gpu: fixed random gsl_kmod failure
increase max process number to fix gsl_kmod open issue

Signed-off-by: xianzhong <b07117@freescale.com>
Signed-off-by: Richard Liu <r66033@freescale.com>

Conflicts:

	drivers/mxc/amd-gpu/include/gsl_buildconfig.h
2012-11-19 11:41:03 -06:00
Matt Sealey
89813bb753 gpu: fix the weird gpummu/nogpummu memory reservation/allocation mess, and disable the gpummu again for maximum stability 2012-05-16 07:09:18 -05:00
Matt Sealey
a460028c64 ipu: backport of IPU clock handling
* improve clock accuracy check from 1/16 to 1/200 of intended clock rate
* properly round pixel clock to the parent and not against a hardcoded 150MHz max rate
* properly fix di external clock divisor to a maximum of 8
2012-02-20 09:29:48 -06:00
Matt Sealey
ded72a8511 gsl: fix typo in error message 2011-12-19 12:37:28 -06:00
Matt Sealey
f8f8789037 whitespace cleanups? 2011-12-15 13:38:28 -06:00
Matt Sealey
fe21c0fe94 gsl: add/improve ioctl entry/exit debugging, but disable it. 2011-12-15 13:37:26 -06:00
Matt Sealey
3635f6cf83 vpu: bump driver as close to 11.08 as possible without breaking anything 2011-09-15 23:39:51 -05:00
Matt Sealey
e5fe366470 gpu: maximum apertures = 2 now. clarify flags debug (multiple ways -> %x) 2011-09-05 12:11:03 -05:00
Matt Sealey
ef06068ea1 gpu: correct varargs debug (memdesc is a pointer NOT static!) to fix ridiculous sizes reported for sizebytes/offsetbytes in read/write operations.
Also add scatterlist and gsl_property_t debugging so the thing is more readable as a whole..
2011-09-04 15:02:04 -05:00
Matt Sealey
2c2be6f567 gpu: move files out of common/ since there's no need for a seperate directory. This also means we can make drivers/mxc/amd-gpu/gsl_*.i to see preprocessed output and get hints as to what is being compiled in and what the final code is like
additional minor changes:
 * rename PAGE_SIZE register MH_PAGE_SIZE in yamato/22/yamato_genreg.h (although this is an unused debug file so far)
 * remove references to stdio files in gsl_debug_pm4.c (will come in handy later)
2011-08-31 11:22:26 -05:00
Matt Sealey
13678b44c9 gpu: disabling the clip mask should improve performance but it actually causes the depth buffer to act weird because I don't think our userspace/kernel combination handles it properly.. 2011-08-30 15:27:37 -05:00
Matt Sealey
bc30f49241 gpu: don't clear the Z160 global on context destroy, do it on device close instead (this is part of a Freescale patch ENGR00142363 for WindowsCE but makes a hell of a lot o srense for Linux too) 2011-08-30 13:33:11 -05:00
Matt Sealey
c9f5504a1a gpu: enable HAL debug
gpu: pull in some command stream differences from Qualcomm's MSM kernel (might fix some intermittent GPU hangs)
display: enable quick testing of non-mmu operation (hangs X right now)
2011-08-30 12:38:48 -05:00
Matt Sealey
cdd8d1a03b gpu: move hal abstraction to the same place as the other files 2011-08-30 08:15:24 -05:00
Matt Sealey
aac2fc75d3 gpu driver: remove most of the remaining "abstraction" for OS mutex and so on
* mutex, events, sleeps, process id unabstracted
 * defines for function types (inline, extern) unabstracted
 * defines for debug assert change name (KOS_ASSERT -> DEBUG_ASSERT) and left disabled
 * driver now warns, if logging is enabled, that interruptible mutex locks are interrupted (which never happens in reality but it fixes a warning)
 * remove fine grained locking "feature" since it's not enabled (and Qualcomm's public driver does not even implement it)
 * refine mutex initialization where it's still present - don't try and allocate mutex structures where they're always used, just make them parts of the structure (struct mutex * -> struct mutex)
 * whitespace police
2011-08-29 14:55:29 -05:00
Matt Sealey
63da19a022 gpu os abstraction: more unused functions for memory leak checking now gone 2011-08-26 13:02:03 -05:00
Matt Sealey
9d43088ce9 gpu os abstraction: kos_malloc/kos_free -> kmalloc/kfree. Remove SYMBIAN and WIN32 code 2011-08-26 12:58:10 -05:00
Matt Sealey
f1a9436eac gpu os abstraction: remove _LINUX switches and all other OS code 2011-08-26 12:02:51 -05:00
Matt Sealey
8aff22cac1 gpu os abstraction: remove some wince/symbian/brew stuff and atoi/strtoul abstractions (unused) 2011-08-26 11:16:25 -05:00
Matt Sealey
64b3530cc9 gpu os abstraction: kos_thread_create/destroy was only used for !LINUX, so just get rid of it 2011-08-26 11:08:56 -05:00
Matt Sealey
a0adc5279b __int64 custom typedef --> standard __s64 linux/type.h 2011-08-26 11:01:22 -05:00
Matt Sealey
b45c20854c gpu os abstraction: remove stats api (unused) 2011-08-26 10:52:21 -05:00
Matt Sealey
72edabd161 gpu os abstraction: strcpy, strncpy, strcat, strcmp, strncmp, strlen all using Linux ones now 2011-08-26 10:40:35 -05:00
Matt Sealey
b564e29f61 gpu os abstraction: remove physical memory API (unused) 2011-08-26 10:37:02 -05:00
Matt Sealey
90a20cdd1e gpu os abstraction: missed an include for msleep 2011-08-26 10:34:01 -05:00
Matt Sealey
f2b2a01e64 gpu os abstraction: remove redundant cross-process memory allocators (makes no sense in a kernel and not used anyway) 2011-08-26 10:32:41 -05:00
Matt Sealey
92212608f6 gpu os abstraction: kos_sleep -> msleep 2011-08-26 10:29:29 -05:00
Matt Sealey
55395acb61 gpu os abstraction: remove unused functions for system information 2011-08-26 10:27:46 -05:00
Matt Sealey
263baa8817 gpu os abstraction: start with memset, memcmp, memcpy as low hanging fruit 2011-08-26 10:23:31 -05:00
Matt Sealey
b9cf657c71 gpu: logging abstraction cleanups. don't re-use PAGE_SIZE in mmu block definition (rename to MH_PAGE_SIZE) 2011-08-25 13:09:21 -05:00
Matt Sealey
0ce707fff2 gpu logging: fix more unsigned int -> uint (and %d -> %u), fix a few value debug mishaps (0x08x -> 0x%08x) 2011-08-25 12:46:25 -05:00
Matt Sealey
863664804f gsl memory manager: whitespace policing mostly, break pooled functions out for better readability (not compiled yet). Some other stuff that isn't important right now. 2011-08-25 11:06:24 -05:00
Matt Sealey
76589e9bac GPU debug: pid=%d -> pid=0x%08x, device_id=%d -> %D, for coherent debug. Also shortened some "unsigned int" markings to "uint" to be more concise. 2011-08-25 09:42:46 -05:00
Matt Sealey
2b537c8496 amd-gpu: extremely chatty logging, add CONFIG_MXC_AMD_GPU_LOGGING=y to config to enable. 2011-08-24 17:30:20 -05:00
Matt Sealey
f64e1efb63 disable hal debug output since it's not needed right now 2011-08-11 09:28:44 -05:00
Matt Sealey
a0ae9134ba Reduce number of apertures needed for GPU memory access by refining aperture setup to use PHYS and MMU/EMEM
apertures instead of PHYS and EMEM1/MMU and EMEM2. Modify setup to utilize all of reserved memory for PHYS
aperture instead of splitting. Now, a 32MB (in platform fixup, mx51_efikamx.c) reserved block is utilized as
the PHYS, or an 8MB chunk is carved out of coherent memory space (DMA allocation) if reservation is disabled.
Normal memory usage for a desktop with browser, office and media player is well over 64MB but the Xorg driver
will evict unused pixmaps where necessary to keep the current performance pixmaps in place.
2011-08-11 09:22:55 -05:00
Matt Sealey
c5de0bc6cf refine GSL memory sizes in reserved region to 24MB for physical and 8MB other 2011-08-04 16:17:02 -05:00
Matt Sealey
a940a406a3 Reinstate the 32MB reserved area for GPU since DMA allocations of large sizes just don't work.
Correct EMEM2 and PHYS area sizes for GPU to 16MB each (may need refinement)
Bump max zone order anyway
2011-08-02 17:08:32 -05:00
Matt Sealey
e91d512070 whitespace police 2011-08-01 08:24:37 -05:00
Matt Sealey
8bf0ded04f gpu: use ilog2 instead of custom int-to-float messing around (backported from Qualcomm's GSL) 2011-07-28 19:02:50 -05:00
Matt Sealey
0dc6930770 match the latest BSP caching policy for IPU - it seems that the Flash performance update actually causes some subtle artefacts which are not acceptable to users. Go from writecombine (wrong) to a custom writethrough (weird) to the standard writethrough (correct but lower performance) and remove the define that swaps it on or off 2011-07-12 11:29:11 -05:00
Anish Trivedi
22bfe557cb ENGR00141478-1 SAHARA: Move header file to include directory
The user mode libsahara library relied on header file
drivers/mxc/security/sahara2/include/sahara.h. However, to make
the lib build after headers_install step and to remove dependency on
kernel source, moved this header to include/linux/mxc_sahara.h.

These are the necessary changes in the SAHARA driver to use the new
header file in the new location.

Signed-off-by: Anish Trivedi <anish@freescale.com>
2011-07-03 16:03:51 -05:00
Anish Trivedi
fea4e4245d ENGR00142679 SCC2 and SAHARA: changes to support loadable modules
To allow SCC2 and SAHARA drivers to work as loadable modules, needed
to add GPL license to SAHARA driver, export a couple of functions
from SCC2 driver, and the following data buffer mapping change in
SAHARA driver:

When compiled as a loadable module, a data buffer to be DMA'ed in the
SAHARA driver may not be in the kernel direct-mapped region but in
the "Kernel module space" between TASK_SIZE and high_memory-1
(see http://www.arm.linux.org.uk/developer/memory.txt). In this
scenario, the driver canno simply use the __pa macro to obtain
the physical address. It must walk the page tables to find the
page and use the page_to_phys function to find the physical
address that corresponds to the data buffer.

Signed-off-by: Anish Trivedi <anish@freescale.com>
2011-07-03 15:58:18 -05:00
Matt Sealey
25a8bf2a03 ENGR00143575 IPUv3:Align IDMAC BS with DMFC FIFO BS
This patch aligns IDMAC burst size and DMFC FIFO burst
size to get better performance and workarounds black
flash issue when playing video on DP-FG with full
screen mode at 1024x768M@60.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 0e81c738566c2c97541dd92a5978c756b5c22e76)
(cherry picked from commit bbf3e59476f8e2b2453bd5a90664514ed3568207)

Conflicts:

	drivers/mxc/ipu3/ipu_prv.h
2011-06-28 17:47:56 -05:00
Liu Ying
1770869185 ENGR00142683 IPUv3:Increase IDMAC BS for RGBP and DMFC BS
This patch increases IDMAC burst size from 16 pixels to
32 pixels for RGBP pixel format and increases DMFC burst
size to 128 pixels to workaround 1080P60 display video
black flash issue.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit c9fbed971c5a1adf7c727a6b1eba67e179bd1502)
2011-06-28 17:20:37 -05:00
Matt Sealey
2e6cfa8350 IPU Triple Buffering support 2011-06-28 17:20:21 -05:00