Now everything is one big memarena instead of a separate PHYS and EMEM,
and instead of having to micromanage the split between Z160 (always PHYS
here) and GPU (99% of it's allocations come out of EMEM), we give blocks
from the same memory pool.
This should effect some more efficient allocation strategies and allow
Xorg acceleration to proceed with much less movement of data (when it
evicts for low memory in PHYS, it moves it to userspace and uses pixman
to render everything, which is CPU intensive) at the potential cost of
leaving slightly less memory around for the 3D GPU, but userspace apps
using the GPU should be doing better with texture management so as not
to soak up >32MiB of reserved GPU memory needlessly.
Moving away from gsl_memmgr to genalloc is not desirable right now since
the driver requires multiple allocation alignment orders and genalloc can
only really guarantee a minimum alignment (i.e. size of allocation
represented by each bit in the allocation bitmap).
Moving to a dma_alloc_coherent/writecombine-only model also poses a
problem since significant amounts of code expects to be able to find the
"base" GPU memory address and with individual allocations instead of a
pooled area, there is no such thing.
Signed-off-by: Matt Sealey <matt@genesi-usa.com>
* increase from 64MB to 96MB total memory
* after some testing it seems that PHYS can be quite small compared
to EMEM, therefore make the aperture split 16MB/80MB
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
No userspace users except a reference in libkgsl.so which is never called.
kgsl_device_clock() is left in (but preprocessed out) since it has a fairly
interesting behavior in turning the autogating on and off which is not the
same as turning the actual clocks on and off and could be useful with
modification for further refinement of power management at a later date.
kgsl_device_regwrite() still exists as it is used for a single point in
the driver (reading timestamp for Z430 ringbuffer) dependent on a build
flag. This flag is not enabled but it is not within the scope of this
patch to actually change this (if it is ever enabled it will be quite
obvious what to do - use kgsl_yamato_regwrite directly as it is entirely
Z430-specific)
This is implemented in the "current" userspace libkgsl.so but in fact
since the ioctl is deprecated, there are no users for it and no evidence
of it ever being used in real life can be presented. Therefore we can
just take out the few things it does and it's single-use dependencies.
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
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)
* 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
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.
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)
seperate interrupt handling and clk_enable for Z160 and Z430
Signed-off-by: Zhou, Jie <b30303@freescale.com>
(cherry picked from commit 7da21af984a50ffb166ab1a088cd2c5d4313537b)
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>
If enabled MMU, there is AXI read/write error on MX508 when run
OpenVG CTS.
Besides, change EMEM1 size to 10MB by default to make gpu driver
work on MX50_ARM2 board with 128MB memory installed.
Signed-off-by: Jie Zhou <b30303@freescale.com>
Remove GSL_MMU_TRANSLATION_ENABLED macro originally used for conditional
compile, and replace it with runtime check to support one mx5x image
Signed-off-by: Jie Zhou <b30303@freescale.com>
When X-accel is enabled, uio driver is used for X server to access
z160 device, so in gsl, we should not operate z160 to avoid conflicts
Signed-off-by: Jie Zhou <b30303@freescale.com>