64 Commits

Author SHA1 Message Date
Ahmed Ammar
c610f58235 amd-gpu: update again. 2012-11-21 14:02:55 -06:00
Ahmed Ammar
e1256d2003 amd-gpu: need a vanilla version for android. 2012-11-02 10:40:44 -05: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
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
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
4d547a2ffc remove innocuous build warning from amd-gpu driver 2011-06-28 16:56:19 -05:00
Richard Zhao
3e373cbfa4 ENGR00143681 GPU: update z430 microcode
The new microcode fix some easy hang issues.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
(cherry picked from commit a48455dbea90720cba4be3e827e8b90e6abffd7d)
(cherry picked from commit cf09e2bac1cac560c6019332c37676b919700dda)
2011-06-28 15:18:05 -05:00
Zhou, Jie
e26d3e911c ENGR00143019-2 GPU: enable MMU
With MMU enabled, there is no need to reserve memory for GPU
at boot time

Signed-off-by: Zhou, Jie <b30303@freescale.com>
(cherry picked from commit 326da1d885108399f4e22d10a8fe341a7a110ffc)
2011-06-28 12:47:06 -05:00
Zhou, Jie
86997937ca ENGR00142351 mxc_gpu: autogating: add pending flag
pending indicate the timer has been fired but clock not yet disabled.

This patch fixs the bug that sometimes in irq handle it tries to enable
clock and cause BUG.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
(cherry picked from commit 4b73c7a14fdebbd1240dbb1f5e4efa5b7a65f63c)
2011-06-28 12:43:18 -05:00
Zhou, Jie
99f16398f4 ENGR00141400 GPU: Improve GPU clock gating
seperate interrupt handling and clk_enable for Z160 and Z430

Signed-off-by: Zhou, Jie <b30303@freescale.com>
(cherry picked from commit 7da21af984a50ffb166ab1a088cd2c5d4313537b)
2011-06-28 12:42:22 -05:00
Richard Zhao
0a1efe050a ENGR00140700 GPU: fix tiger run the second time causing system hang
The root cause is endless GSL_INTR_BLOCK_YDX_CP interrupt.
Apply interrupt status read work around only when yamato started.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
2011-04-20 10:14:10 -05:00
Zhou, Jie
c50d0f808c ENGR00140050 GPU: workaround hang with heavy bus loading
The GPU hang when run two cubes together with one video playback.
According to the suggestion from AMD, we'd better not read register
when GPU active, especially for CP block.

Signed-off-by: Zhou, Jie <b30303@freescale.com>
2011-04-20 10:06:53 -05:00
Matt Sealey
5898cfa2ad amd-gpu: enable limiting of in-flight AXI transactions for Z160 GPU 2011-03-06 16:52:35 -06:00
Richard Zhao
a2f5eeeefe ENGR00138141 GPU: add a wait loop to check timestamp for yamato
When bus is busy, for example vpu is working too, the timestamp is
possiblly not yet refreshed to memory by yamato when we get
GSL_INTR_YDX_CP_RING_BUFFER. For most cases, it will hit on first
loop cycle. So it don't effect performance.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
(cherry picked from commit e97cab9b93d3e3f125684577f2522404da77872e)
2011-02-12 02:50:55 -06:00
Richard Zhao
62cc8b2320 ENGR00135971 GPU: move clk_enable/disable out of timer handler
For timer based power autogating, we have to move clk_enable/disable out of
timer handler, because they become may sleep.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
2011-01-18 09:37:44 -06:00
Jie Zhou
95ee853082 ENGR00134150 GPU: destroy device in workqueue for error interrupts
If GPU error interrupt detected, related device will be destroyed.
In the destory function, device_idle and mutex_lock may cause sleep,
which may cause kernel crash, so delay the device destroy to the
workqueue to avoid this.

Signed-off-by: Jie Zhou <b30303@freescale.com>
2011-01-18 09:37:34 -06:00