Commit Graph
4772 Commits
Author SHA1 Message Date
Sushmita Susheelendra 41f8fa3306 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>
2011-10-03 16:17:02 -07:00
Jeremy Gebben 2f789d14b8 msm: kgsl: stop forcing hw patchid to 0 for 8x60 and 8960
This field of the chip_id was forced to 0 because userspace
got confused when it was a different value. Userspace has
been corrected to deal with the correct patch ids.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:16:54 -07:00
Sushmita Susheelendra fbb46aabd3 msm: kgsl: Fix ringbuffer command names
The prefix PM4_ was changed to CP_.

Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2011-10-03 16:16:53 -07:00
Jeremy Gebben 6061bc76ed 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.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:16:26 -07:00
Jeremy Gebben a7423e433e 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>
2011-10-03 16:16:26 -07:00
Suman Tatiraju 7fe62a3d10 msm: kgsl: add gpu busy stats to sysfs
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2011-10-03 16:15:57 -07:00
Tarun Karra 9b92ccd290 msm: kgsl: Changed variable type from unsigned int to long
Changed variable "result" type from unsigned int to long
to accurately reflect the result of macro wait_event_interruptible_timeout

Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2011-10-03 16:15:40 -07:00
Tarun Karra 44cbeb74ac msm: kgsl: changed strncat to strlcat
Changed strncat to strlcat to pervent buffer overflow.

Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2011-10-03 16:15:32 -07:00
Lucille Sylvester 28e99c8edb msm: kgsl: Use the first command to initiate busy
There may be multiple command submissions per-frame.  Start your
busy count only on the first one.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-03 16:15:32 -07:00
Lucille Sylvester 622927ad37 msm: kgsl: Update pwrlevel_change
Previously only supported fabric votes, now supporting AXI as well.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-03 16:14:29 -07:00
Sushmita Susheelendra 22d87177a2 msm: kgsl: Fix build errors when CONFIG_MSM_KGSL_CFF_DUMP is on
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2011-10-03 16:14:28 -07:00
Laura Abbott b1b7b43a64 gpu: ion: check return value from gen_pool_add
Check the return value from gen_pool_add and handle
any error gracefully.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-03 16:14:18 -07:00
Jeremy Gebben 79acee6f01 msm: kgsl: fix possible memory leak in firmware loading
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:14 -07:00
Jeremy Gebben 3c127f589a msm: kgsl: fix parameter checking in adreno_ringbuffer_issueibcmds
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:14 -07:00
Jeremy Gebben 690f9d172f msm: kgsl: fix error handling in kgsl_ioct_sharedmem_flush_cache
For some error conditions it was possible to exit this function
without unlocking the spinlock.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:13 -07:00
Jordan Crouse 6c2992ac90 msm: kgsl: Check for NULL from kgsl_get_device_from_dev
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 16:14:12 -07:00
Jordan Crouse 2db0af97c8 msm: kgsl: Don't lookup the device with inodep if we don't have to
kgsl_open does a fine job of setting the private members of
struct file so use that in the other fops functions rather then
looking up the device via the inode minor every time.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 16:14:12 -07:00
Jeremy Gebben a87bb86117 msm: kgsl: switch sprintf calls to snprintf
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:11 -07:00
Jordan Crouse b58e61b2fa msm: kgsl: Avoid a deadlock in the IRQ handler
If a major GPU fault occurs, interrupts should be turned off to
avoid a storm.  Calling disable_irq from within the IRQ handler,
however has deadlock problems.  Call disable_irq_nosync in an
interrupt context instead.

