Jiri Olsa [Wed, 24 Apr 2013 09:37:29 +0000 (11:37 +0200)]
perf tools: Fix tab vs spaces issue in Makefile ifdef/endif
Unmatched spaces/tabs Makefile indentation could make the
Makefile fails. While the tabed line could be considered
sometimes as follow up for rule command, the mixed space
tab meses up with makefile if conditions.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1366796273-4780-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Fri, 26 Apr 2013 17:28:46 +0000 (14:28 -0300)]
perf hists browser: Use sort__has_sym
The TUI hist browser had a similar variable has_symbols for the same
purpose. Let's get rid of the duplication.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1365125198-8334-9-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Fri, 5 Apr 2013 01:26:37 +0000 (10:26 +0900)]
perf top: Use sort__has_sym
perf top had a similar variable sort_has_symbols for the same purpose.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1365125198-8334-8-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Fri, 5 Apr 2013 01:26:36 +0000 (10:26 +0900)]
perf sort: Cleanup sort__has_sym setting
The sort__has_sym variable is set only if a symbol-related sort key was
added. Since branch stack and memory sort dimensions are separated, it
doesn't need to be checked from common dimension.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1365125198-8334-7-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Fri, 5 Apr 2013 01:26:31 +0000 (10:26 +0900)]
perf sort: Reorder HISTC_SRCLINE index
It's in common sort dimension so it'd be more natural to place it with
other common column index.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1365125198-8334-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Arnaldo Carvalho de Melo [Thu, 4 Apr 2013 15:41:22 +0000 (12:41 -0300)]
perf archive: Fix typo on Documentation
It is analysis, not analisys.
Reported-by: William Cohen <wcohen@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-s7476m0irq0naxkzd9iekbr3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Wed, 3 Apr 2013 12:26:19 +0000 (21:26 +0900)]
perf sort: Consolidate sort_entry__setup_elide()
The same code was duplicate to places, factor them out to common
sort__setup_elide().
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364991979-3008-11-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Wed, 3 Apr 2013 12:26:11 +0000 (21:26 +0900)]
perf sort: Separate out memory-specific sort keys
Since they're used only for perf mem, separate out them to a different
dimension so that normal user cannot access them by any chance.
For global/local weights, I'm not entirely sure to place them into the
memory dimension. But it's the only user at this time.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364991979-3008-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Wed, 3 Apr 2013 12:26:10 +0000 (21:26 +0900)]
perf sort: Factor out common code in sort_dimension__add()
Let's remove duplicate code.
Suggested-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364991979-3008-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Mon, 1 Apr 2013 11:35:20 +0000 (20:35 +0900)]
perf sort: Introduce sort__mode variable
It's used for determining current sort mode which can be one of
NORMAL, BRANCH and new MEMORY.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364816125-12212-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Mon, 1 Apr 2013 11:35:19 +0000 (20:35 +0900)]
perf report: Fix alignment of symbol column when -v is given
When -v option is given, the symbol sort key prints its address also but
it wasn't properly aligned since hists__calc_col_len() misses the
additional part. Also it missed 2 spaces for 0x prefix when printing.
$ perf report --stdio -v -s sym
# Samples: 133 of event 'cycles'
# Event count (approx.):
50536717
#
# Overhead Symbol
# ........ ..............................
#
12.20% 0xffffffff81384c50 v [k] intel_idle
7.62% 0xffffffff8170976a v [k] ftrace_caller
7.02% 0x2d986d B [.] 0x00000000002d986d
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364816125-12212-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Mon, 1 Apr 2013 11:35:18 +0000 (20:35 +0900)]
perf hists: Free unused mem info of a matched hist entry
The mem info is shared between matched entries so one should be freed.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364816125-12212-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Namhyung Kim [Mon, 1 Apr 2013 11:35:17 +0000 (20:35 +0900)]
perf hists: Fix an invalid memory free on he->branch_info
The branch info was allocated for the whole stack and passed matching
hist entry for each level during processing samples. Thus when a hist
entry tries to free its branch info like in hists__collapse_insert_entry
it'll face following error.
*** glibc detected *** perf: munmap_chunk(): invalid pointer: 0x00000000014e9d20 ***
======= Backtrace: =========
/lib64/libc.so.6[0x387d47ae16]
perf[0x4923bd]
perf(cmd_report+0xd68)[0x432a08]
perf[0x41a663]
perf(main+0x58f)[0x419eaf]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x387d421735]
perf[0x419f95]
Fix it by allocating and copying branch info for each new hist entry.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1364816125-12212-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Sukadev Bhattiprolu [Fri, 29 Mar 2013 19:14:43 +0000 (12:14 -0700)]
perf tools: Fix bug in isupper() and islower()
One of the reasons 'perf test' is failing on Power appears to be due to
a bug in isupper().
isupper(c) and islower(c) should be checking 'c' against the mask 0x20.
Instead they are checking sane_ctype[c] which causes isupper() to be
true for lower case letters.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20130329192950.GA9312@us.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Inki Dae [Wed, 17 Jul 2013 11:41:15 +0000 (20:41 +0900)]
drm/exynos: add cache operation backend callbacks
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 17 Jul 2013 06:29:38 +0000 (15:29 +0900)]
drm/exynos: export a gem into dmabuf fd with O_RDWR
user process needs read/write permissions when the user process tires
buffer lock with a exported dmabuf fd through fcntl system call.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 12 Jul 2013 05:01:02 +0000 (14:01 +0900)]
dma-buf: add lock callback for fcntl system call.
This patch adds lock callback to dma buf file operations,
and this callback will be called by fcntl system call.
With this patch, fcntl system call can be used for buffer
synchronization between CPU and CPU, and CPU and DMA in user mode.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Inki Dae [Wed, 17 Jul 2013 05:43:43 +0000 (14:43 +0900)]
dmabuf-sync: add cache operation feature
With this patch, all cache operations will be done in kernel side
instead of user side.
P.S. basically, not only user shouldn't need to request cache operation
to kernel but also kernel should't need such things. However, we would
have performance overhead by unnecessary cache operations if we conform
with mainline style: cache sync just before memory ownership moves from
CPU to DMA, and just after memory ownership moves from DMA to CPU.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 17 Jul 2013 05:40:48 +0000 (14:40 +0900)]
dmabuf-sync: add buffer synchronization framework
This patch adds a buffer synchronization framework based on DMA BUF[1]
and and based on ww-mutexes[2] for lock mechanism.
The purpose of this framework is to provide not only buffer access control
to CPU and DMA but also easy-to-use interfaces for device drivers and
user application. This framework can be used for all dma devices using
system memory as dma buffer, especially for most ARM based SoCs.
Changelog v5:
- Rmove a dependence on reservation_object: the reservation_object is used
to hook up to ttm and dma-buf for easy sharing of reservations across
devices. However, the dmabuf sync can be used for all dma devices; v4l2
and drm based drivers, so doesn't need the reservation_object anymore.
With regared to this, it adds 'void *sync' to dma_buf structure.
- All patches are rebased on mainline, Linux v3.10.
Changelog v4:
- Add user side interface for buffer synchronization mechanism and update
descriptions related to the user side interface.
Changelog v3:
- remove cache operation relevant codes and update document file.
Changelog v2:
- use atomic_add_unless to avoid potential bug.
- add a macro for checking valid access type.
- code clean.
The mechanism of this framework has the following steps,
1. Register dmabufs to a sync object - A task gets a new sync object and
can add one or more dmabufs that the task wants to access.
This registering should be performed when a device context or an event
context such as a page flip event is created or before CPU accesses a shared
buffer.
dma_buf_sync_get(a sync object, a dmabuf);
2. Lock a sync object - A task tries to lock all dmabufs added in its own
sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead
lock issue and for race condition between CPU and CPU, CPU and DMA, and DMA
and DMA. Taking a lock means that others cannot access all locked dmabufs
until the task that locked the corresponding dmabufs, unlocks all the locked
dmabufs.
This locking should be performed before DMA or CPU accesses these dmabufs.
dma_buf_sync_lock(a sync object);
3. Unlock a sync object - The task unlocks all dmabufs added in its own sync
object. The unlock means that the DMA or CPU accesses to the dmabufs have
been completed so that others may access them.
This unlocking should be performed after DMA or CPU has completed accesses
to the dmabufs.
dma_buf_sync_unlock(a sync object);
4. Unregister one or all dmabufs from a sync object - A task unregisters
the given dmabufs from the sync object. This means that the task dosen't
want to lock the dmabufs.
The unregistering should be performed after DMA or CPU has completed
accesses to the dmabufs or when dma_buf_sync_lock() is failed.
dma_buf_sync_put(a sync object, a dmabuf);
dma_buf_sync_put_all(a sync object);
The described steps may be summarized as:
get -> lock -> CPU or DMA access to a buffer/s -> unlock -> put
This framework includes the following two features.
1. read (shared) and write (exclusive) locks - A task is required to declare
the access type when the task tries to register a dmabuf;
READ, WRITE, READ DMA, or WRITE DMA.
The below is example codes,
struct dmabuf_sync *sync;
sync = dmabuf_sync_init(NULL, "test sync");
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_R);
...
And the below can be used as access types:
DMA_BUF_ACCESS_R - CPU will access a buffer for read.
DMA_BUF_ACCESS_W - CPU will access a buffer for read or write.
DMA_BUF_ACCESS_DMA_R - DMA will access a buffer for read
DMA_BUF_ACCESS_DMA_W - DMA will access a buffer for read or
write.
2. Mandatory resource releasing - a task cannot hold a lock indefinitely.
A task may never try to unlock a buffer after taking a lock to the buffer.
In this case, a timer handler to the corresponding sync object is called
in five (default) seconds and then the timed-out buffer is unlocked by work
queue handler to avoid lockups and to enforce resources of the buffer.
The below is how to use interfaces for device driver:
1. Allocate and Initialize a sync object:
struct dmabuf_sync *sync;
sync = dmabuf_sync_init(NULL, "test sync");
...
2. Add a dmabuf to the sync object when setting up dma buffer relevant
registers:
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...
3. Lock all dmabufs of the sync object before DMA or CPU accesses
the dmabufs:
dmabuf_sync_lock(sync);
...
4. Now CPU or DMA can access all dmabufs locked in step 3.
5. Unlock all dmabufs added in a sync object after DMA or CPU access
to these dmabufs is completed:
dmabuf_sync_unlock(sync);
And call the following functions to release all resources,
dmabuf_sync_put_all(sync);
dmabuf_sync_fini(sync);
You can refer to actual example codes:
"drm/exynos: add dmabuf sync support for g2d driver" and
"drm/exynos: add dmabuf sync support for kms framework" from
https://git.kernel.org/cgit/linux/kernel/git/daeinki/
drm-exynos.git/log/?h=dmabuf-sync
And this framework includes fcntl system call[3] as interfaces exported
to user. As you know, user sees a buffer object as a dma-buf file descriptor.
So fcntl() call with the file descriptor means to lock some buffer region being
managed by the dma-buf object.
The below is how to use interfaces for user application:
struct flock filelock;
1. Lock a dma buf:
filelock.l_type = F_WRLCK or F_RDLCK;
/* lock entire region to the dma buf. */
filelock.lwhence = SEEK_CUR;
filelock.l_start = 0;
filelock.l_len = 0;
fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock);
...
CPU access to the dma buf
2. Unlock a dma buf:
filelock.l_type = F_UNLCK;
fcntl(dmabuf fd, F_SETLKW or F_SETLK, &filelock);
close(dmabuf fd) call would also unlock the dma buf. And for more
detail, please refer to [3]
References:
[1] http://lwn.net/Articles/470339/
[2] https://patchwork.kernel.org/patch/2625361/
[3] http://linux.die.net/man/2/fcntl
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Daniel Vetter [Thu, 20 Jun 2013 11:31:17 +0000 (13:31 +0200)]
mutex: Add w/w mutex slowpath debugging
Injects EDEADLK conditions at pseudo-random interval, with
exponential backoff up to UINT_MAX (to ensure that every lock
operation still completes in a reasonable time).
This way we can test the wound slowpath even for ww mutex users
where contention is never expected, and the ww deadlock
avoidance algorithm is only needed for correctness against
malicious userspace. An example would be protecting kernel
modesetting properties, which thanks to single-threaded X isn't
really expected to contend, ever.
I've looked into using the CONFIG_FAULT_INJECTION
infrastructure, but decided against it for two reasons:
- EDEADLK handling is mandatory for ww mutex users and should
never affect the outcome of a syscall. This is in contrast to -ENOMEM
injection. So fine configurability isn't required.
- The fault injection framework only allows to set a simple
probability for failure. Now the probability that a ww mutex acquire
stage with N locks will never complete (due to too many injected
EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
operations for the completely uncontended case would be O(exp(N)).
The per-acuiqire ctx exponential backoff solution choosen here only
results in O(log N) overhead due to injection and so O(log N * N)
lock operations. This way we can fail with high probability (and so
have good test coverage even for fancy backoff and lock acquisition
paths) without running into patalogical cases.
Note that EDEADLK will only ever be injected when we managed to
acquire the lock. This prevents any behaviour changes for users
which rely on the EALREADY semantics.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Maarten Lankhorst [Mon, 24 Jun 2013 08:30:04 +0000 (10:30 +0200)]
mutex: Add support for wound/wait style locks
Wound/wait mutexes are used when other multiple lock
acquisitions of a similar type can be done in an arbitrary
order. The deadlock handling used here is called wait/wound in
the RDBMS literature: The older tasks waits until it can acquire
the contended lock. The younger tasks needs to back off and drop
all the locks it is currently holding, i.e. the younger task is
wounded.
For full documentation please read Documentation/ww-mutex-design.txt.
References: https://lwn.net/Articles/548909/
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/51C8038C.9000106@canonical.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Maarten Lankhorst [Thu, 20 Jun 2013 11:31:05 +0000 (13:31 +0200)]
arch: Make __mutex_fastpath_lock_retval return whether fastpath succeeded or not
This will allow me to call functions that have multiple
arguments if fastpath fails. This is required to support ticket
mutexes, because they need to be able to pass an extra argument
to the fail function.
Originally I duplicated the functions, by adding
__mutex_fastpath_lock_retval_arg. This ended up being just a
duplication of the existing function, so a way to test if
fastpath was called ended up being better.
This also cleaned up the reservation mutex patch some by being
able to call an atomic_set instead of atomic_xchg, and making it
easier to detect if the wrong unlock function was previously
used.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: robclark@gmail.com
Cc: rostedt@goodmis.org
Cc: daniel@ffwll.ch
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20130620113105.4001.83929.stgit@patser
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Jonghwa Lee [Tue, 16 Jul 2013 08:58:14 +0000 (17:58 +0900)]
ARM: DTS: update device tree for for charger_manager.
Set supply regulator for charger manager.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Tue, 16 Jul 2013 08:56:59 +0000 (17:56 +0900)]
ARM: config: Update tizen_defconfig.
Enable CONFIG_CHARGER_MANAGER, CONFIG_EXTCON
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Tue, 16 Jul 2013 08:22:29 +0000 (17:22 +0900)]
power: charger-manager: Fix a bug when it unregisters notifier block of extcon.
This patch prevents NULL pointer error cauesed by unregistering unregistered
exton notifier block. At the probing time of charger manager, it tries to
remove extcon notifier block when it fails to initialize them. It has to be
applied for only registered one. Otherwise, it'd make kernel panic. To make it
work right, it checks extcon_specific_cable_nb's extcon_dev node. If extcon
cable notifier block was registered successfully, it has proper extcon_dev
pointer if not so it has NULL pointer.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Tue, 16 Jul 2013 08:19:13 +0000 (17:19 +0900)]
power: charger-manager: regulator_get() never returns NULL.
This patch fixes return value checking of regulator_get() in charger-manager
driver. The API, regulator_get(), returns ERR_PTR() when it fails to get
regulator with given name, not NULL.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Jonghwa Lee [Mon, 10 Jun 2013 07:01:24 +0000 (16:01 +0900)]
charger_manager: Workaround for supporting platform data without DT parsing.
All data will be move into DT later.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Tomasz Figa [Wed, 5 Jun 2013 15:53:37 +0000 (17:53 +0200)]
ARM: EXYNOS: firmware: Surround l2x0 ops with an ifdef
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 5 Jun 2013 15:40:11 +0000 (17:40 +0200)]
ARM: EXYNOS: pm: Add support for firmware-based L2X0 resume
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 5 Jun 2013 15:39:33 +0000 (17:39 +0200)]
ARM: EXYNOS: Move L2X0 cache resume to SoC PM code
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 5 Jun 2013 15:38:51 +0000 (17:38 +0200)]
ARM: EXYNOS: firmware: Implement l2x0_resume operation
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 5 Jun 2013 15:38:17 +0000 (17:38 +0200)]
ARM: firmware: Add L2X0 resume operation
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 8 May 2013 16:30:30 +0000 (18:30 +0200)]
tty: serial: samsung: Remove useless checks in suspend/resume callbacks
Since uart_port struct exists through whole driver lifetime, there is no
need to check if it is non-NULL in suspend/resume callbacks.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 8 May 2013 10:02:43 +0000 (12:02 +0200)]
clocksource: exynos_mct: Register sched_clock
This patch adds sched_clock registration to Exynos MCT driver to
improve scheduler precision by providing a high resolution clock source
for scheduling purposes.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Conflicts:
drivers/clocksource/exynos_mct.c
Tomasz Figa [Wed, 24 Apr 2013 17:02:29 +0000 (19:02 +0200)]
ARM: dts: exynos4412-slp_pq: Add regulator states in mem mode
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Tue, 30 Apr 2013 15:38:19 +0000 (17:38 +0200)]
regulator: max77686: Fix suspend-mode settings of regulators
LDO20, LDO21, LDO22, BUCK8 and BUCK9 regulators provide external pins
for enable control in addition to I2C control, which is usually used to
control regulator states in suspend.
BUCK5-BUCK7 do not provide any suspend-mode control.
This patch modifies the driver to account for these factors, making it
program sleep mode states of regulators correctly.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Conflicts:
drivers/regulator/max77686.c
Tomasz Figa [Thu, 25 Apr 2013 13:47:59 +0000 (15:47 +0200)]
regulator: max77686: Add set_suspend_enable callback for buck regulators
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 24 Apr 2013 17:01:42 +0000 (19:01 +0200)]
regulator: of: Parse regulator state in mem mode from DT
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 24 Apr 2013 16:58:06 +0000 (18:58 +0200)]
regulator: Handle suspend and resume of regulators
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Thu, 11 Apr 2013 14:52:42 +0000 (16:52 +0200)]
ARM: dts: exynos4412-slp_pq: Add sleep mode pin configuration
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Thu, 27 Jun 2013 15:41:48 +0000 (17:41 +0200)]
pinctrl: samsung: Parse pin groups before calling pinctrl_register()
Calling pinctrl_register() means that the driver is fully initialized
and might accept pinmux/pinconf requests, so pin groups must be parsed
before.
This patch fixes this problem by moving device tree parsing
before call to pinctrl_register().
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Thu, 21 Mar 2013 17:48:45 +0000 (18:48 +0100)]
ARM: EXYNOS: Add support for firmware-assisted suspend/resume
This patch adds firmware ops related to system suspend/resume that
allows suspend/resume of systems with secure firmware.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 26 Jun 2013 17:04:13 +0000 (19:04 +0200)]
ARM: EXYNOS: pm: Move call to flush_cache_all() before outer_flush_all()
Flushing L1 cache might cause data to be stored to L2 cache, so it is
more reasonable to flush L1 cache first and only then L2 cache.
This patch moves call to flush_cache_all() in exynos_cpu_suspend()
before outer_flush_all() to make sure that all data are flushed
correctly. In addition flushing is enabled for all Exynos SoCs to
prevent any data loss.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 24 Apr 2013 17:02:54 +0000 (19:02 +0200)]
clk: samsung: exynos4: Do not disable ISP bus clocks
Some ISP bus clocks must be kept enabled when entering sleep mode,
otherwise the system hangs. This patch adds CLK_IGNORE_UNUSED flags to
those clocks to keep them ungated when FIMC IS driver is not present.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Sylwester Nawrocki [Wed, 3 Jul 2013 16:18:13 +0000 (18:18 +0200)]
tizen_defconfig update
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 15:24:10 +0000 (17:24 +0200)]
ARM: dts: exynos4412-redwood: Add device nodes for modem_if
Add device nodes for modem_if, also set HSIC regulator to always on.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Thu, 23 May 2013 10:03:23 +0000 (12:03 +0200)]
modem_if: Add modem drivers to Kconfig and Makefile
Add modem_if to Kconfig and Makefile to enable compilation.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 13:53:32 +0000 (15:53 +0200)]
modem_if: Change net device name choice mechanism
CONFIG_SLP is no longer used hence new method of net device names was
implemented.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 21 May 2013 14:54:10 +0000 (16:54 +0200)]
modem_if: ifdef wake_lock support in the modem driver
Wake_locks are not supported outside of Android so it is essential to
make their use optional.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Thu, 23 May 2013 09:51:54 +0000 (11:51 +0200)]
modem_if: Move code from board-m0-modems.c to the xmm6262 driver
Moved code from the board file to the driver of the xmm6262 chip. Also
handling of sim card detection has been commented out.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 14:18:22 +0000 (16:18 +0200)]
usb: ehci-s5p: Add s5p_ehci_configurate, needed by modem_if
s5p_ehci_configurate function configures the data transfer for HSIC modem.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Thu, 23 May 2013 09:33:17 +0000 (11:33 +0200)]
modem_if: Comment out enable_wake_irq in modem drivers (HSIC, xmm6262)
Enabling the interrupt caused problem with the modem.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Wed, 22 May 2013 14:26:37 +0000 (16:26 +0200)]
modem_if: Move code from board-m0-modems.c to the modem driver
Move modem related code from the board file to the modem driver.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Wed, 22 May 2013 13:46:21 +0000 (15:46 +0200)]
modem_if: device_tree: Add modem_if to exynos4412-slp_pq.dts
Add modem_if to the device tree of slp_pq board.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 21 May 2013 16:54:09 +0000 (18:54 +0200)]
modem_if: Modification of the modem driver to compile on the 3.8 kernel
The modem_if driver code was taken from 3.0 kernel and did not compile
on 3.8. These changes are necessary to make the driver work.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Wed, 22 May 2013 12:31:10 +0000 (14:31 +0200)]
modem_if: Add modem.h to include/linux/platform_data
This file is needed by modem_if driver.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 21 May 2013 15:32:17 +0000 (17:32 +0200)]
modem_if: Remove linux/cma.h use
Remove linux/cma.h from modem_modemctl_device_xmm6262.c
It wasn't used anyway and was included for linux/rbtree.h only.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Wed, 22 May 2013 12:34:06 +0000 (14:34 +0200)]
modem_if: Add modem_if driver files
All files were taken from exynos3.4 kernel.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 14:14:44 +0000 (16:14 +0200)]
usb: ehci-s5p: Add support for HSIC to the Exynos 4x12 SoC family
Add support for HSIC to the Exynos 4x12 SoC family.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Praveen Paneri [Tue, 2 Jul 2013 14:12:16 +0000 (16:12 +0200)]
usb: s3c-hsotg: Changing MAC interface to 8 bit
This patch changes UTMI+ PHY interface of udc core from 16bit to
8bit. Although the manual says that only 16 bit is supported. This
solves the problem of EHCI and Device not working together.
Signed-off-by: Praveen Paneri <p.paneri@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 13:51:39 +0000 (15:51 +0200)]
ARM: dts: Enable ehci for exynos4412-redwood.dts
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 14:14:29 +0000 (16:14 +0200)]
usb: ehci-s5p: Fix device tree compatible string for ehci-s5p.c
Change device tree compatible string to a more generic one covering whole
Exynos SoC family.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Kamil Debski [Tue, 2 Jul 2013 14:14:01 +0000 (16:14 +0200)]
usb: ehci-s5p: Create EHCI & OHCI power control sysfs
This patch enable EHCI & OHCI power control function using sysfs
This control ehci port power and initialize kernel resources.
EHCI power off: echo 0 > /sys/devices/platform/s5p-ehci/ehci_power
EHCI power on: echo 1 > /sys/devices/platform/s5p-ehci/ehci_power
OHCI power off: echo 0 > /sys/devices/platform/s5p-ohci/ohci_power
OHCI power on: echo 1 > /sys/devices/platform/s5p-ohci/ohci_power
Change-Id: I51f99fa5759cd5041b1e70cf7309047aac2232e5
Signed-off-by: Yulgon Kim <yulgon.kim@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tomasz Figa [Wed, 13 Mar 2013 19:03:15 +0000 (20:03 +0100)]
ARM: dts: exynos4210-origen: Use real regulators for USB OTG
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 13 Mar 2013 19:09:01 +0000 (20:09 +0100)]
ARM: dts: exynos4210-origen: Add device node for ehci controller
This patch adds device tree node for ehci controller used on
exynos4210-origen board.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 13 Mar 2013 19:07:50 +0000 (20:07 +0100)]
ARM: DTS: exynos4210-origen: Add MAX8997 node entry
The node entry is added as per documentation and legacy board file.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 8 Mar 2013 17:14:17 +0000 (18:14 +0100)]
ARM: dts: exynos4x12: Extend usbphy reg property to cover HSIC registers
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 8 Mar 2013 17:13:58 +0000 (18:13 +0100)]
ARM: dts: exynos4412-slp_pq: Enable EHCI controller
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 8 Mar 2013 17:13:08 +0000 (18:13 +0100)]
[HACK] ARM: dts: exynos4412-slp_pq: Keep HSIC regulators always on
This is needed because the s5p-ehci driver does not control voltage
regulators.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Fri, 8 Mar 2013 17:12:43 +0000 (18:12 +0100)]
ARM: dts: exynos4: Add node for EHCI
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Thu, 7 Mar 2013 14:36:40 +0000 (15:36 +0100)]
ARM: dts: exynos4210-origen: Add device nodes for USB gadget
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Tomasz Figa [Wed, 26 Jun 2013 13:42:14 +0000 (15:42 +0200)]
exynos4-is: Ungate uart clocks on system suspend
Due to hardware requirements, several ISP clocks must be enabled when
suspending the system. This patch adds ungating to suspend and
gating to resume callbacks to keep such clocks ungated.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tomasz Figa [Wed, 26 Jun 2013 13:37:14 +0000 (15:37 +0200)]
exynos4-is: Handle suspend/resume of fimc-is-i2c correctly
If the same callbacks are used for runtime and system suspend/resume,
clocks can get disabled twice, which can lead to negative reference
counts and kernel warnings.
This patch splits suspend/resume callbacks into separate runtime and
system-wide functions, so clock gating is done correctly.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Jaehoon Chung [Thu, 27 Jun 2013 02:29:47 +0000 (11:29 +0900)]
mmc: sdhci-s3c: remove the duplicated calling sequence
Didn't need to call the sdhci_s3c_notify_change in
setup_card_detect_gpio()
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Sylwester Nawrocki [Tue, 25 Jun 2013 18:23:35 +0000 (20:23 +0200)]
ARM: dts: Remove redundant sysreg node from exynos4.dtsi
Remove the incorrect sysreg node, which is likely in this file
due to wrong merge conflict resolution.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Jaehoon Chung [Tue, 25 Jun 2013 01:27:53 +0000 (10:27 +0900)]
mmc: sdhci-s3c: revert "fix missing clock for gpio card-detect"
It's produced the clk-disable counting warning.
(the pair is not right)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Sylwester Nawrocki [Mon, 24 Jun 2013 16:56:55 +0000 (18:56 +0200)]
ARM: dts: Add missing I2C controller node alias for GP2AP020A00F sensor
Without this alias probing of the I2C0 adapter was failing as the
'i2c-gpio-2' i2c-gpio adapter was getting I2C bus id 0 assigned to it.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Peter De Schrijver [Wed, 5 Jun 2013 15:06:36 +0000 (18:06 +0300)]
clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate
clk_set_rate() uses clk->rate directly. This causes problems if the clock
is marked as CLK_GET_RATE_NOCACHE. Hence call clk_get_rate() to get the
current rate.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Sylwester Nawrocki [Fri, 21 Jun 2013 12:07:07 +0000 (14:07 +0200)]
tizen_defconfig update
Enable MIPI CSI-2/DSIM PHY driver and geenric PHY framework.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrocki [Thu, 4 Apr 2013 12:13:51 +0000 (14:13 +0200)]
video: exynos_dsi: Use generic PHY driver
Use the generic PHY API instead of the platform callback to control
the MIPI DSIM DPHY.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Sylwester Nawrocki [Fri, 28 Jun 2013 09:24:47 +0000 (11:24 +0200)]
ARM: Samsung: Remove the MIPI PHY setup code
Generic PHY drivers are used to handle the MIPI CSIS and MIPI DSIM
DPHYs so we can remove now unused code at arch/arm/plat-samsung.
In case there is any board file for S5PV210 platforms using MIPI
CSIS/DSIM (not any upstream currently) it should use the generic
PHY API to bind the PHYs to respective PHY consumer drivers and
a platform device for the PHY provider should be defined.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Sylwester Nawrocki [Thu, 4 Apr 2013 12:15:04 +0000 (14:15 +0200)]
[media] exynos4-is: Use the generic MIPI CSIS PHY driver
Use the generic PHY API instead of the platform callback to control
the MIPI CSIS DPHY. The 'phy_label' field is added to the platform
data structure to allow PHY lookup on non-dt platforms
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Fri, 28 Jun 2013 09:21:25 +0000 (11:21 +0200)]
video: exynos_mipi_dsim: Use the generic PHY driver
Use the generic PHY API instead of the platform callback to control
the MIPI DSIM DPHY. The 'phy_label' field is added to the platform
data structure to allow PHY lookup on non-dt platforms.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
Sylwester Nawrocki [Thu, 13 Jun 2013 09:16:30 +0000 (11:16 +0200)]
phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs
Add a PHY provider driver for the Samsung S5P/Exynos SoC MIPI CSI-2
receiver and MIPI DSI transmitter DPHYs.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Felipe Balbi <balbi@ti.com>
---
Changes since v3:
- replaced spin_(un)lock_irq_{save,restore} with spin_{lock,unlock}.
- DT binding file renamed to samsung-phy.txt, so it can be used for
other PHYs as well,
- removed <linux/delay.h> inclusion,
- added missing spin_lock_init().
Kishon Vijay Abraham I [Wed, 26 Jun 2013 09:57:45 +0000 (15:27 +0530)]
drivers: phy: add generic PHY framework
The PHY framework provides a set of APIs for the PHY drivers to
create/destroy a PHY and APIs for the PHY users to obtain a reference to the
PHY with or without using phandle. For dt-boot, the PHY drivers should
also register *PHY provider* with the framework.
PHY drivers should create the PHY by passing id and ops like init, exit,
power_on and power_off. This framework is also pm runtime enabled.
The documentation for the generic PHY framework is added in
Documentation/phy.txt and the documentation for dt binding can be found at
Documentation/devicetree/bindings/phy/phy-bindings.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Sylwester Nawrocki [Thu, 4 Apr 2013 11:23:27 +0000 (13:23 +0200)]
ARM: dts: Add MIPI PHY node to exynos4.dtsi
Add PHY provider node for the MIPI CSIS and MIPI DSIM PHYs.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Sylwester Nawrocki [Fri, 31 May 2013 11:08:24 +0000 (13:08 +0200)]
exynos4-is: Add the FIMC-IS ISP capture DMA driver
Add a video capture node for the FIMC-IS ISP IP block. The Exynos4x12
FIMC-IS ISP IP block has 2 DMA interfaces that allow to capture raw
Bayer and YUV data to memory. Currently only the DMA2 output is and
raw Bayer data capture is supported.
exynos4-is: Fix ISP DMA capture start/stop sequence
Ensure we wait until FIMC-IS executes a command, otherwise a division by
zero exception is thrown in the interrupt handler due to buf_count being
set to 0.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Sylwester Nawrocki [Thu, 20 Jun 2013 13:49:09 +0000 (10:49 -0300)]
[media] exynos4-is: Correct colorspace handling at FIMC-LITE
Ensure the colorspace is properly adjusted by the driver for YUV
and Bayer image formats. The subdev try_fmt helper is simplified.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 18 Jun 2013 17:56:11 +0000 (14:56 -0300)]
[media] exynos4-is: Set valid initial format on FIMC.n subdevs
Ensure there are valid initial image formats on the FIMC.n subdev pads.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 18 Jun 2013 17:50:50 +0000 (14:50 -0300)]
[media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
Ensure there is a valid initial resolution and pixel format set
at the FIMC-IS-ISP subdev pads.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 18 Jun 2013 16:42:30 +0000 (13:42 -0300)]
[media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev
Ensure TRY formats are propagated from the sink pad to the source pads
of the FIMC-IS-ISP subdev and the TRY and ACTIVE formats are separated.
[mchehab@redhat.com: Whitespace cleanup]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 18 Jun 2013 11:00:42 +0000 (08:00 -0300)]
[media] exynos4-is: Set valid initial format at FIMC-LITE
Ensure the image resolution and crop rectangle on the FIMC-LITE.n
subdevs and fimc-lite.n.capture video nodes is properly configured
upon the driver's initialization.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Thu, 20 Jun 2013 13:57:47 +0000 (10:57 -0300)]
[media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs
FIMC-LITE subdevs have one sink pad and two source pads on which the image
formats are always same. This patch implements missing format propagation
from the sink pad to the source pads, to allow user space to negotiate TRY
format on whole media pipeline involving FIMC-LITE.n subdevs. The subdev
try_fmt helper is simplified.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Fri, 31 May 2013 13:36:19 +0000 (10:36 -0300)]
[media] exynos4-is: Change fimc-is firmware file names
This patch changes the firmware file names of the FIMC-IS subsystem.
It is needed since there are different firmwares used across various
SoC series, e.g. Exynos4 and Exynos5.
Also the sensor specific "setfile" name is changed, to account for
it depends on an image sensor and is also specific to the FIMC-IS
and the SoC.
This is a change for a driver merged in 3.10.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Fri, 31 May 2013 13:38:23 +0000 (10:38 -0300)]
[media] exynos4-is: Add support for Exynos5250 MIPI-CSIS
Add compatible property for the Exynos5250 and enable the frame start
and frame end interrupts. These interrupts are needed for the Exynos5
FIMC-IS firmware. The driver enables those interrupt only where available,
depending on the 'compatible' property. This can be optimized further,
by exposing some API at the subdev driver, so the host driver can enable
extra interrupts only for the image processing chains involving FIMC-IS.
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Fri, 14 Jun 2013 15:38:15 +0000 (12:38 -0300)]
[media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver
This patch adds support for the Exynos5250 SoC variant of the FIMC-LITE
IP. A 'compatible' string is added for Exynos5250 compatible devices
and the capture DMA handling is reworked to use the FLITE_REG_CIFCNTSEQ
register, masking output DMA buffer address slots. The frame interrupt
is enabled so there are now 2 interrupts per frame. This likely can be
optimized in future by using any status registers that allow to figure
out what the last and the currently written frame buffer is. It would
also be more reliable in cases where there are high interrupt service
latencies.
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sylwester Nawrocki [Tue, 11 Jun 2013 13:44:38 +0000 (10:44 -0300)]
[media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms
The FIMC-LITE IP block is available only on platforms instantiated
from device tree.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Lukasz Czerwinski [Tue, 28 May 2013 07:03:43 +0000 (09:03 +0200)]
tizen_defconfig update
This patch enables:
- NFC subsystem
- NCI protocol
- NFC HCI implementation
- SHDLC link layer for HCI NFC drivers
- NFC PN544 driver support
- GP2AP002A00F light/priximity sensor
- LSM330DLC sensor IIO driver
- buffer support within IIO
Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Lukasz Czerwinski [Thu, 13 Jun 2013 11:23:48 +0000 (13:23 +0200)]
ARM: dts: Add nfc node for PQ board
This patch adds nxp pn544-hci nfc controller node.
Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>
Lukasz Czerwinski [Thu, 13 Jun 2013 13:42:22 +0000 (15:42 +0200)]
nfc: pn544-i2c: Fix pn544_hci_i2c_write() resend cmd
Driver should always try resend cmd after failed i2c_master_send.
Signed-off-by: Lukasz Czerwinski <l.czerwinski@samsung.com>