Do not send CMD13 after sending switch command for HS, HS_DDR,
HS200 and HS400 modes. It seems that below problem can occur -
1. After sending switch CMD6, card will switch to mentioned bus speed
mode.
2. At this moment the controller will be in different bus speed mode,
unless the timing of the controller is switched to match with that of
card.
During this time, if CMD13 follows CMD6 to switch the bus speed
mode in card. Then it may cause timeouts or other errors because
of mismatch in timing of controller and card.
Thus send CMD13 to see the status once both controller and card are
switched to same timings.
Change-Id: If796c8cfce2cbdc1bce460460e3276886ae1be0c
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
nt36850 wqhd command panel will be used for sdm660 QRD,
so enable it for sdm660 QRD.
CRs-Fixed: 1107352
Change-Id: Ia7a691949bfef8777f78e846b6fb92e01658441f
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
Add TLB dump entries to setup memory space for the cpuss dump
driver to dump TLB entries.
Change-Id: I7514969c1540d18d2102088b43d959adec68152f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
When perf_group_detach is called on a group leader,
it should empty its sibling list. Otherwise, when
a sibling is later deallocated, list_del_event()
removes the sibling's group_entry from its current
list, which can be the now-deallocated group leader's
sibling list (use-after-free bug).
Bug: 32402548
Change-Id: I99f6bc97c8518df1cb0035814368012ba72ab1f1
Signed-off-by: John Dias <joaodias@google.com>
Git-repo: https://android.googlesource.com/kernel/msm
Git-commit: 6b6cfb2362f09553b46b3b7e5684b16b6e53e373
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
This fixes CVE-2016-7042.
Fix a short sprintf buffer in proc_keys_show(). If the gcc stack protector
is turned on, this can cause a panic due to stack corruption.
The problem is that xbuf[] is not big enough to hold a 64-bit timeout
rendered as weeks:
(gdb) p 0xffffffffffffffffULL/(60*60*24*7)
$2 = 30500568904943
That's 14 chars plus NUL, not 11 chars plus NUL.
Expand the buffer to 16 chars.
I think the unpatched code apparently works if the stack-protector is not
enabled because on a 32-bit machine the buffer won't be overflowed and on a
64-bit machine there's a 64-bit aligned pointer at one side and an int that
isn't checked again on the other side.
The panic incurred looks something like:
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe
CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f
ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6
ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679
Call Trace:
[<ffffffff813d941f>] dump_stack+0x63/0x84
[<ffffffff811b2cb6>] panic+0xde/0x22a
[<ffffffff81352ebe>] ? proc_keys_show+0x3ce/0x3d0
[<ffffffff8109f7f9>] __stack_chk_fail+0x19/0x30
[<ffffffff81352ebe>] proc_keys_show+0x3ce/0x3d0
[<ffffffff81350410>] ? key_validate+0x50/0x50
[<ffffffff8134db30>] ? key_default_cmp+0x20/0x20
[<ffffffff8126b31c>] seq_read+0x2cc/0x390
[<ffffffff812b6b12>] proc_reg_read+0x42/0x70
[<ffffffff81244fc7>] __vfs_read+0x37/0x150
[<ffffffff81357020>] ? security_file_permission+0xa0/0xc0
[<ffffffff81246156>] vfs_read+0x96/0x130
[<ffffffff81247635>] SyS_read+0x55/0xc0
[<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4
Change-Id: I23554b54eb9b82f44554a3ef620200de9f6ea55a
Reported-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ondrej Kozina <okozina@redhat.com>
cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git
Git-commit: 03dab869b7b239c4e013ec82aea22e181e441cfc
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
If a user happens to call ION_IOC_FREE during an
ION_IOC_ALLOC on the just allocated id, and the
copy_to_user fails, the cleanup code will attempt
to free an already freed handle.
This adds a wrapper for ion_alloc that adds an
ion_handle_get to avoid this.
Bug: 31568617
Change-Id: I476e5bd5372b5178a213f1fea143d270cf9361ed
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Git-repo: https://android.googlesource.com/kernel/msm/
Git-commit: 20a5411d0115b16826f3d327b6abb0192c8a2001
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
__qseecom_update_cmd_buf_64() called __qseecom_allocate_sg_list_buffer()
to allocate memory from within a for loop. Should it fail on any other
than the first time through the loop, the prior allocations will not be
deallocated, make change to deallocate memory in this error case.
Change-Id: I8cb71a3b141249d8266aec4890632f200d147405
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add alias name for the temperature sensors for msm8998. This information
will be read by KTM and will be communicated to thermal-engine.
Change-Id: Ia0a579f1ead211cefa42fc846a32aa3419b1259b
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
When VCONN is enabled while OTG is disabled the CC line which is not
configured for VCONN can be internally pulled down. If the Type-C plug
were removed then Type-C detection would still see that Rd is applied and
not detect the removal.
Fix this by ensuring that OTG is enabled while VCONN is enabled. If OTG
were disabled due to an over-current event then VCONN must also be
disabled.
Implement a retry mechanism if over-current is detected on either VCONN or
VBUS.
Change-Id: Iccfb923bce8f06c7c1270943211ce134ea9ef616
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Since clusters can vary significantly in the power and performance
characteristics, there may be a need to have different CPU selection
policies based on which cluster a task is being placed on. For example
the placement policy can be more aggressive in using idle CPUs on
cluster that are power efficient and less aggressive on clusters
that are geared towards performance. Add support for per cluster
wake_up_idle flag to allow greater flexibility in placement policies.
Change-Id: I18cd3d907cd965db03a13f4655870dc10c07acfe
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
GPU RBCPR clocks needs to registered separately, as GFX CPR would require
the rbcpr clocks to register the regulator handle.
Change-Id: I59def76e7dd69600be8faf47eb867a97ab04739e
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Change SVS clock for vfe_clk_src from 384MHz to 480MHz.
Change-Id: Ieff3fed56bc669e5b36022bb3282f17120cf949f
Signed-off-by: Ramesh V <ramev@codeaurora.org>
In the current implementation DSI timing db(Double Buffering)
mode is set as part of DSI controller initialization. This is
causing DSI command transfer failures when sending panel init
commands during device resume for some platforms like SDM660.
Since on these platforms DSI_CMD_OFFSET and DSI_CMD_LENGTH
register has now become double buffered and hence would need a
control flush, for these registers to take effect. But control
flush in driver does not happen until panel init is done properly.
So removing the programing of timing db registers from DSI host
initialization sequence as this is already taken care during dynamic
refresh rate change usecase.
Change-Id: Ia08788127f4d132530e3f3a28efd9d7ee9869483
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Following are the changes made:
1. Add CLK_IGNORE_UNUSED flag for some clocks which are not
supposed to be disabled at late_init_level.
2. Fix clock measure debug mux value for mmcc clocks.
3. Add mmss_mdss_byte1_intf_div_clk for mdp.
4. Fix usb ref clocks to branch voted.
Change-Id: I06396c73f7855acfac283abe576e0b4cc1a92bd5
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Some platforms may use external gpio to enable and disable backlight,
and we may need to invert this gpio according to HW design,
so add support for that.
CRs-Fixed: 1109294
Change-Id: Ib5e895eebcc38d185e8b703c3d895781b43c58c7
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
For 30fps rotation, it is only required to perform a commit every other
vsync for a 60fps refresh rate panel. Rotation time for a 4k resolution
will take approx 12ms including SW overhead, and leave very little room
to perform a frame commit in fb driver. One way is to delay the
rotation time by enabling traffic shaping for 4k@30fps content so that
the it will take approx 15ms to finish, and that will force the frame
commit into next vsync time slot and thus matching the cadence of
30fps commit time.
CRs-Fixed: 1100633
Change-Id: I0aecfe767cd77140f75bb13c4fe6f9267d4d911e
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
qpnp_pin_debugfs_create() is going through all the child nodes
to create debugfs entries whereas the allocation for q_spec is
made only for available child nodes. This leads to a null pointer
access when CONFIG_GPIO_QPNP_PIN_DEBUG is selected in defconfig.
Fix it by using number of gpios available under each gpio chip
which was populated from the available child count already.
Change-Id: I17cbeeba158d34180763087103da4b03e01f7c90
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Add 710MHz to A540 GPU power level on msmcobaltv2 as per
the hardware recommendation.
CRs-Fixed: 1085733
Change-Id: Iceff8329caf939ad3b34d6a750f056026853c76a
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>