CRs-fixed: 299686
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:57 -07:00
Jordan Crouse 505df9cb23 msm: kgsl: Consolidate all GPU information in one spot
We are starting to accumulate a lot GPU specific information,
and it is handy to keep it all in one place where new core IDs,
firmware and device functions can be easily added.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:36 -07:00
Jordan Crouse 084427d2c2 msm: kgsl: Rename PM4 to CP to better align with A3XX code
The A3XX code likes to use CP_ as a prefix for ringbuffer
commands rather then the legacy PM4 prefix.  Since it is more
correct, switch the A2XX code over now to make it easier to
integrate A3XX into the mix.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:35 -07:00
Jordan Crouse 2c542b697e msm: kgsl: Don't make assumptions about VMA regions
We cannot assume that a VMA region created as a result of an mmap
belongs exclusively to us.  Allow the user to pass the size of
the vmalloc region through the 'gpuaddr' member of the ioctl
struct and do strict checking on the returned vma to make sure
it is valid.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:34 -07:00
Jordan Crouse 0e0486f251 msm: kgsl: Rearrange some drawctxt functions
Move some of the drawctxt functions that are common
to A2XX and A3XX back to the generic drawctxt code
and headers.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:29 -07:00
Jordan Crouse c8c9fcd258 msm: kgsl: Consolidate and cleanup A2XX irq handlers
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:28 -07:00
Jordan Crouse 196c45b391 msm: kgsl: Add adreno_is_a2xx() function
Add a helper function to catch all A2XX devices.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:23 -07:00
Jordan Crouse 9f73921448 msm: kgsl: Various cleanups
Remove some uneeded code and tighten things up in
anticipation of the A3XX device.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 10:28:22 -07:00
Sushmita Susheelendra 354d9717c5 msm: kgsl: Use process specific pt_base in postmortem dump
When doing a look-up of the IB1 base address, use the pagetable
belonging to the respective process rather than the pagetable
belonging to the process in whose context the GPU hung.

Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
2011-10-03 10:28:21 -07:00
Jeremy Gebben 5bb7ece4d4 msm: kgsl: add adreno225 support
The adreno220 specific registers and setting are all used
on adreno225.  Also there is a a225 specific setting setting
for REG_SQ_FLOW_CONTROl at startup to enable the larger
instruction store found on this gpu.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 10:27:50 -07:00
Lucille Sylvester 57996e3add msm: kgsl: Only bind kgsl to CPU0, not CPU1
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-03 10:27:01 -07:00
Jeremy Gebben 4e8aada5f3 msm: kgsl: split mh and mmu initialization
The MH block should be initialized even if the gpu mmu
is not enabled so that AXI error interrupts will still
be generated.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 10:26:57 -07:00
Stephen Boyd b6900e1671 msm: kgsl: Replace open-coded register call with SCM atomic
Instead of open-coding the SCM register calling convention, use
the SCM atomic apis.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2011-10-03 10:26:55 -07:00
Tarun Karra 16346b0a11 msm: kgsl: shaders must be repartitioned during gmem save/restore
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2011-10-03 10:26:44 -07:00
Jason 848741a5ec msm: kgsl: make map_user_mem accept sharedmem_from_pmem struct
Signed-off-by: Jason Varbedian <jasonv@codeaurora.org>
2011-10-03 09:59:03 -07:00
Jeremy Gebben 1757a8593f msm: kgsl: use del_timer_sync() to cancel the idle timer
Otherwise there's a chance the idle timer can fire after
we're suspended/stopped on SMP systems.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 09:59:02 -07:00
Wei Zou 4061c0b26a msm: kgsl: Check for null physical address in PMEM case
CRs-fixed: 294653
Signed-off-by: Wei Zou <wzou@codeaurora.org>
2011-10-03 09:59:01 -07:00
Jordan Crouse a78c9179a1 msm: kgsl: Introduce GPU specific functions
Add the infrastructure for specific functions based
on the type of 3D GPU core attached to the system.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 09:59:01 -07:00
Jason Varbedian 80ba33d88f msm: kgsl: change readtimestamp from IOR to IOWR and keep legacy
Signed-off-by: Jason Varbedian <jasonv@codeaurora.org>
2011-10-03 09:58:23 -07:00
Bryan Huntsman 3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00
Colin Cross 9abd59b0df Merge commit 'v3.0.1' into android-3.0 2011-08-10 18:07:59 -07:00
Colin Cross 4e111751cf Merge commit 'v3.0' into android-3.0 2011-08-10 18:04:30 -07:00
Iliyan Malchev 3fe24366a4 ion: minor clean up
-- init rb nodes in ion_handle_create
-- in ion_handle_destroy, check that a node belongs to a tree before removing
   it (safety check, does not happen right now)
-- mark as static functions used only inside ion.c
-- update comments to ion_share() with a relevant blurb from the implementation
-- other minor updates/typo fixes to comments

Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-09 14:49:21 -07:00
Alex Deucher eff0f0eb63 drm/radeon/kms: add missing vddci setting on NI+
commit 4639dd21e7 upstream.

Need to add vddci setting to pm init as well as
resume.  Fixes hangs on load on some boards.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=38754

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04 21:58:36 -07:00
Jerome Glisse 803df865c9 drm/radeon/kms: fix DP training for DPEncoderService revision bigger than 1.1
commit 5a96a899bb upstream.

DPEncoderService newer than 1.1 can't properly program the DP (display port)
link training. When facing such version use the DIGxEncoderControl method
instead. Fix DP link training on some R7XX.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04 21:58:36 -07:00
Alex Deucher eec8f481cc drm/radeon/kms: fix i2c map for rv250/280
commit 6dd666333d upstream.

Those chips have crt2_ddc bus.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=39672

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-04 21:58:36 -07:00
Linus Torvalds ad21b11577 Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915: Fix unfenced alignment on pre-G33 hardware
  drm/i915: Add quirk to disable SSC on Lenovo U160 LVDS
2011-07-21 11:07:18 -07:00
Chris Wilson e28f871165 drm/i915: Fix unfenced alignment on pre-G33 hardware
Align unfenced buffers on older hardware to the power-of-two object
size.  The docs suggest that it should be possible to align only to a
power-of-two tile height, but using the already computed fence size is
easier and always correct. We also have to make sure that we unbind
misaligned buffers upon tiling changes.

In order to prevent a repetition of this bug, we change the interface
to the alignment computation routines to force the caller to provide
the requested alignment and size of the GTT binding rather than assume
the current values on the object.

Reported-and-tested-by: Sitosfe Wheeler <sitsofe@yahoo.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36326
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-07-18 14:02:06 -07:00
Keith Packard 435793dfb8 drm/i915: Add quirk to disable SSC on Lenovo U160 LVDS
We've tried several times to make this machine 'just work', but every
patch that does causes many other machines to fail. This adds a quirk
which special cases this hardware and forces ssc to be
disabled. There's no way to override this from the command line; that
would be a significantly more invasive change.

This patch fixes #36656 on fdo bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=36656

Signed-off-by: Keith Packard <keithp@keithp.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=36656
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-13 23:53:41 -07:00
Linus Torvalds c835490196 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
  agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M
  drm/radeon/kms: fix typo in read_disabled vbios code
  drm/radeon/kms: use correct BUS_CNTL reg on rs600
  drm/radeon/kms: fix backend map typo on juniper
  drm/radeon/kms: fix regression in hotplug
2011-07-13 14:04:26 -07:00
Alex Deucher c61d0af913 drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
Compute drivers may change this, so make sure to emit it to
avoid errors in bo blits.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=39119

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-07-13 07:47:13 +01:00
Colin Cross 75c56a8111 Merge commit 'v3.0-rc7' into android-3.0 2011-07-12 20:10:37 -07:00