Commit Graph

5163 Commits

Author SHA1 Message Date
Jeremy Gebben
c15b4613d7 msm: kgsl: return correct error code for unknown ioctls
Unknown ioctl code errors are supposed to be ENOIOCTLCMD,
not EINVAL.

Change-Id: Id38529e4ec70d63091a9273a780585aea6ae9d9a
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-03-05 11:39:46 -07:00
Jeremy Gebben
ff6eab00fd msm: kgsl: fix statistics for ion memory regions
The sysfs code was reading the wrong entry in the stats
array, so it printed the wrong value.

Change-Id: I26ce8bbca152a98e3dac53a9c154e52b020d5532
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-03-05 11:39:46 -07:00
Linux Build Service Account
49f95a982e Merge "msm: kgsl: Add support for adreno203 in msm8x25" into msm-3.0 2012-03-05 04:43:58 -08:00
Shubhraprakash Das
8cbd23218e msm: kgsl: Check before resetting timestamps of 2D core to 0 on startup
The timestamp of 2D core should not be set to 0 on startup if the
device has previously been started and is waking up from a suspend call.
This can cause processes to wait indefinitely for the 2D core if
they received a timestamp before the device went into suspend

Change-Id: Ida5dbdcb89ea7e0cf86110ecc2bd7d568123c364
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2012-03-04 16:05:27 -07:00
Linux Build Service Account
4d088da993 Merge changes I2b676dbe,Ic63a24bf into msm-3.0
* changes:
  gpu: ion: Add API to do cache operations
  gpu: ion: Do not allow cached IOMMU mappings.
2012-03-03 15:40:48 -08:00
Ranjhith Kalisamy
938e00f21a msm: kgsl: Add support for adreno203 in msm8x25
For msm8x25, the adreno version returned by hardware is incorrect. Patch
the version to return the correct one.

Change-Id: Ie47ff55a5196442545f5adc60f4c7ce833ba458d
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
2012-03-03 21:15:31 +05:30
Olav Haugan
41f8579a79 gpu: ion: Add API to do cache operations
Clients need to be able to do cache operations
on ION buffers in the kernel. Add API to
flush, invalidate, or invalidate and flush the
cache of an ION buffer.

Change-Id: I2b676dbe32372b3c17e4aaf39f51878b105a699c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-03-02 17:33:19 -08:00
Olav Haugan
79e9ffa55a gpu: ion: Do not allow cached IOMMU mappings.
Cached IOMMU mapping is not supported.

Add check for clients trying to map buffers
into IOMMU as cached and return error.

Change-Id: Ic63a24bf651d613933633cd81143701f66df566c
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-03-02 17:33:19 -08:00
Shubhraprakash Das
2dfe5dd0c5 msm: kgsl: Add a new property to IOCTL_KGSL_DEVICE_GETPROPERTY
Return the reset status of the GPU unit when
IOCTL_KGSL_DEVICE_GETPROPERTY is called with
type KGSL_PROP_GPU_RESET_STAT

Change-Id: I4bb17be959eadba3ba491d94c6fd4f5824442e92
Signed-off-by: Shubhraprakash Das<sadas@codeaurora.org>
2012-03-02 13:47:28 -07:00
Harsh Vardhan Dwivedi
ff6dc297b8 msm: kgsl: Add support for controlling ib dump in postmortem dump
Add /sys/kernel/debug/kgsl/kgsl-3d0/postmortem/ib_enabled to debugfs,
to control whether IBs are dumped by postmortem dump. Add check to
postmortem dump to dump registers if register dump is enabled.
By default ib dump and register dump during postmortem dump are
disabled.

Change-Id: I71b0b0c97be0753f88f6f57a1cbc6b5ee93aaffc
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
2012-03-01 12:06:51 -07:00
Jordan Crouse
2832867ed2 msm: kgsl: Identify all variations of indirect buffer opcodes
When searching for indirect buffers to dump in the snapshot, look for
all of the variations for the indirect buffer opcode, not just the
most commonly used one.  This picks up many IB2 buffers that were
previously left behind.

