17059 Commits

Author SHA1 Message Date
Ahmed Ammar
c610f58235 amd-gpu: update again. 2012-11-21 14:02:55 -06:00
Robert Love
e5594daf84 ashmem for 2.6.27.
Forward port of ashmem to 2.6.27.

Signed-off-by: Robert Love <rlove@google.com>

ashmem: Don't install fault handler for private mmaps.

Ashmem is used to create named private heaps. If this heap is backed
by a tmpfs file it will allocate two pages for every page touched.
In 2.6.27, the extra page would later be freed, but 2.6.29 does not
scan anonymous pages when running without swap so the memory is not
freed while the file is referenced. This change changes the behavior
of private ashmem mmaps to match /dev/zero instead tmpfs.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

ashmem: Add common prefix to name reported in /proc/pid/maps

Signed-off-by: Arve Hjønnevåg <arve@android.com>

ashmem: don't require a page aligned size

This makes ashmem more similar to shmem and mmap, by
not requiring the specified size to be page aligned,
instead rounding it internally as needed.

Signed-off-by: Marco Nelissen <marcone@android.com>

Conflicts:

	include/linux/mm.h
	mm/Makefile
	mm/shmem.c
2012-10-30 13:21:31 -05:00
Robert Love
ce9a676663 Add android_aid.h
Add <linux/android_aid.h>, our mapping of AID defines to gid numbers.

Signed-off-by: Robert Love <rlove@google.com>
2012-10-30 12:59:41 -05:00
Rebecca Schultz
c6ffd1da3c pmem: Add pmem driver
Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Use the thread group leader insted of the current thread.

Instead of keeping track of the current thread, use the thread group leader

Signed-off-by: Rebecca Schultz <rschultz@google.com>

pmem: Add some apis to reference and flush pmem files by file struct

The api to refer to pmem files by fd should be depricated, it can
cause problems if a processes fd table changes while the kernel is processing
data in a pmem file.  This change adds the safer api.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove unused depricated fd api to pmem.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Remove error message when calling get_pmem_addr

This call is used from the mdp driver to determine if the memory
is in pmem or in the fb.  We will encounter this case during normal operation
so this error message should be removed.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: Add include sched.h to fix compile errors

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

pmem: remove HW3D_* ioctls

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Expose is_pmem_file to the in-kernel users.

Signed-off-by: Dima Zavin <dima@android.com>

pmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.

Signed-off-by: Dima Zavin <dima@android.com>

misc: pmem: don't flush if file was opened with O_SYNC

Change-Id: I067218658a0d7f7ecc1fe73e9ff6b0c3b3054653
Signed-off-by: Dima Zavin <dima@android.com>

pmem: Add cache flush ioctl for pmem buffers

Change-Id: I9156bad829e8c65087f122b48cc57638902fab12
Signed-off-by: Dima Zavin <dima@android.com>

Allow multiple pmem master mmap()s.

Signed-off-by: Jamie Gennis <jgennis@google.com>
Change-Id: Icbe619c92e0ebb391f0a93f81937705452a67d87

pmem: convert data_list_sem to a mutex

Also rename a function that now conflicts with a new
define in asm/pgtable.h

Change-Id: I4798048cb8dece1bc03604e7d0b03d86e0c0ef7f
Signed-off-by: Dima Zavin <dima@android.com>

Conflicts:

	drivers/misc/Kconfig
	drivers/misc/Makefile
2012-10-30 12:59:21 -05:00
Mike Lockwood
1cc4a0ddd3 switch: switch class and GPIO drivers.
switch: Export symbol switch_set_state.

Signed-off-by: Mike Lockwood <lockwood@android.com>

switch: gpio: Don't call request_irq with interrupts disabled

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch: Use device_create instead of device_create_drvdata.

device_create_drvdata is obsolete.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch_gpio: Add missing #include <linux/interrupt.h>

Change-Id: I6c397e41bbe1457162cc69e31a29db5d9f76fccb
Signed-off-by: Mike Lockwood <lockwood@android.com>

Conflicts:

	drivers/Kconfig
