Commit Graph

7 Commits

Author SHA1 Message Date
Matt Sealey
76e264f5ed amd-gpu: huge commit with many, many changes
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
2012-12-07 09:44:13 -06:00
Matt Sealey
3f4491d9b6 amd-gpu: refine logging
* 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.
2012-11-29 15:36:16 -08:00
Matt Sealey
a5d27bcb79 amd-gpu: make fine-grained locking optional again (from Kconfig)
Obviously has some serious serialization issues making it not so
useful.
2012-11-28 10:34:34 -08:00
Matt Sealey
ad604e630a amd-gpu: rename module from "gpu" to "kgsl" partially to prevent loading
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.
2012-11-26 17:22:44 -06: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
Jie Zhou
373272e191 ENGR00125729-2 GPU: merge hal for MX35/MX50 and MX51/MX53
Add MX508 support, and adapt the gpu driver to one image

Signed-off-by: Jie Zhou <b30303@freescale.com>
2010-11-13 10:07:57 -06:00
Gene Chouiniere
da25d30bfa ENGR00125010-1 gpu: add gpu driver support
Migrate from RC14 with freescale changes.

Signed-off-by: Gene Chouiniere <Gene.Chouiniere@amd.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Rob Herring <r.herring@freescale.com>
2010-08-10 11:51:46 -05:00