Change-Id: Ic0dedbad0fef91bf21a5de6d1928f350d2ad2009
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-27 16:29:35 -07:00
Jordan Crouse
e9e91bf3e4 msm: kgsl: Limit buffer dumping in the snapshot to the current context
In the vast majority of cases the only interesting indirect buffers (IBs)
 to dump in a shapshot are the ones that are in the current context
because they are the ones that probably contributed to the hang. Limit
the IBs that are dumped to the range between the start of context and
the RB read pointer. If the start of context can't be found, then dump
from the start of the ringbuffer dump to read pointer. Also, since
buffers can be reused (though typically not in the same context), use the
most recent parsed size when dumping the IB to make sure we get the right
buffer contents for the most recent usage of said buffer.

Change-Id: Ic0dedbad090156d69b964e229806aa45242de6fd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-27 16:27:31 -07:00
Jordan Crouse
1268f9cf28 msm: kgsl: A3XX: Add VBIF registers to the snapshot dump
Add the VBIF registers that we modify to the snapshot dump so they
can be properly verified after a hang.

Change-Id: Ic0dedbad07ab62cbd96a0c2e7343b38779163e24
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-27 16:27:26 -07:00
Linux Build Service Account
d705a48883 Merge "msm: kgsl: Dereference pagetable pointer after checking it's not NULL" into msm-3.0 2012-02-25 20:51:56 -08:00
Linux Build Service Account
3b8582b49c Merge changes Ic0dedbad,Ic0dedbad into msm-3.0
* changes:
  msm: kgsl: A3XX: Use recommended VBIF setings for dual port access
  msm: kgsl: Program both IOMMUs at our disposal on 8064
2012-02-25 12:46:51 -08:00
Linux Build Service Account
cce42f625a Merge "gpu: ion: Change from uncached to buffered mapping" into msm-3.0 2012-02-25 12:46:51 -08:00
Linux Build Service Account
8e3e62e472 Merge "msm: kgsl: Increase the wrap around constant while comparing timestamps" into msm-3.0 2012-02-25 12:46:51 -08:00
Linux Build Service Account
68f4b74978 Merge "msm: kgsl: Update A3XX REG_TO_MEM opcodes in legacy context switch" into msm-3.0 2012-02-23 21:36:41 -08:00
Olav Haugan
de074a7d5b gpu: ion: Change from uncached to buffered mapping
PMEM uses buffered mappings when PMEM device is
opened with O_SYNC flag. ION should have the same
behavior as PMEM.

Change ION to provide buffered mappings instead
of uncached when the O_DSYNC flag is used when
opening the ION device.

CRs-fixed: 335827
Change-Id: I369a35a2ff68adc8339380dfbb7721e3d361ee69
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-02-23 13:48:18 -08:00
Shubhraprakash Das
c0f21b6bc1 msm: kgsl: Dereference pagetable pointer after checking it's not NULL
The pt pointer was being checked against NULL value after it was
dereferenced

Change-Id: Ifbdeb7bec5e3f28396196d8f55356e5dbf1a2e55
CRs-Fixed: 336516
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2012-02-22 00:01:37 -07:00
Linux Build Service Account
c18a9d9375 Merge "Revert "msm: kgsl: flush device workqueue before stop"" into msm-3.0 2012-02-21 19:55:53 -08:00
Shubhraprakash Das
3dd7375fa4 msm: kgsl: Increase the wrap around constant while comparing timestamps
The wrap around value while comparing timestamps determines whether
the smaller timestamp value has wrapped around or not. Increase this
value as we are hitting cases where we detect a wrap around condition but
in reality the timestamp has not yet wrapped around.

Change-Id: I2dfbebf94468ec8895536214c81fc22ef62212ae
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2012-02-21 11:22:59 -07:00
Jordan Crouse
563cf0fd47 msm: kgsl: A3XX: Use recommended VBIF setings for dual port access
Use the recommended VBIF settings to set up dual AXI port access and
better and faster timings.

