Commit Graph

5163 Commits

Author SHA1 Message Date
Bryan Huntsman
d074fa2796 Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits)
  misc: remove kernel debugger core
  ARM: common: fiq_debugger: dump sysrq directly to console if enabled
  ARM: common: fiq_debugger: add irq context debug functions
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly
  net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
  cpufreq: interactive governor: default 20ms timer
  cpufreq: interactive governor: go to intermediate hi speed before max
  cpufreq: interactive governor: scale to max only if at min speed
  cpufreq: interactive governor: apply intermediate load on current speed
  ARM: idle: update idle ticks before call idle end notifier
  input: gpio_input: don't print debounce message unless flag is set
  net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Improve suspend/resume processing
  net: wireless: bcmdhd: Check if FW is Ok for internal FW call
  tcp: Don't nuke connections for the wrong protocol
  ARM: common: fiq_debugger: make uart irq be no_suspend
  net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
  mm: avoid livelock on !__GFP_FS allocations
  ...

Conflicts:
	arch/arm/mm/cache-l2x0.c
	arch/arm/vfp/vfpmodule.c
	drivers/mmc/core/host.c
	kernel/power/wakelock.c
	net/bluetooth/hci_event.c

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-16 13:52:50 -08:00
Laura Abbott
e1b9ce5c22 gpu: ion: Return negative value from ioctl on allocation failure
If the ion allocation fails, return a negative value to the
ioctl. This is easier for userspace to deal with than
checking if the handle is valid.

Change-Id: I1c785b1b1e71d2bd45c6f7be78ea15e4a08cd6e5
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-11-16 07:22:40 -08:00
Laura Abbott
9fa29e8889 gpu: ion: Prevent deadlock with cache flushing
Cache flushing takes the mmap semaphore to validate the
address range. This can cause a deadlock in the following
scenario with two threads in the same client:

Thread 1			Thread 2
(cache operation)		(mmap)
-----------------------------------------
lock(client_lock)
				down_write(mmap_semaphore)
down_read(mmap_semaphore)
				lock(client_lock)

Fix this by doing the check for the address range before
taking the client lock. This is independent of Ion so there
is no need to have this lock locked.

Change-Id: Ibe372cf232fbad7e031ab2d38cf3a34823f43bf9
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-11-16 07:22:40 -08:00
Jordan Crouse
95b3327fb9 msm: kgsl: Set default value of wait_timeout in the adreno_dev struct
Set the initalization value of wait_timeout at compile time in the
declaration of the adreno_device struct instead of at runtime in
adreno_probe.

Change-Id: Ic0dedbad4161f3a0df8609999f03f8811ec08fde
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-11-15 09:26:47 -08:00
Stepan Moskovchenko
6ee3be86b4 msm: iommu: Support the IOMMU_CACHE attribute
Instead of specifying a shareability attribute and a cache
policy, add support for the IOMMU_CACHE attribute to allow
cacheable mappings using the default memory cache policy.

Change-Id: I78442770e4e64fd72d9314d343223757593d3529
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2011-11-14 18:06:01 -08:00
Alex Deucher
7a427e4333 drm/radeon/kms: set HPD polarity in hpd_init()
commit 64912e997f0fe13512e4c7b90e4f7c11cb922ab5 upstream.

Polarity needs to be set accordingly to connector status (connected
or disconnected). Set it up in hpd_init() so first hotplug works
reliably no matter what is the initial set of connector. hpd_init()
also covers resume so HPD will work correctly after resume as well.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Jerome Glisse <j.glisse@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:36:56 -08:00
Alex Deucher
053b6d52c7 drm/radeon/kms: add MSI module parameter
commit a18cee15ed4c8b6a35f96b7b26a46bac32e04bd9 upstream.

Allow the user to override whether MSIs are enabled
or not on supported ASICs.  MSIs are disabled by default
on IGP chips as they tend not to work.  However certain
IGP chips only seem to work with MSIs enabled.

I suspect this is a chipset or bios issue, but I'm not sure
what the proper fix is.  This will at least make diagnosing
and working around the problem much easier.

See:
https://bugs.freedesktop.org/show_bug.cgi?id=37679

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-11-11 09:36:56 -08:00
Alex Deucher
957450510b drm/radeon/kms: Add MSI quirk for Dell RS690
commit 01e718ec194e30b3e8eb3858c742c13649757efc upstream.

Some Dell laptops only seem to work with MSIs.  This
looks like a platform/bios bug.

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

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-11-11 09:36:55 -08:00
Alex Deucher
35f6259abb drm/radeon/kms: properly set panel mode for eDP
commit 00dfb8df5bf8c3afe4c0bb8361133156b06b7a2c upstream.

