Just to save work and get it up online. Current status;
GL not working as per usual
VG works - but closing Z160 device locks the driver (seems to be that
device_idle is called after the device is closed and there may be a
driver lock contention going on here).
imxng graphics driver works first run (same as above) but there are
some strange graphical glitches on smaller blits and rectangle fills,
which may be down to some kind of cache coherency problem.
Real (platform device) MMU enable causes the whole thing to explode,
since none of this got updated properly.
Tasks done:
* remove per-process support
* clean up use of device_id -> device since passing the id is a mess
for some reason 3D device isn't inited properly and some parts of
the driver call 3D device functions (notably on closing everything)
possibly because of some off-by-ones
* more global driver locking per qualcomm and to allow below fix
* clean up sharedmem and other APIs which used such semantics e.g.
kgsl_sharedmem_read -> lock, call kgsl_sharedmem_read0, unlock
to just use kgsl_sharedmem_read with manual locks before the call
where required, cleaning up the API a lot
* ditched the requirement for a device argument to sharedmem_alloc
since it never allocated from a per-device pool anyway. This is
a weird hack since the MMU setup needs a real device to set up
on.. Qualcomm's has a much better system and that will be in place
soon
* fixed the cmdstream_issueibcmds wrapper crap
* added kgsl_ringbuffer_issueibcmds to CMDSTREAM_ISSUEIBCMDS ioctl
again (no real effect)
* put kgsl_device_active in kgsl_g12_issueibcmds rather than calling
it manually before executing the function (ensures the autogating
is turned off before telling the Z160 to run a stream) from ioctl
* lots of ioctl debugging code (mostly commented out)
* function renames everywhere
* locks around suspend/resume
* removed a lot of the finegrained locking stuff as qualcomm doesn't
use it. That said, cmdwindow needs some locking (qcom uses a
spinlock) - will be added later
* LOTS of code cleanups/lint/checkpatch fixing
* removed interrupt handler abstraction
* Z160 idle timer update
* move more HAL stuff into the right places to remove the HAL more
* MMU handling cleanups (not complete, lots of it is disabled)
* NOTE: must re-add runpending to sharedmem_alloc? May not be required
when moving to new sharedmem API
* NOTE: check 3D interrupt enables
* remove dumpx stuff which was kind of file based
* remove tbdump stuff which was kind of file based
* gsl_driver_t -> struct kgsl_driver since we touched a member
* kgsl_log_write -> KGSL_*_VDBG
This is not identical to the one Qualcomm uses but it's based on
it (include side at least) - debugfs not there, and no proper
setup so in actual fact no debug ever gets printed.
It is also fairly clumsily ported in (kgsl_log_write replacement)
so is just there to keep it compiling and remove some extra code
definitions which were either unused. Refining it will come as
Qualcomm code is ported in.
No side-effects noticed that weren't previously present - the
tiger apps run fine on imxng (which also works fine) and es11ex
still crashes after some frames.
Some of our userspace scripts autoload gpu on boot and rather than mess
with those, it seems prudent to rename the module to kgsl instead.
This will go awry if we get too close to Qualcomm's code, since they
have a kgsl.c which compiles to kgsl.o which may conflict with the
intermediate module object. Be warned :)
Also makes several changes to the GPU config names to match those in
Qualcomm's driver and remove such config options from gsl_buildconfig.h
which is an obtuse way to configure the driver in the Linux kernel..
Logging is disabled until it can be tested.
Please don't enable per process page tables or mmu page fault stuff since
it will go absolutely batshit.