Change-Id: Ic0dedbad5394d1a04a6e480e4a4ccb45c307ab17
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-21 09:18:33 -07:00
Jordan Crouse
46cf4bb5eb msm: kgsl: Program both IOMMUs at our disposal on 8064
APQ8064 has two AXI ports attached to the GPU with an IOMMU on both.
The VBIF can be programmed to use a round-robin arbitration to access
the ports equally, so we need to program both IOMMUs with the same
pagetable to make sure that the GPU can get where it needs to go.
All this involves a board file infrastructure change that affects 8960
too, but no functional changes are happening for that platform.

Change-Id: Ic0dedbad5198ed9c453711e58a3f1220ef5d5b4e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-21 09:18:31 -07:00
Jordan Crouse
d00708822d msm: kgsl: Update A3XX REG_TO_MEM opcodes in legacy context switch
Version 29 of the PM4 firmware for A3XX modified the format of the
REG_TO_MEM opcode by changing the bit shift of one the fields.
Modify the legacy context switch code accordingly.  This will break
users of older firmware, but the old firmware shouldn't ever be in
wide use anyway, so backwards compatibility is not a concern.

Change-Id: Ic0dedbad9a6d50077a0001c95d2a0dcd30c4f070
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-21 09:18:29 -07:00
Olav Haugan
f6dc774968 gpu: ion: Move MFC heap to different address
Video hardware has the following requirements for
ION heaps:

1. MM heap must be at a higher address than FW heap.
2. MFC heap must at a higher address than FW
3. MM heap must be adjacent to FW heap.
   (There cannot be another heap between FW and MM heap)
4. MM and MFC heap cannot be more than 256MB away
   from the base address of the FW heap.

MM heap is configured as a reusable heap (FMEM heap) and FMEM
is carved out at a much higher address than the other heaps breaking
the above requirements. To support the above requirements the
MFC heap together with the FW heap must be carved out at the same
location as MM heap.

Change-Id: Ie0acb4b267d4307190ea3cd9ff23c710ffa1a538
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2012-02-19 20:26:15 -07:00
Suman Tatiraju
4a32c65a5a Revert "msm: kgsl: flush device workqueue before stop"
This reverts commit f8e5cd2af7.

Change-Id: Ie2902a33ffca298a27d9ef811e7e57a6d3630c5f
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2012-02-17 12:06:49 -08:00
Linux Build Service Account
1d5e261d0a Merge changes Ia93431bc,I49f8f58a,I3da075c3 into msm-3.0
* changes:
  msm: kgsl: change timestamp frees to use kgsl_event
  msm: kgsl: cancel events from kgsl_release
  msm: kgsl: remove readl/writel use for dma memory
2012-02-16 00:08:24 -08:00
Linux Build Service Account
8a9b385bb4 Merge "msm: kgsl: Idle the core before changing the gpu clock." into msm-3.0 2012-02-15 11:27:50 -08:00
Jeremy Gebben
c81a3c6d18 msm: kgsl: change timestamp frees to use kgsl_event
The timestamp memqueue was unsorted, which could cause
memory to not be freed soon enough. The kgsl_event
list is sorted and does almost exactly the same thing
as the memqueue did, so freememontimestamp is now
implemented using the kgsl_event list.

CRs-Fixed: 327647
Change-Id: Ia93431bc5f31a9286cc78a92271b43a3a6ac9baf
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-02-13 12:52:28 -07:00
Jeremy Gebben
fd87f9ac2c msm: kgsl: cancel events from kgsl_release
Events need to be cancelled when an fd is released,
to avoid possible memory leaks or use after free.

When the event is cancelled, its callback is called.
Currently this is sufficient since events are used for
resource management and we have no option but to
release the lock or memory. If future uses need to
distinguish between the callback firing and
a cancel, they can look at the timestamp passed to
the callback, which will be before the timestamp they
expected. Otherwise a separate cancel callback can
be added.

CRs-Fixed: 327647
Change-Id: I49f8f58aea6366344d1c82613f73881a169834b3
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-02-13 12:52:28 -07:00
Jeremy Gebben
aba1327fbd msm: kgsl: remove readl/writel use for dma memory
For dma_alloc_coherent() you don't need writel/readl because
it's just a plain old void *. Linux tries very hard to make a
distinction between io memory (void __iomem *) and memory
(void *) so that drivers are portable to architectures that
don't have a way to access registers via pointer dereferences.
You can see http://lwn.net/Articles/102232/ and the Linus rant
http://lwn.net/Articles/102240/ here for more details behind
the motivation.

