Revert "power: Add option to log time spent in suspend"

This reverts commit 5cca9088e48df5b91cbb9bdf43aaa543f545d5f9.
Add genlock and msm related changes
msm: kgsl:  Make memory functions more generic

Consolidate much of the memory management code to be more generic.
This clears the way to be able to plug in different memory types without
lots of if() else() statements.

Change-Id: I16ee939c84e5ea2aa1b9c27eab0ba9586fe5a35d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Add KGSL_IOCTL_GPUMEM_ALLOC

Add a general purpose GPU memory allocation ioctl.  This takes the
memory type decision out of the hands of the userspace and puts it
into the kernel.  Future code can mainipulate kgsl_gpumem_allocate
to point to the appropriate memory allocation function for the
bus type and MMU state.

Change-Id: Iab6eed5e823b92a26fc64cda85c74414f1ed0b14
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: put gpu_id into struct kgsl_devinfo

The field gmem_hostbaseaddr has never been used by userspace
and has always been set to 0. It is being replaced with the
gpu_id field which will contain the revision of the GPU,
for example 200 for adreno200.

Change-Id: I48347da5d430a3aa1db588b4fe54febe7eb44476
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: change readtimestamp from IOR to IOWR and keep legacy

Signed-off-by: Jason Varbedian <jasonv@codeaurora.org>
msm: kgsl: cffdump syncmem ioctl

This ioctl is needed to track memory writes done from userspace
so that this data is correctly captured in the dump.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: Add CFF user event ioctl to write data to cff dumps

Add the ioctl IOCTL_KGSL_CFF_USER_EVENT to write data to cff dump.
Define a new CFF packet cff_op_user_event for this generic user
event.
Write the surface parameter data packet and verify mem file
packet to cff dumps

Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
msm: kgsl: Add timestamp events

Add support for triggering asynchronous events when a timestamp
expires.  The infrastructure is generic enough to support different
sorts of events and callbacks.  The first user of the event
infrastructure is a way to release a genlock locks on behalf of a
user space process.

Change-Id: Ic0dedbadfe67d98a5678453cbe0ac6996ba5c68f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Temporary build fix
msm: kgsl: Replace fget_light/fput_light with fget/fput

The use case really doesn't fit the critera for fget_light and
fput_light, and those symbols are not declared as external symbols
anyway, so it seems to be more correct to use the heavier functions.

Change-Id: I27db52053e071060bb8e0c17d2d347ac295a5abc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Export global symbols

Export any global core symbols that might be used by device modules.

Change-Id: I2b831a2f2df90e7d9057b7f6999c988164949413
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Reorganize debugfs code

Reorganize debugfs functions, move them to new files better reflecting
the new device split arrangement, consolidate initialization functions
and make the files conditional on CONFIG_DEBUG_FS removing numerous

Change-Id: I17932bd81fcede21e20df90825bb8ba52bc6eb1e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Add a generic inline function for allocating contiguous memory.

Change-Id: Idc86f97daf8d309d73c256e70beb18f0b5a1618b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Rename files to represent correct modules

Rename 3d specific files to adreno_*, consolidate 2d files
into z180.[ch].  Keeps modules from cross contamination.

Change-Id: I4d654e039fed4981e532a16873edb8ea3bce0780
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: kgsl: Facilitate building without CONFIG_MSM_KGSL_MMU

Move most MMU related code to kgsl_mmu.c, and make that file
compile conditionally based on the CONFIG_MSM_KGSL_MMU setting.
Use static inlines where appropriate to make things more streamlined.

Change-Id: I8ff4ec2834b995a07e26bf8802d1d9bae162ff69
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Missing:
msm: kgsl: Add CFF user event ioctl to write data to cff dumps

and

msm: kgsl: add MEMORY_BASE and HANG packets

These are changes to the cffdump output format.
MEMORY_BASE reports the address range we're using at the start
of the dump, which helps the postprocessors validate memory
writes.

HANG is emitted at the start of kgsl_postmortem_dump(), and can
be used by the postprocessors to stop when the hang occurs.

Change-Id: Ia60557d34bcaf3a20b3852f880a27f3605fecad2
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: remove extra rmb() for timestamp

There's already an rmb() in the adreno timestamp read function,
so this one is unnecessary.

Change-Id: If9112e70f7033bef8d7784fd3761fe22a7df17c1
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: Remove kgsl_driver.device_count

No longer needed since update to kernel modules.

Change-Id: Ib7b934c9d39fc5855b3b56eb8443224c081d6065
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: kgsl: remove implicit dependencies on pmem and ashmem

These drivers can be used if present, but they are not
mandatory requirements.

Change-Id: Id0c4292f73d448bf83cb0874eb7a0b1f78ac9a47
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>