2012-10-30 12:57:18 -05:00
Arve Hjønnevåg
13c3f913fd power_supply: Hold a wake_lock while power supply change notifications are pending
When connecting usb or the charger the device would often go back to sleep
before the charge led and screen turned on.

Change-Id: I01def6d86ddece0d4e31d2a91d176ed0975b6b9d
Signed-off-by: Arve Hjønnevåg <arve@android.com>

Conflicts:

	drivers/power/power_supply_core.c
2012-10-30 12:51:15 -05:00
Arve Hjønnevåg
dd06272c0a rtc: alarm: Add in-kernel alarm interface
Drivers can now create alarms that will use an hrtimer while the
system is running and the rtc to wake up from suspend.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2012-10-30 12:45:02 -05:00
Arve Hjønnevåg
1c4d45b87a rtc: Add android alarm driver. 2012-10-30 12:44:55 -05:00
Arve Hjønnevåg
1558bf868e PM: Add early suspend api. 2012-10-30 12:28:33 -05:00
Arve Hjønnevåg
784f3c2f49 PM: Add wake lock api. 2012-10-30 12:28:24 -05:00
Matt Sealey
1196165ab6 sauce: fix an annoying compiler warning regarding set but unused variable (one of many, but this is the most repetitive) 2012-05-29 07:20:11 -05:00
Matt Sealey
3345610229 put hex_to_bin back 2011-12-20 21:38:23 -06:00
Matt Sealey
4259e4284d BFS 376 2011-09-12 09:59:12 -05:00
Matt Sealey
469d88e87d BFS scheduler v376 - does a great deal for audio stuttering 2011-09-12 09:31:15 -05:00
Matt Sealey
1f11661da3 Move modedb file to drivers/video with the other modedbs 2011-07-12 11:24:56 -05:00
Matt Sealey
39e907d4bc siihdmi: move some audio muting around based on Silicon Image example code
siihdmi: don't reconfigure the SII9022 just because there was a mode change if the mode is identical
ipuv3fb: default to a real 640x480 mode and not a "dummy" xres/yres
modedb: move cea modes to an extern so it only gets included once in the kernel
also: whitespace police
2011-07-12 11:02:58 -05:00
Matt Sealey
1f0c20d638 siihdmi: backport 2.6.35 driver to .31 - hotplug is the biggest major feature 2011-07-04 14:26:27 -05:00
Anish Trivedi
3851242b86 ENGR00122019 SAHARA: Add padding around buffers to prevent cache incoherency
Added padding of 64 bytes (cache line size for Cortex-A8) around
buffers that are used by the hardware to prevent any cache
coherency problems that could arise if buffers share a cache line
with some other data that is used by the CPU.

Signed-off-by: Anish Trivedi <anish@freescale.com>
2011-07-03 16:04:48 -05:00
Anish Trivedi
6814b63c45 ENGR00141478-2 SAHARA: Move header file to include directory
The user mode libsahara library relied on header file
drivers/mxc/security/sahara2/include/sahara.h. However, to make
the lib build after headers_install step and to remove dependency on
kernel source, moved this header to include/linux/mxc_sahara.h.

These changes are specific to the include/linux folder.

Signed-off-by: Anish Trivedi <anish@freescale.com>
Acked-by: Lily Zhang
2011-07-03 16:04:13 -05:00
Matt Sealey
2e6cfa8350 IPU Triple Buffering support 2011-06-28 17:20:21 -05:00
Jason Chen
dbfb1fe4ac ENGR00141552 ipuv3: fix display pin's power leak
If you disable display, the display port's pin may keep high voltage which
may cause power leakage. Fix this issue by make all pin go into low level
after display disable.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 165df9e8d525082e70a165516e2bcd1d0529b148)
2011-06-28 15:17:45 -05:00
Matt Sealey
2811c4a4ef Remove preallocation of framebuffer and GPU memory in favor of being nice and dynamic. Note that GPU memory reserved is entirely down to the MMU now, and framebuffer memory is "size of framebuffer" rounded up to 1MB block.
Everything still works.