Change-Id: I3da075c30304e4adf321cfb3edb1baa4a93fc2ce
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-02-13 12:52:27 -07:00
Jeremy Gebben
6390483572 msm: kgsl: queue timestamp expired work more often
There are a some workloads where interrupts do not
always get generated, and as a result the timestamp
work was not triggered often enough.

Queue timestamp expired work from adreno_waittimestamp(),
when the timestamp expires while we are not waiting.
It is possible in this case that no interrupt fired
because no processes were waiting.

Queue timestamp expired work when freememontimestamp
is called, which reduces the amount of memory
built up by applications that use this api often.

CRs-Fixed: 336057
Change-Id: Ib4610dfa53af04b5a7b1eb51281d32d0e5be8471
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-02-13 12:52:26 -07:00
Eugeni Dodonov
dade9ad146 drm/i915: handle 3rd pipe
commit 07c1e8c1462fa7324de4c36ae9e55da2abd79cee upstream.

We don't need to check 3rd pipe specifically, as it shares PLL with some
other one.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41977
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:09 -08:00
Rodrigo Vivi
bd26f22958 drm/i915: Fix TV Out refresh rate.
commit 23bd15ec662344dc10e9918fdd0dbc58bc71526d upstream.

TV Out refresh rate was half of the specification for almost all modes.
Due to this reason pixel clock was so low for some modes causing flickering screen.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:09 -08:00
Daniel Vetter
5b19005c62 drm/i915: check ACTHD of all rings
commit 097354eb14fa94d31a09c64d640643f58e4a5a9a upstream.

Otherwise hangcheck spuriously fires when running blitter/bsd-only
workloads.

Contrary to a similar patch by Ben Widawsky this does not check
INSTDONE of the other rings. Chris Wilson implied that in a failure to
detect a hang, most likely because INSTDONE was fluctuating. Thus only
check ACTHD, which as far as I know is rather reliable. Also, blitter
and bsd rings can't launch complex tasks from a single instruction
(like 3D_PRIM on the render with complex or even infinite shaders).

This fixes spurious gpu hang detection when running
tests/gem_hangcheck_forcewake on snb/ivb.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:09 -08:00
Wu Fengguang
1f8991ccf7 drm/i915: DisplayPort hot remove notification to audio driver
commit 832afda6a7d7235ef0e09f4ec46736861540da6d upstream.

On DP monitor hot remove, clear DP_AUDIO_OUTPUT_ENABLE accordingly,
so that the audio driver will receive hot plug events and take action
to refresh its device state and ELD contents.

Note that the DP_AUDIO_OUTPUT_ENABLE bit may be enabled or disabled
only when the link training is complete and set to "Normal".

Tested OK for both hot plug/remove and DPMS on/off.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:08 -08:00
Wu Fengguang
032aa01c0b drm/i915: HDMI hot remove notification to audio driver
commit 2deed761188d7480eb5f7efbfe7aa77f09322ed8 upstream.

On HDMI monitor hot remove, clear SDVO_AUDIO_ENABLE accordingly, so that
the audio driver will receive hot plug events and take action to refresh
its device state and ELD contents.

The cleared SDVO_AUDIO_ENABLE bit needs to be restored to prevent losing
HDMI audio after DPMS on.

CC: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:08 -08:00
Seth Forshee
32c4490a6f drm/radeon/kms: disable output polling when suspended
commit 86698c20f71d488b32c49ed4687fb3cf8a88a5ca upstream.

Polling the outputs when the device is suspended can result in erroneous
status updates. Disable output polling during suspend to prevent this
from happening.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:07 -08:00
Ben Skeggs
e1cf4ad959 drm/nouveau/gem: fix fence_sync race / oops
commit 525895ba388c949aa906f26e3ec5cb1ab041f56b upstream.