This should make eDP more reliable.

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-11-11 09:36:54 -08:00
Jerome Glisse
ff356c2247 drm/radeon: set hpd polarity at init time so hotplug detect works
commit 8ab250d4484b72ccc78e34276c5ffa84c1d41303 upstream.

Polarity needs to be set accordingly to connector status (connected
or disconnected). Set it up at module init so first hotplug works
reliably no matter what is the initial set of connector.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:36:53 -08:00
Alex Deucher
be72d16568 drm/radeon/kms: Add MSI quirk for HP RS690
commit b362105f7f5223fa4d2e03ceeea0e51da754ccc6 upstream.

Some HP laptops only seem to work with MSIs.  This
looks like a platform/bios bug.

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

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-11-11 09:36:52 -08:00
Alex Deucher
fd33e34e10 drm/radeon/kms: split MSI check into a separate function
commit 8f6c25c59b0c895c68cae59d1b34e9a7b36971bc upstream.

This makes it easier to add quirks for certain systems.

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-11-11 09:36:52 -08:00
Jerome Glisse
3fa1ae816c drm/radeon: avoid bouncing connector status btw disconnected & unknown
commit 340764465aa4a586ca332e61ae64883e5ad6f183 upstream.

Since force handling rework of d0d0a225e6ad43314c9aa7ea081f76adc5098ad4
we could end up bouncing connector status btw disconnected and unknown.
When connector status change a call to output_poll_changed happen which
in turn ask again for detect but with force set.

So set the load detect flags whenever we report the connector as
connected or unknown this avoid bouncing btw disconnected and unknown.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:36:52 -08:00
Jean Delvare
c86935898f drm/radeon/kms: Fix I2C mask definitions
commit 286e0c94f9c3f292cb38a977fbbde3433347a868 upstream.

Commit 9b9fe724 accidentally used RADEON_GPIO_EN_* where
RADEON_GPIO_MASK_* was intended. This caused improper initialization
of I2C buses, mostly visible when setting i2c_algo_bit.bit_test=1.
Using the right constants fixes the problem.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Jerome Glisse <j.glisse@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:35:22 -08:00
Alex Deucher
12bc1875cc drm/radeon/kms: handle !force case in connector detect more gracefully
commit d0d0a225e6ad43314c9aa7ea081f76adc5098ad4 upstream.

When force == false, we don't do load detection in the connector
detect functions.  Unforunately, we also return the previous
connector state so we never get disconnect events for DVI-I, DVI-A,
or VGA.  Save whether we detected the monitor via load detection
previously and use that to determine whether we return the previous
state or not.

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

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-11-11 09:35:21 -08:00
Alex Deucher
c271809eb4 drm/radeon/kms: bail early in dvi_detect for digital only connectors
commit 5f0a26128d66ef81613fe923d5c288942844ccdc upstream.

DVI-D and HDMI-A are digital only, so there's no need to
attempt analog load detect.  Also, skip bail before the
!force check, or we fail to get a disconnect events.
The next patches in the series attempt to fix disconnect
events for connectors with analog support (DVI-I, HDMI-B,
DVI-A).

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

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-11-11 09:35:20 -08:00
Takashi Iwai
97e4a783f6 drm/i915/panel: Always record the backlight level again (but cleverly)
commit f52c619a590fa75276c07dfcaf380dee53e4ea4c upstream.

The commit 47356eb672 introduced a
mechanism to record the backlight level only at disabling time, but it
also introduced a regression.  Since intel_lvds_enable() may be called
without disabling (e.g. intel_lvds_commit() calls it unconditionally),
the backlight gets back to the last recorded value.  For example, this
happens when you dim the backlight, close the lid and open the lid,
then the backlight suddenly goes to the brightest.

This patch fixes the bug by recording the backlight level always
when changed via intel_panel_set_backlight().  And,
intel_panel_{enable|disable}_backlight() call the internal function not
to update the recorded level wrongly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:35:19 -08:00
Keith Packard
b620fec43e drm/i915: Wrap DP EDID fetch functions to enable eDP panel power
commit 8c241fef3e6f69f3f675678ae03599ece3f562e2 upstream.

Talking to the eDP DDC channel requires that the panel be powered
up. Wrap both the EDID and modes fetch code with calls to turn the vdd
power on and back off.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:35:19 -08:00
Lucille Sylvester
dc8f757cac msm: kgsl: No need to expose internal functions.
Change-Id: I8cb98c96ad000d511915ac5c7ac5a57fe59f7556
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-11-10 21:06:00 -07:00
Lucille Sylvester
596d4c2954 msm: kgsl: Count a percentage of _io time
Count different percentages based upon GPU frequency.