Includes a Wild mashup of Freescale ENGR00143019 which concludes GPU MMU support for the platform.
2011-06-28 15:08:08 -05:00
Matt Sealey
5b7fe2afda fb: add a new mode matching function fb_find_best_nearest_mode
The intent is that if you have a native panel resolution of 1920x1080@60 but this cannot
be displayed, you can find the nearest resolution with the HIGHEST refresh rate (fb_find_nearest_mode
only selects the CLOSEST refresh rate). It also, by virtue of some rather unintended
side effect, picks better matches (1680x1050->1440x900) than find_nearest (1680x1050->1280x1024)
when it comes to widescreen modes.
2011-06-13 19:51:55 -05:00
Matt Sealey
218e736adc power_supply: add health properties as per SBS 1.10a 2011-02-20 02:17:56 -06:00
Matt Sealey
e4cba1b35d sbs: move away from resources and weird irq structures and use the input subsystem to provide us with notification of battery status events 2011-02-20 01:37:03 -06:00
Matt Sealey
753ac9c27d cea861: add cea extension blocks 2011-02-19 09:32:12 -06:00
Matt Sealey
7e630788b5 siihdmi: add underscan/overscan behavior flags 2011-02-19 09:31:47 -06:00
Matt Sealey
c9681cbcf5 sb: common i2c, display platform files, cleanups 2011-02-17 17:32:06 -06:00
Matt Sealey
6b8b2e2caa leds-pwm: add a default brightness to the platform data 2011-02-17 11:00:20 -06:00
Jason Chen
96f9b6eb92 ENGR00138270-1 header file: change ipu_check_buffer_busy func name.
Change ipu_check_buffer_busy to ipu_check_buffer_ready.

Signed-off-by: Jason Chen <b02280@freescale.com>
(cherry picked from commit 6a0f0935318eac8733f79964854d2c18fe012099)
2011-02-12 02:51:36 -06:00
Matt Sealey
de462c995e siihdmi: rename tx->enable_audio => tx->basic_audio, add audio property if our monitor supports basic_audio. Not hotplug aware! 2011-02-11 20:48:21 -06:00
Matt Sealey
e5d7ec8f04 cea861: introduced clock doubled modes (not the same thing as traditional vesa doublescan but..) 2011-02-11 15:14:59 -06:00
Matt Sealey
c9db1540d1 siihdmi: add audio interface control register bit definitions 2011-02-11 14:56:45 -06:00
Matt Sealey
b1ebfeffe7 cea861: add Short Video Descriptor block to the definitions, so we can parse out SVDs
Also correct definition of vendor specific block data (maximum payload is 28 bytes beyond the registration identifier)
2011-02-11 14:55:26 -06:00
Matt Sealey
1dbee6176e Revert "video: add fb_edid_add_monspecs for parsing extended edid information"
This reverts commit 4779967299.
2011-02-11 09:21:58 -06:00
Matt Sealey
5f7d0e5283 Revert "fbdev: when parsing E-EDID blocks, also use SVD entries"
This reverts commit 08235ab815.

Conflicts:

	drivers/video/fbmon.c
	drivers/video/modedb.c
2011-02-11 09:21:16 -06:00
Matt Sealey
21118749bb cea861: every VIC mode in the spec 2011-02-11 09:17:22 -06:00
Matt Sealey
fc94e49598 siihdmi: add internal/hidden paging registers 2011-02-04 16:46:41 -06:00
Matt Sealey
f9c5dd2af7 siihdmi: add structure definitions for versioning the chip and features 2011-02-04 16:44:46 -06:00
Matt Sealey
0f26a779dd siihdmi: typo in register definition 2011-02-04 16:43:24 -06:00
Matt Sealey
299bb7af84 fb: implement CEA mode flag just as we mark VESA modes in the modedb 2011-02-04 16:33:19 -06:00
Peter Zijlstra
3bb80f52b6 sched: Cure more NO_HZ load average woes
There's a long-running regression that proved difficult to fix and
which is hitting certain people and is rather annoying in its effects.