Due to a race it was possible for a fence to be destroyed while another
thread was trying to synchronise with it.  If this happened in the fallback
non-semaphore path, it lead to the following oops due to fence->channel
being NULL.

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<fa9632ce>] nouveau_fence_update+0xe/0xe0 [nouveau]
*pde = a649c067
SMP
Modules linked in: fuse nouveau(O) ttm(O) drm_kms_helper(O) drm(O) mxm_wmi video wmi netconsole configfs lockd bnep bluetooth rfkill ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ip6table_filter ip6_tables snd_hda_codec_realtek snd_hda_intel snd_hda_cobinfmt_misc uinput ata_generic pata_acpi pata_aet2c_algo_bit i2c_core [last unloaded: wmi]

Pid: 2255, comm: gnome-shell Tainted: G           O 3.2.0-0.rc5.git0.1.fc17.i686 #1 System manufacturer System Product Name/M2A-VM
EIP: 0060:[<fa9632ce>] EFLAGS: 00010296 CPU: 1
EIP is at nouveau_fence_update+0xe/0xe0 [nouveau]
EAX: 00000000 EBX: ddfc6dd0 ECX: dd111580 EDX: 00000000
ESI: 00003e80 EDI: dd111580 EBP: dd121d00 ESP: dd121ce8
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process gnome-shell (pid: 2255, ti=dd120000 task=dd111580 task.ti=dd120000)
Stack:
 7dc86c76 00000000 00003e80 ddfc6dd0 00003e80 dd111580 dd121d0c fa96371f
 00000000 dd121d3c fa963773 dd111580 01000246 000ec53d 00000000 ddfc6dd0
 00001f40 00000000 ddfc6dd0 00000010 dc7df840 dd121d6c fa9639a0 00000000
Call Trace:
 [<fa96371f>] __nouveau_fence_signalled+0x1f/0x30 [nouveau]
 [<fa963773>] __nouveau_fence_wait+0x43/0xd0 [nouveau]
 [<fa9639a0>] nouveau_fence_sync+0x1a0/0x1c0 [nouveau]
 [<fa964046>] validate_list+0x176/0x300 [nouveau]
 [<f7d9c9c0>] ? ttm_bo_mem_put+0x30/0x30 [ttm]
 [<fa964b8a>] nouveau_gem_ioctl_pushbuf+0x48a/0xfd0 [nouveau]
 [<c0406481>] ? die+0x31/0x80
 [<f7c93d98>] drm_ioctl+0x388/0x490 [drm]
 [<c0406481>] ? die+0x31/0x80
 [<fa964700>] ? nouveau_gem_ioctl_new+0x150/0x150 [nouveau]
 [<c0635c7b>] ? file_has_perm+0xcb/0xe0
 [<f7c93a10>] ? drm_copy_field+0x80/0x80 [drm]
 [<c0564f56>] do_vfs_ioctl+0x86/0x5b0
 [<c0406481>] ? die+0x31/0x80
 [<c0635f22>] ? selinux_file_ioctl+0x62/0x130
 [<c0554f30>] ? fget_light+0x30/0x340
 [<c05654ef>] sys_ioctl+0x6f/0x80
 [<c099e3a4>] syscall_call+0x7/0xb
 [<c0406481>] ? die+0x31/0x80
 [<c0406481>] ? die+0x31/0x80

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:07 -08:00
Michel Dänzer
f5e9a83833 drm/radeon: Set DESKTOP_HEIGHT register to the framebuffer (not mode) height.
commit 1b61925061660009f5b8047f93c5297e04541273 upstream.

The value of this register is transferred to the V_COUNTER register at the
beginning of vertical blank. V_COUNTER is the reference for VLINE waits and
goes from VIEWPORT_Y_START to VIEWPORT_Y_START+VIEWPORT_HEIGHT during scanout,
so if VIEWPORT_Y_START is not 0, V_COUNTER actually went backwards at the
beginning of vertical blank, and VLINE waits excluding the whole scanout area
could never finish (possibly only if VIEWPORT_Y_START is larger than the length
of vertical blank in scanlines). Setting DESKTOP_HEIGHT to the framebuffer
height should prevent this for any kind of VLINE wait.

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

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-13 11:06:07 -08:00
Kedar Joshi
c11d098f53 msm: kgsl: Idle the core before changing the gpu clock.
Idle the core before changing the gpu clock as instability
is caused on some platforms on changing the clock freq when
core is busy.