Change-Id: Ia579f6705ff9858263f507bd4f3ba0f84b772554
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-11-09 14:13:15 -07:00
Suman Tatiraju
2456902682 msm: kgsl: suspend device when the display does off
This change saves leakage current when the display is
off. In scenerios where a user is listening to an mp3
this feature stops the GPU as soon as the display goes
off. The GPU is started again when the display comes
back. The feature also avoids the GPU resuming when a
email sync happens while the device is suspended.

The change also disables NAP when the display is off.
It wakes 3d core to process user space requests when in
slumber

Change-Id: I65d17e937079a27b14d08be0a975d7ecf80b18ab
CRs-fixed: 316579
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
2011-11-08 21:05:09 -07:00
Jeremy Gebben
3266036d2f msm: kgsl: remove *MMU type options from Kconfig
Remove the ability to switch between gpummu and iommu via
kernel config. The new decision path is: if kgsl.mmutype is set,
use that. Otherwise if iommu_found() use iommu, and last
but not least use the gpummu.

Change-Id: I6d34baf72da53e566bfa7081c6741f7fd0180aea
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-11-04 14:16:10 -06:00
Jeremy Gebben
ddf6b579bf msm: kgsl: handle larger instruction store for adreno225
This GPU has a larger instruction store, so more memory
needs to be reserved for saving shader state when context
switching.

The initial vertex and pixel partitioning of the
instruction store also needs to be different.

Change-Id: If60c06467dd30d5bae07302a74eaf2687900b2b8
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-11-04 13:25:53 -06:00
Linux Build Service Account
c4658f2250 Merge changes Ic0dedbad,Ic0dedbad into msm-3.0
* changes:
  msm: kgsl: Add ION as an external memory source
  msm: kgsl: Fixup per-process memory statistics
2011-11-04 01:11:07 -07:00
Olav Haugan
1a304b5ad6 gpu: ion: Make ion heap error handling consistent
If an error occurs during heap creation the behavior is different
depending on the error condition. If memory cannot be allocated
for the heap the rest of the heaps will be created. However, if
the ion heap cannot be created heap creation stops and all the heaps
are destroyed. Make the error handling consistent for both error
conditions by logging an error message and continuing creation
of the rest of the heaps.

General cleanup: Change global variables to be local to this
translation unit.

Change-Id: Ia8d2fb2f3257b91d6423b6722e12e9b3d7792e86
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2011-11-03 10:35:28 -07:00
Jordan Crouse
8eab35ab5a msm: kgsl: Add ION as an external memory source
Allow ION buffers to be attached via IOCTL_KGSL_MAP_USER_MEM

Change-Id: Ic0dedbada34d12fb70b528f3a93dd21805a4c8a4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-11-02 18:29:03 -07:00
Jordan Crouse
1b897cfe92 msm: kgsl: Fixup per-process memory statistics
Make the framework for reporting per-process memory statistics a little bit
more generic.  This should make it easier to keep track of more external
memory sources as they are added.

Change-Id: Ic0dedbad57ae595044dd4f4a80ba4cead2bf9441
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-11-02 17:55:25 -07:00
Linux Build Service Account
bde23f277d Merge "gpu: ion: Add map/unmap DMA ops for carveout heap" into msm-3.0 2011-11-02 15:09:22 -07:00
Linux Build Service Account
c97d7c1af5 Merge "msm: kgsl: Fix z180 error code on issueibcmds" into msm-3.0 2011-11-02 15:09:22 -07:00
Jordan Crouse
0a1195ece6 gpu: ion: Add map/unmap DMA ops for carveout heap
Change-Id: Ic0dedbad2a092c6b9dc9778d26f6315054520a63
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-11-02 00:50:08 -06:00
Linux Build Service Account
a38d2cbf66 Merge changes I64eedd6a,Iccf27eca,I60a10851,Ia0471ba3 into msm-3.0
* changes:
  gpu: ion: Add scan for leaked userspace fds
  gpu: ion: Print debug information in hex
  gpu: ion: Add debug information for individual heaps
  gpu: ion: Add message about fragmentation
2011-11-01 13:23:43 -07:00
Laura Abbott
404f824466 gpu: ion: Add scan for leaked userspace fds
The ION_IOC_MAP/ION_IOC_SHARE ioctls take a reference to
an ion buffer. If the fd generated by the ioctl is never
closed, the buffer will never be freed. This is a pain to
track down in userspace. Add a debugfs entry to do a scan
of all the buffers and check which ones have no handle
associated with them. If a buffer has no handle associated
with it, that means the last reference is an fd. There
isn't a good way to directly associate an fd with a buffer,
but this can at least be a starting point for tracking down
leaks.