Damien reported that after 74f5187ac8 (sched: Cure load average vs
NO_HZ woes) his load average is unnaturally high, he also noted that
even with that patch reverted the load avgerage numbers are not
correct.

The problem is that the previous patch only solved half the NO_HZ
problem, it addressed the part of going into NO_HZ mode, not of
comming out of NO_HZ mode. This patch implements that missing half.

When comming out of NO_HZ mode there are two important things to take
care of:

 - Folding the pending idle delta into the global active count.
 - Correctly aging the averages for the idle-duration.

So with this patch the NO_HZ interaction should be complete and
behaviour between CONFIG_NO_HZ=[yn] should be equivalent.

Furthermore, this patch slightly changes the load average computation
by adding a rounding term to the fixed point multiplication.

Reported-by: Damien Wyart <damien.wyart@free.fr>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Damien Wyart <damien.wyart@free.fr>
Tested-by: Orion Poplawski <orion@cora.nwra.com>
Tested-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@kernel.org
Cc: Chase Douglas <chase.douglas@canonical.com>
LKML-Reference: <1291129145.32004.874.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-02-03 09:04:15 -06:00
Lennart Poettering
29d449ffbc sched: Introduce SCHED_RESET_ON_FORK scheduling policy flag
This patch introduces a new flag SCHED_RESET_ON_FORK which can be passed
to the kernel via sched_setscheduler(), ORed in the policy parameter. If
set this will make sure that when the process forks a) the scheduling
priority is reset to DEFAULT_PRIO if it was higher and b) the scheduling
policy is reset to SCHED_NORMAL if it was either SCHED_FIFO or SCHED_RR.

Why have this?

Currently, if a process is real-time scheduled this will 'leak' to all
its child processes. For security reasons it is often (always?) a good
idea to make sure that if a process acquires RT scheduling this is
confined to this process and only this process. More specifically this
makes the per-process resource limit RLIMIT_RTTIME useful for security
purposes, because it makes it impossible to use a fork bomb to
circumvent the per-process RLIMIT_RTTIME accounting.

This feature is also useful for tools like 'renice' which can then
change the nice level of a process without having this spill to all its
child processes.

Why expose this via sched_setscheduler() and not other syscalls such as
prctl() or sched_setparam()?

prctl() does not take a pid parameter. Due to that it would be
impossible to modify this flag for other processes than the current one.

The struct passed to sched_setparam() can unfortunately not be extended
without breaking compatibility, since sched_setparam() lacks a size
parameter.

How to use this from userspace? In your RT program simply replace this:

  sched_setscheduler(pid, SCHED_FIFO, &param);

by this:

  sched_setscheduler(pid, SCHED_FIFO|SCHED_RESET_ON_FORK, &param);

Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090615152714.GA29092@tango.0pointer.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit ca94c442535a44d508c99a77e54f21a59f4fc462)
2011-02-03 08:25:26 -06:00
Matt Sealey
93b58cfb3d backlight: add power management hook to pwm backlight platform data 2011-02-01 19:51:33 -06:00
Guennadi Liakhovetski
08235ab815 fbdev: when parsing E-EDID blocks, also use SVD entries
Add parsing of E-EDID SVD entries. In this first version only a few
CEA/EIA-861E modes are implemented, more can be added as needed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-30 20:37:06 -06:00
Erik Gilling
4779967299 video: add fb_edid_add_monspecs for parsing extended edid information
Modern monitors/tvs have more extended EDID information blocks which can
contain extra detailed modes.  This adds a fb_edid_add_monspecs function
which drivers can use to parse those additions blocks.

Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-30 20:36:28 -06:00
Saleem Abdulrasool
82d7751991 siihdmi: the deferred timeout is not a settle period 2011-01-30 11:57:00 -08:00
Saleem Abdulrasool
f1b420c6e5 siihdmi: checksum edid blocks 2011-01-30 00:29:25 -08:00
Saleem Abdulrasool
38a89ac217 cea861: vsdb is entirely opaque 2011-01-30 00:29:24 -08:00
Saleem Abdulrasool
ec9fa83266 siihdmi: rework edid exporting to userspace 2011-01-30 00:29:23 -08:00