Return error if otp read or fuse id read fails
Turn off power before returning error and remove
check for device not available during power off as
it's already verified during power on.
Ahung Cheng [Tue, 21 Jun 2016 10:39:53 +0000 (18:39 +0800)]
video: tegra: dc: HDMI SPD InfoFrame support
Add support to send SPD over Generic InfoFrame.
Please be noted that once SPD InfoFrame support is
enabled, HDR InfoFrame will be disabled as only one
of them can use Generic InfoFrame at one time.
To enable SPD InfoFrame, please add this in kernel config
CONFIG_TEGRA_HDMI_SPD_INFOFRAME=y
And add source product description format as below under
hdmi-display in device tree
spd-infoframe {
vendor-name = "XXX";
product-description = "YYY";
source-information = <N>;
};
Joe Korty [Wed, 25 May 2016 12:52:48 +0000 (18:22 +0530)]
Fix uninitialized variable
drivers/staging/iio/meter/ina3221.c: In function
'ina3221_get_shuntv_offset':
drivers/staging/iio/meter/ina3221.c:1021:25: warning:
'offset' may be used uninitialized in this function
[-Wmaybe-uninitialized] shuntv_offset->offset = offset;
L1SS configuration parameters need to be programmed
only for Tegra root ports and immediate devices (EP/UP port).
This change fixes the unwanted programming being done
to other devices apart from the ones mentioned above
This packet timeout prevents system entering suspend.
This 500ms timeout is too long, which will slow
resume/suspend cycle in WiFi wakeup, so reducing it to 100ms.
Also, BRCM confirmed that it's safe to remove this timeout.
Change-Id: I62dd11e292d3c9fbfe959d76fc510c2115958b7e Signed-off-by: Leo He <leoh@nvidia.com>
Reviewed-on: http://git-master/r/1023810
(cherry picked from commit e1395c20bf28b4eb5412534d46da9949db6cc8a0)
Reviewed-on: http://git-master/r/1176046
GVS: Gerrit_Virtual_Submit Reviewed-by: Hayden Du <haydend@nvidia.com>
Michael Frydrych [Fri, 17 Jun 2016 14:39:30 +0000 (17:39 +0300)]
video: tegra: dc: fix bit depth of yuv422 mode
Bit depth of yuv422 mode was set to 10-bits, while it should
have been set to 12-bits. Incorrect bit depth resulted in the
mode not being intercepted when setting yuv422 black.
Ninad Malwade [Tue, 28 Jun 2016 06:59:44 +0000 (14:59 +0800)]
arch: arm64: kernel: disable the regs dump
- When user space app tried to call a syscall
which is not implemented in kernel, then
it dumps the process name, syscall number
and the registers along with PC and LR.
- This leads to kernel_warning GVS failures.
- Since, the regs dump is just for the
information purspose, it's safe to ignore
and thus, putting it under CONFIG_DEBUG_USER.
- This is surfaced while trying to port 16.04
rootfs and it's a must change for switching.
Joe Korty [Wed, 25 May 2016 12:12:43 +0000 (17:42 +0530)]
Pointers fit inside unsigned long
drivers/net/ethernet/smsc/smc91x.c:
In function 'smc_probe':
drivers/net/ethernet/smsc/smc91x.c:1899:7: warning:
cast from pointer to integer of
different size [-Wpointer-to-int-cast]
if (((unsigned int)ioaddr &
(0x3e0 << SMC_IO_SHIFT)) != val) {
Joe Korty [Wed, 25 May 2016 12:08:14 +0000 (17:38 +0530)]
Fix the return type explicitly
gcc does not like longs being compared
to pointers; tell the compiler that this
is OK by hand-casting the long integer to
the required pointer type first.
kernel/sched/core.c: In function 'idle_cpu_relaxed':
kernel/sched/core.c:3863:39: warning:
comparison between pointer and integer
if (cpu_relaxed_read_long(&rq->curr) != rq->idle)
Joe Korty [Wed, 25 May 2016 12:06:00 +0000 (17:36 +0530)]
Fix the return type explicitly
gcc does not like a long put into a pointer
without an explicit cast.
kernel/mutex.c: In function 'mspin_unlock':
kernel/mutex.c:155:17: warning:
assignment makes pointer from integer
without cast [-Wint-conversion]
while (!(next = cpu_relaxed_read_long(&(node->next))))
Joe Korty [Wed, 25 May 2016 09:08:19 +0000 (14:38 +0530)]
Fix __init section mismatch in usb gadget driver
gcc complains when __init variables or __init functions
are referenced from non-init code, as by the time the
non-init code is run, the __init variables and functions
it references might no longer exist.
Fix by removing the __init from the afunc_bind defition.
This allows it to be called from anywhere, anytime without
problem.
WARNING: drivers/usb/gadget/g_audio.o(.text+0x101c): Section
mismatch in reference from the function audio_bind_config()
to the function .init.text:afunc_bind()
The function audio_bind_config() references
the function __init afunc_bind().
This is often because audio_bind_config lacks a __init
annotation or the annotation of afunc_bind is wrong.
Joe Korty [Wed, 25 May 2016 07:51:40 +0000 (13:21 +0530)]
Correct the declaration of variable
Do not declare a variable in the middle of a
C code block.Moved the declaration to the front
of the block.
sound/soc/codecs/audience/es-d300.c:
In function '_es_stop_route':
sound/soc/codecs/audience/es-d300.c:294:4:
warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
u32 cmd = escore->dhwpt_cmd & 0xFFFF0000;
Joe Korty [Wed, 25 May 2016 07:36:52 +0000 (13:06 +0530)]
Fix integer size errors in printf format
drivers/mmc/core/debugfs.c:544:44: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:553:45: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:562:42: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:572:41: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:34:27 +0000 (13:04 +0530)]
Correct format specifier
%d -> %zd printk format statement transformation
sound/soc/codecs/audience/escore-vs.c:870:24:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:32:13 +0000 (13:02 +0530)]
Use atomic_read to access atomic var
Also fix a few format statement mismatches,
%u -> %lu.
sound/soc/codecs/audience/es-d300.c:1317:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1332:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1355:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1386:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1398:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1412:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1433:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:29:05 +0000 (12:59 +0530)]
Correct format specifier
d -> %zd format statement transformation, fixes
sound/soc/codecs/audience/es755.c:
In function 'codec_reg_dump_store':
sound/soc/codecs/audience/es755.c:528:11:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]
pr_debug("%s(): requested - %s, count=%d\n",
__func__, buf, count);
Joe Korty [Wed, 25 May 2016 07:27:18 +0000 (12:57 +0530)]
pr_err requires size_t be printed with %zu
drivers/usb/gadget/rndis.c:
In function 'rndis_rm_hdr':
include/linux/kern_levels.h:4:18: warning:
format '%u' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
Joe Korty [Wed, 25 May 2016 07:22:41 +0000 (12:52 +0530)]
longs are printed with %lx
sound/pci/hda/hda_intel.c:
In function 'azx_single_wait_for_response':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of
type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
sound/pci/hda/hda_intel.c:1147:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: get_response timeout: IRS=0x%x\n",
sound/pci/hda/hda_intel.c:
In function 'azx_single_send_cmd':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]
sound/pci/hda/hda_intel.c:1175:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: send_cmd timeout: IRS=0x%x, val=0x%x\n",
Joe Korty [Wed, 25 May 2016 11:55:45 +0000 (17:25 +0530)]
Correct g_ether module init & exit fn
Replace u_ether.c's use of __initcall and __exitcall
with direct invocations of its init and exit function
from ether.c's module_init and module_exit functions.
We have to do this as 1) __initcall cannot be used
from within a module, and 2) module_init cannot be
declared more than once inside any .c file, and
3) ether.c #includes u_ether.c.
Fortunately, ether.c unconditionally includes u_ether.c,
so we can unconditionally add the u_ether.c's init code
directly to ether.c's init function.
include/linux/init.h:298:27:
error: redefinition of '__inittest'
static inline initcall_t __inittest(void)
include/linux/init.h:291:30: note:
in expansion of macro 'module_init'
drivers/usb/gadget/u_ether.c:1216:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_exit);
include/linux/init.h:298:27: note:
previous definition of '__inittest' was here
static inline initcall_t __inittest(void)
include/linux/init.h:291:30: note:
in expansion of macro 'module_init'
drivers/usb/gadget/u_ether.c:1209:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_init);
drivers/usb/gadget/u_ether.c: In function '__inittest':
drivers/usb/gadget/u_ether.c:1216:17: warning:
return from
incompatible pointer type [-Wincompatible-pointer-types]
device_initcall(gether_exit);
include/linux/init.h:299:11:
note: in definition of macro 'module_init'
{ return initfn; }
Joe Korty [Wed, 25 May 2016 12:15:05 +0000 (17:45 +0530)]
Fix the explicit cast
gcc requires that when an integer value is being
returned through a pointer, that value be explicity
cast first to a pointer type.
drivers/usb/gadget/u_ether.c:
In function 'gether_setup_name':
drivers/usb/gadget/u_ether.c:963:24: warning:
return makes pointer from integer
without a cast [-Wint-conversion]
return -ENOMEM;
Joe Korty [Wed, 25 May 2016 12:04:04 +0000 (17:34 +0530)]
Fix unwanted #ifdef in swtich case
SCAN_SUSPEND_ABORT is always defined in the
enumeration,so no need to '#ifdef' out its
use in those kernels for which this feature
is not compiled in.
net/mac80211/scan.c: In function 'ieee80211_scan_work':
net/mac80211/scan.c:758:3: warning:
enumeration value 'SCAN_SUSPEND_ABORT'
not handled in switch [-Wswitch]
switch (local->next_scan_state) {
Joe Korty [Wed, 25 May 2016 12:02:34 +0000 (17:32 +0530)]
Include required header file
Insert missing include file, felt
when CONFIG_COMPAT=n
drivers/devfreq/governor_wmark_active.c:
In function 'devfreq_watermark_target_freq':
drivers/devfreq/governor_wmark_active.c:146:25:
error: implicit declaration of function
'ktime_get' [-Werror=implicit-function-declaration]
ktime_t current_time = ktime_get();
Joe Korty [Wed, 25 May 2016 11:58:40 +0000 (17:28 +0530)]
Include the required header file
Insert missing #include file, felt
when CONFIG_COMPAT=n.
drivers/firmware/tegra/bpmp.c:
In function 'bpmp_ping_show':
drivers/firmware/tegra/bpmp.c:465:7: error:
implicit declaration of
function 'ktime_get' [-Werror=implicit-function-declaration]
tm = ktime_get();
drivers/firmware/tegra/bpmp.c:465:5: error:
incompatible types when assigning to type 'ktime_t
{aka union ktime}' from type 'int'
tm = ktime_get();
include/linux/ktime.h:85:30: error: request for member
'tv64' in something not a structure or union
({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
^
drivers/firmware/tegra/bpmp.c:468:7: note: in expansion
of macro 'ktime_sub'
tm = ktime_sub(ktime_get(), tm);
Gaurav Singh [Wed, 25 May 2016 11:46:34 +0000 (17:16 +0530)]
Fix trace_sched_switch_end definition
We model what we do here on other empty (no arg)
tracepoint function definitions in the kernel.
In file included from include/trace/define_trace.h:86:0,
from include/trace/events/sched.h:452,
from kernel/sched/core.c:94:
include/trace/events/sched.h:
In function 'ftrace_define_fields_sched_switch_end':
include/trace/ftrace.h:327:27:
warning: unused variable 'field' [-Wunused-variable]
struct ftrace_raw_##call field;
include/trace/ftrace.h:32:2:
note: in expansion of macro 'DECLARE_EVENT_CLASS'
DECLARE_EVENT_CLASS(name,
include/trace/events/sched.h:155:1:
note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(sched_switch_end,
Joe Korty [Wed, 25 May 2016 09:17:20 +0000 (14:47 +0530)]
Fix return type of xchg()
The kernel does not like it when the return
value of xchg() is not being used, so tell
it when that is indeed the proper use.
drivers/media/platform/tegra/camera.c:
In function 'camera_remove':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/atomic.h:198:30:
note: in expansion of macro 'xchg'
drivers/media/platform/tegra/camera.c:1201:2:
note: in expansion of macro 'atomic_xchg'
atomic_xchg(&cam_desc.in_use, 0);
drivers/media/platform/tegra/camera.c:
In function 'camera_shutdown':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))
Joe Korty [Wed, 25 May 2016 09:12:26 +0000 (14:42 +0530)]
fix incompatible ptr type
The '&length' argument must be a long*, not an int*.
drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
prop = of_get_flat_dt_prop(node, "linux,phandle", &len);
In file included from drivers/of/of_reserved_mem.c:18:0:
include/linux/of_fdt.h:88:14: note:
expected 'long unsigned int *' but argument is of type 'int *'
extern void *of_get_flat_dt_prop(unsigned long node,
const char *name,
Joe Korty [Wed, 25 May 2016 06:48:55 +0000 (12:18 +0530)]
Correct format specifier
u64 data types are displayed with %llu, not %u
drivers/mmc/core/debugfs.c:498:39: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int'
[-Wformat=] mmc_dbg_card_speed_class_get, NULL, "%u\n");
^
include/linux/fs.h:2667:29: note:
in definition of macro 'DEFINE_SIMPLE_ATTRIBUTE'
__simple_attr_check_format(__fmt, 0ull); \
Joe Korty [Wed, 25 May 2016 06:45:43 +0000 (12:15 +0530)]
Correct format specifier
Use %zd, not %d, for display of size_t in printk's
drivers/tty/tty_buffer.c:
In function 'tty_insert_flip_string_fixed_flag_lock':
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int', but
argument 3 has type 'size_t {aka long unsigned int}'
[-Wformat=]
drivers/tty/tty_buffer.c:354:4: note: in expansion of
macro 'pr_err'
pr_err("%s: No space: Requested %d, memory used: %d\n",
Joe Korty [Wed, 25 May 2016 06:40:39 +0000 (12:10 +0530)]
Give ampud_status an initial value of zero.
It is not actually used anywhere its value
is passed to, so any value would do.
drivers/net/wireless/iwlwifi/mvm/rx.c:
In function 'iwl_mvm_rx_rx_mpdu':
drivers/net/wireless/iwlwifi/mvm/rx.c:362:2:
warning: 'ampdu_status' may be used uninitialized
in this function [-Wmaybe-uninitialized]
iwl_mvm_pass_packet_to_mac80211(mvm, hdr, len, ampdu_status,
Joe Korty [Wed, 25 May 2016 06:39:09 +0000 (12:09 +0530)]
Remove unused label
net/wireless/nl80211.c:
In function 'cfg80211_ch_switch_notify':
net/wireless/nl80211.c:10425:1: warning:
label 'out' defined but not used [-Wunused-label]
Joe Korty [Wed, 25 May 2016 06:37:28 +0000 (12:07 +0530)]
Use #ifdef for the functions
Put the same '#ifdef' around the definition of
a function that is present around its use, so
that both definition and use are either present
or not present in the resulting binary.
drivers/base/cpu.c:291:12: warning:
'cpu_uevent' defined but not used [-Wunused-function]
Joe Korty [Wed, 25 May 2016 06:35:04 +0000 (12:05 +0530)]
Fix minor gcc problems in rtrace.c
1) when storing a pointer into an int,
tell the compiler that this
is OK by casting the pointer first to an int.
2) remove unused variable 'phys'.
This is not being used even under #ifdef.
fs/pstore/rtrace.c:58:13: warning: assignment makes
integer from pointer without a cast [-Wint-conversion]
fs/pstore/rtrace.c:48:16: warning:
unused variable 'phys' [-Wunused-variable]
Joe Korty [Tue, 24 May 2016 11:19:08 +0000 (16:49 +0530)]
Remove unused label
Wunused-label is a stupid gcc option as removing the
warnings it produces often makes the code harder to
read. But such is life ....
fs/pstore/ram.c:633:1: warning: label 'fail_init_fprz'
defined but not used [-Wunused-label]
fs/pstore/ram.c:629:1: warning: label 'fail_init_mprz'
defined but not used [-Wunused-label]
Joe Korty [Tue, 24 May 2016 11:01:23 +0000 (16:31 +0530)]
Delete unused function.
Clearly, the intent at one time was for it to be used,
but either the code that used it got deleted, or
compat_binfmt_elf.c never got the feature that was
expected to use it.
fs/compat_binfmt_elf.c: At top level:
fs/compat_binfmt_elf.c:58:13: warning:
'cputime_to_compat_timeval' defined but not used
[-Wunused-function]
static void cputime_to_compat_timeval(const cputime_t cputime,
Joe Korty [Tue, 24 May 2016 10:53:38 +0000 (16:23 +0530)]
Remove unused label
drivers/mmc/core/debugfs.c:
In function 'mmc_get_ext_csd_byte_val':
drivers/mmc/core/debugfs.c:519:1: warning:
label 'out_free' defined but not used
[-Wunused-label] out_free:
Inserting new pages in a handle to a vma does not seem
to improve perf in most cases and so is more like overhead.
Remove this path. Accounting dirty pages should not hold
handle lock again from within nvmap_handle_mk(), so add
an argument to it to avoid taking the lock again from
_nvmap_handle_mkdirty().
When handle has all clean pages, avoid any further clean operation.
Similarly for dirty pages. This avoids any unnecessary overeheads
in empty cuda kernel launch whose buffer is not accessed by cpu
before passing to GPU.
Bibek Basu [Wed, 29 Jun 2016 10:30:18 +0000 (16:00 +0530)]
arm64: config: update l4t defconfig
Enable support for EXT2 FS and disable Preempt
Traces
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
-CONFIG_PREEMPT_TRACER=y
Bryan Wu [Fri, 24 Jun 2016 21:54:44 +0000 (14:54 -0700)]
mm: remove memcg oom killer sync up with upstream
This memcg oom killer code was removed in upstream stable tree, but
still keep that. After enabling CONFIG_MEMCG in kernel, kernel booting
will give endless warning and system is not usable.
This patch fix this issue and it's required for using Docker on L4T
Bryan Wu [Fri, 24 Jun 2016 21:59:52 +0000 (14:59 -0700)]
kuid/kgid: fix building error when trying Docker
Docker requires CONFIG_UIDGID_STRICT_TYPE_CHECKS which will refine kuid
and kgid struct. Some old code needs to change to use
__kuid_val/__kgid_val, KUIDT_INIT()/KUIDT_INIT() and uid_eq(), otherwise
kernel will building fail.
Johan Hovold [Fri, 5 Sep 2014 16:08:47 +0000 (18:08 +0200)]
HID: usbhid: add always-poll quirk
Add quirk to make sure that a device is always polled for input events
even if it hasn't been opened.
This is needed for devices that disconnects from the bus unless the
interrupt endpoint has been polled at least once or when not responding
to an input event (e.g. after having shut down X).
Joe Korty [Tue, 24 May 2016 08:46:41 +0000 (14:16 +0530)]
Remove reference to HOTPLUG Kconfig var
The HOTPLUG Kbuild variable disappeared long ago from
Linux, but apparently not all references to it were
removed. Remove the one causing the below Kbuild
warning.
warning: (PM_SLEEP_SMP) selects HOTPLUG_CPU which has
unmet direct dependencies (SMP && HOTPLUG)
Despite zap being costly, zap was used as nvmap wants to be able
to disallow access to handle on any cpu access. Now this is made
available through a fixup_prot handler so a less costly operation
like mprotect can be used.
During NVMAP_PAGES_RESERVE operation, use mprotect to set
permissions to __P000.
On NVMAP_PAGES_UNRESERVE, just modify the vm_flags to allow nvmap
know about the first cpu access using fixup_prot handler and do
necessary cache operations. If fixup_prot returns true, the pte
will be fixed up with proper protections.
NVMAP_PAGES_INSERT_ON_UNRESERVE fixes up the pte protections as well.
Rename NVMAP_PAGES_ZAP_AND_CLEAN as NVMAP_PAGES_PROT_AND_CLEAN,
this is same as doing a NVMAP_PAGES_RESERVE followed by
NVMAP_PAGES_UNRESERVE.
fixup_prot handler is added to be able to notify nvmap
about any user accesses when user ptes are marked with
_P000 protections. Nvmap allows fix up of protections
if the handle is not reserved and also performs necessary
cache flushes as applicable
JIRA TMM-59
Change-Id: I7089704d255d2539010e2bbc8b3d9871593932f2 Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141384
(cherry picked from commit e487ae65dc77c63080556a3278de2f3173712b53)
Reviewed-on: http://git-master/r/1168480 Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit Reviewed-by: Hayden Du <haydend@nvidia.com>
video: tegra: nvmap: force handle wide reserve operations
This forces all supported reserve operations to be handle wide
operations. This will allow us to remove all zap and explicit insert
we do in nvmap. This will make us align more towards upstream.
video: tegra: nvmap: track reserve at handle level
Reserve/unreserve entire handle at once. Remove the bookkeeping
operations which kept track of reserve/unreserve per page. This
avoiding some overhead involved in both reserve/unreserve operations.
Allow driver decide if page protections can be fixed.
This allows us replace zapping vma's with mprotect calls.
Zap based solution is considerably slower than mprotect
based one and hence deviating from upstream.
JIRA TMM-59
Change-Id: I3d362deda2866d5db9f1cfb037a2a35e646ced8a Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141383
(cherry picked from commit bc3555caae78981db5d1bb8a521d927be06bdd9e)
Reviewed-on: http://git-master/r/1168475
GVS: Gerrit_Virtual_Submit Reviewed-by: Hayden Du <haydend@nvidia.com>
Erik Lilliebjerg [Tue, 24 May 2016 00:28:14 +0000 (17:28 -0700)]
iio: imu: nvi v.328 fix wake IRQ
- Some sensors require other sensors to be enabled (significant motion requires
accelerometer) which caused the setting of the ICM DMP wake IRQ to be
incorrect. Fixed by basing the ICM DMP wake IRQ setting on only the intended
enabled sensors (enabled from HAL as opposed to enabled due to dependency).
- Enable wake63 for motion_int: The GPIO_PX2 to which the MPU hw irq
is routed is currently not configured as a wake up source and because
of this when the system goes into suspend, the MPU irq is unable to
wake the system up.
Erik Lilliebjerg [Mon, 23 May 2016 08:27:46 +0000 (01:27 -0700)]
iio: imu: nvi v.325 ICM DMP support
The following done to support the Invensense ICM DMP:
- Add ability for AUX client to select the AUX port.
- Add efficient AUX device enable/disable.
- Add sensor accuracy.
- Add DMP initialization after AUX device registers.
Erik Lilliebjerg [Thu, 19 May 2016 19:44:43 +0000 (12:44 -0700)]
iio: imu: nvi v.324 Fix wake up IRQ
- The DMP IRQ mode is selected by which sensors are enabled which is tracked
by a bit mask. The bug was that this bit mask was not clearing the bit
pertaining to a disabled sensor and hence the DMP was programming the
incorrect IRQ mode when suspending.