Change-Id: I64eedd6a30d8298b2aa75532c7fad506542910f6
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:37:18 -07:00
Laura Abbott
8747bbe3e9 gpu: ion: Print debug information in hex
For consistency sake, print out debug information in hex.

Change-Id: Iccf27eca1b994bff547c812387ed756a07e9cd7b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:37:17 -07:00
Laura Abbott
3647ac3c7e gpu: ion: Add debug information for individual heaps
Currently, the debugfs information provides aggregated data
for all carveout heaps. This isn't particularly helpful for
determining allocation problems with individual carveout heaps.
Fix this to give data for individual carveout heaps.

Change-Id: I60a10851052412e20c40f1862d6dcc22093fd982
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:37:17 -07:00
Laura Abbott
d16dd60d32 gpu: ion: Add message about fragmentation
If memory is fragmented, an allocation may fail even if
there is sufficient memory. Detect this state if it occurs
and note it in the logs.

Change-Id: Ia0471ba3f231c8538449f3f842f157a1128ebd38
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-31 22:36:59 -07:00
Lucille Sylvester
491f85cbdb Revert "msm: kgsl: Make sure we are idle before calling pwrscale_idle"
This reverts commit 2cbd1ffea5

Change-Id: I3c4452ad03aacb121cadc6b1b329220dfd24370c
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-31 13:36:35 -06:00
Stepan Moskovchenko
8eea9cf9b0 msm: kgsl: Update usage of cpu_is_msm8960 for 8930
Update drivers' usage of cpu_is_msm8960() to also include a
check for cpu_is_msm8930(), to support the pre-silicon
effort.

Change-Id: I7f2e4b4793e7ca1391696aa066bd7bf06b81b352
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2011-10-30 00:27:28 -07:00
Laura Abbott
084d6eb418 gpu: ion: Add information about failed fd imports
If an fd import fails because the fd is not an Ion fd,
print out the name of the file. This way, it can be possible
to deduce where the fd came from.

Change-Id: I8464517ac011d62ebbd7e472f3e5734b0faacb0d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-28 21:40:38 -06:00
Jordan Crouse
a75022c4e8 gpu: ion: Check for NULL pointer in client destroy
Silently check for a null pointer in ion_client_destroy

Change-Id: Ic0dedbada03496faf2eb024c40f9cfaf8d08c98f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-28 15:27:20 -06:00
Laura Abbott
273dd8e94a gpu: ion: Add API to get the buffer flags
Clients may want to know what the existing flags are on a
handle for mapping, cache flushing or other purposes. Add
an API to get those flags.

Change-Id: I2d8c93194d1fc940042529b8851ebecf35d6e3de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-28 13:18:34 -07:00
Laura Abbott
d2a8737891 gpu: ion: Add warning during client freeing
Add warning when freeing client with buffers that are currently
mappped.

Change-Id: Ib8e17786daa7c890245c3d3e37143137cae7d078
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-28 07:54:42 -07:00
Linux Build Service Account
702938ffea Merge "msm: kgsl: Don't check for idle while suspended" into msm-3.0 2011-10-27 18:42:13 -07:00
Linux Build Service Account
1be19888ca Merge "gpu: ion: Add better debugfs information" into msm-3.0 2011-10-27 18:42:13 -07:00
Linux Build Service Account
3b88529aeb Merge "msm: kgsl: Use scatter gather list to map memory to IOMMU" into msm-3.0 2011-10-27 16:43:21 -07:00
Linux Build Service Account
c08d4d1734 Merge "msm: kgsl: Always go to max clock rate on a pwrscale policy change" into msm-3.0 2011-10-27 16:43:21 -07:00
Colin Cross
2bb3e31015 Merge commit 'v3.0.8' into android-3.0 2011-10-27 15:01:19 -07:00
Linux Build Service Account
6d3afe3d1e Merge "msm: kgsl: Cleanup function returns" into msm-3.0 2011-10-27 14:35:52 -07:00
Carter Cooper
b90880d152 msm: kgsl: Fix z180 error code on issueibcmds
Change-Id: I7e7149fd165fd12856bf3b3529f8f78aedd9d810
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2011-10-27 13:56:35 -06:00
Laura Abbott
68c8064daf gpu: ion: Add better debugfs information
In debugfs, clients now show individual allocations.
Carveout heaps now give the number of bytes currently
allocated out of total possible bytes. The system heaps
just show the number of bytes currently allocated.

Change-Id: I4acfcdc1089c73c28041e09cb6b5a03b956e936a
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-10-27 11:13:28 -07:00
Lucille Sylvester
c4af355a2b msm: kgsl: Don't check for idle while suspended
Change-Id: I1914b68288af94fff3f7111937864b3f1510cada
CRs-fixed: 315037
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-27 11:44:24 -06:00