CRs-fixed: 328249
Change-Id: I5f6a507eaad383bde646001d2e10c2b62880515b
Signed-off-by: Kedar Joshi <kjoshi@codeaurora.org>
2012-02-13 10:39:07 +05:30
Lynus Vaz
284d10404f msm: kgsl: Poke regularly in adreno_idle
Poking once during adreno_idle is not enough; a GPU hang may still happen.
Seen on 7x27A. Write a few times during the wait timeout, to ensure that
the WPTR is updated properly.

Change-Id: Id704e187a05540afa6ef4b0542d16c7bb9a6372d
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2012-02-10 05:38:26 -07:00
Linux Build Service Account
f4be39fe8e Merge changes I32e71478,I85895451,I00b0b40b,Ic0dedbad,Ic0dedbad,Ic0dedbad,Ic0dedbad,Ic0dedbad,Ic0dedbad,Ic0dedbad,Ic0dedbad into msm-3.0
* changes:
  msm: kgsl: Disable ME, PFP split timeout and VFD interrupts.
  msm: kgsl: Context switch fixes for A3XX
  msm: board-8064: Fix 8064 GPU clk at 192 Mhz
  msm: kgsl: Use the right physical addresses in NOMMU mode
  msm: kgsl: Only use the setstate slowpath for A3XX
  msm: kgsl: Set the default MMU to 'none' for APQ8064
  msm: kgsl: Fix the A3XX debugbus snapshot code
  msm: kgsl: Enable A3XX GPU hang detection
  msm: kgsl: A3XX GMEM save/restore was never executed
  msm: kgsl:  Correct the microcode sizes in the GPU snapshot
  msm: kgsl: Update the GMEM and istore size for A320
2012-02-09 22:09:38 -08:00
Linux Build Service Account
6cce25a428 Merge "gpu: ion: Add support for IOMMU in CP heap" into msm-3.0 2012-02-09 20:28:09 -08:00
Tarun Karra
375feb228e msm: kgsl: Disable ME, PFP split timeout and VFD interrupts.
The ME and PFP split timeout interrupts are fired when a wait for
idle does not get a response within the specified time limit, which
happens to be far too low for this revision of the hardware. The VFD
interrupt is harmless since we aways set the VFD range to the maximum
addressible size.  All these interrupts can be safely removed.

Change-Id: I32e714782a3c5a042b64360c1f6bcb7f8a9750db
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2012-02-08 23:15:25 -07:00
Tarun Karra
7e8e1cf403 msm: kgsl: Context switch fixes for A3XX
In A3xx GPU state during context switching is saved from shadow RAM.
Changed to use correct shadow ram base address by default.
Gmem quad restore height and width is fixed to right values.
Fixed A3XX_GRAS_SC_CONTROL to right value.

Change-Id: I8589545183d2c4f5081c290bf453a86693542c79
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2012-02-08 22:54:50 -07:00
Jordan Crouse
40861a40bb msm: kgsl: Use the right physical addresses in NOMMU mode
In NOMMU mode the gpuaddr was set to the physaddr
for the memdesc which worked great until the memory
wasn't allocated by KGSL, at which point it blew up.
We already went through the due dilligence to turn
all memdescs into sglists, so use the sglist to get the
physaddr (and thus the gpuaddr).  Check to make sure
that we're not trying to map a real sglist (more than one
entry) and if we are, then loudly fail.

Change-Id: Ic0dedbad5d401c505949c92d9a7795f3260dbabb
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-08 22:25:38 -07:00
Jordan Crouse
e3f80eaff7 msm: kgsl: Only use the setstate slowpath for A3XX
The setstate fastpath only works on A2XX, so completely
skip it for A3XX.

Change-Id: Ic0dedbad9c0dac16ea28b6f615f5d07fb5059980
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-08 22:25:37 -07:00
Jordan Crouse
817e0b9057 msm: kgsl: Set the default MMU to 'none' for APQ8064
A3XX targets (8064 and greater) have no GPU MMU, so default
to no MMU when the IOMMU isn't available or configured.

Change-Id: Ic0dedbad90e2762663349ad055d818416290a164
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-08 22:25:36 -07:00