Update the PLL_LPF_CAP values to latest recommended settings.
This fixes any PLL locking issues.
Change-Id: I206c9cc343ac435161393445714de2e03a64aaae
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
If a scm_call request to shutdown a TA fails, the TA is not shut down
and still in use, and the resources aren't necessarily leaked. Since
shared memory are still locked in this situation, ion shared memory
cannot be released, otherwise XPU violation occurs. Only need to
release shared memory if TA is unloaded success or that TA cannot
be found
Change-Id: I971485fb541193f77960cc7ca14b5b09de938a43
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
While releasing contexts take a reference to context inside read rcu
lock to avoid racing against context deletion. This will avoid using
dangling context pointer in device_release_contexts.
Change-Id: I76e787f6dde5a324fec23e81829174bd28134c6c
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Configure QMB data movers max reads and max writes. Additionally, select
the client's QMB instance according to the destination, PCIe or DDR.
CRs-Fixed: 974578
Change-Id: Ieb7061dbb6c024bc707f66c7ef07178ed1960fba
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Add status='ok' in PIL device tree nodes for MSMCOBALT to support partial
goods loading by bootloader.
CRs-Fixed: 973659
Change-Id: Ia89a686648189bac68e9060e39c931da4b4b7397
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
This is done to avoid a race condition between a context getting
detached and destroyed before the GPU has executed the pt switch
commands.
CRs-Fixed: 987587
Change-Id: I5c485e41a23b288f27e607b3e3ed5bf66cbad98a
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
In order to provide an identical ELF file format between MSM
and MDM, the IPA core driver needs to utilize p_vaddr field as the
destination address for the FW loader.
Change-Id: I818fbe37601dbd4250fc428223a4a1b72b91487a
CRs-Fixed: 987522
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Add support to make scm_calls to TZ to inform modem start
address and size so that TZ can unmap this range to avoid
speculative access.
Change-Id: I4640ddab56991522870e9879d17fe5732dc40223
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Signed-off-by: Arun KS <arunks@codeaurora.org>
MDP driver calls add_event_timer multiple times, resulting
in creating multiple event timers. Due to this irqbalancer
changes MDP irq's affinity to different cpu. Ensure that
add_event_timer is added only once for MDP irq.
Change-Id: If0425ef5a3b3ce56c40da52ff3ced6658f05734a
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Release the session before the file data is freed to
allow for session informaiton to be retrieved from the
file data.
Change-Id: I78c36d7b34a141c6162a145f7447040395858b64
Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Sending zero backlight to AD core will cause a divided by zero
case, which should be avoided. This change adds a check to
prevent zero backlight from been sent to AD core.
CRs-Fixed: 985303
Change-Id: Ida5115edc61dea9855be89186af3faae040fd711
Signed-off-by: Ping Li <pingli@codeaurora.org>
Correct CE clock setting for crypto drivers, core_clk_src should
link to voting clock; otherwise, ce1 clock is set to be only half
of 171M HZ during crypto operations.
Change-Id: I0d9e048381a83d4788bf4f700d788137b59bd368
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Define all supported 10 bit RGB/YUV formats for linear/UBWC and set
the appropriate parameters for register programming.
CRs-Fixed: 984465
Change-Id: I37f55f76802bf295f2c48040843637e37663ca41
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
[dkeitel@codeaurora.org: fixed minor whitespace conflict.]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Exhibit supported formats of all pipes and writeback block through
sysfs node of mdp capabilities.
CRs-Fixed: 984465
Change-Id: I1dc11268995e7f3d8efdc7d3e7cf3a1951ff44a5
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
[dkeitel@codeaurora.org: fix minor conflict.]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Msm cobalt mdss pipeline supports 10 bit color space conversion.
Change adds support to enable 10 bit csc block.
CRs-Fixed: 984465
Change-Id: Ib859ade710b9cb6dc5565548db6f531c84f3bc5a
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Msm cobalt has newer version of mdss block which supports qseed3 module
which is needed for scaling, sharpening. Change adds support for qseed3
on msmcobalt.
CRs-Fixed: 982712
Change-Id: Ibee9b270d483928dce1836f085785acbb8a1947b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
msmcobalt support newer version of mdss hardware. Change adds support to
mdss driver to handle newer mdss version and capabilities of this version.
CRs-Fixed: 979566
Change-Id: I5f8fe54547e808233ac9873aeeaa36455b2b01e8
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
[dkeitel@codeaurora.org: fix minor conflict in documentation.]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Fix to restore the ping pong split configuration
after power collapse.
Change-Id: I9109081cbde941b55ee889707bda35af7d303cf0
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Updated characterization has shown the need to modify
certain calibration settings for hardware blocks within
the CPU subsystem. Modify these values.
CRs-Fixed: 930377
Change-Id: I601802746224e2abb43fd0b3aedb09e049062adf
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
The OPP table containing the frequency and voltage mappings for
the gfx3d_clk_src is used by the GPU driver for limits management
on MSMCOBALT. Enable the clock support to populate this table.
CRs-Fixed: 986567
Change-Id: I478e7e90337060e92f07e6a3ee0f7d401b796f24
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add rpm-stats node to enable logging used for vddmin
and xo shutdown debugging.
CRs-fixed: 980681
Change-Id: Ibbfae3dc4a4023a2e99e27cae4c6cfd6822baab8
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Fix the condition that was causing the remote heap from
not being freed.
Change-Id: I825e813f4f4e7c3cecaf9150d9ef40ff40cfb5a2
Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Currently msmpower off driver is not checking whether device
is in secure boot or not. So use generic API scm_is_secure_device()
and take appropriate decision to enable download feature.
Change-Id: Ic7bbe1f7c9b839ad5d1d07a6583f6a1b76bf8962
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Currently gladiator error reporting driver is independently
checking whether device in secure boot or not. So use
generic API scm_is_secure_device() and take appropriate
decision to enable certain features.
Change-Id: I89a7bdd21373ffcfec6d90ffbdd29ce8ed3dde88
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Add new scm_is_secure_device() API, so that
all platform drivers can check and take appropriate
action for secure and non-secure devices.
Change-Id: I5569f4aaf4bcbec2922a7745ec0fdc1ab423cc23
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
The following deadlock is observed.
Core 2 waiting on mapping->tree_lock which is taken by core 6
do_raw_spin_lock
raw_spin_lock_irq
atomic_cmpxchg
page_freeze_refs
__remove_mapping
shrink_page_list
shrink_inactive_list
shrink_list
shrink_lruvec
shrink_zone
shrink_zones
do_try_to_free_pages
try_to_free_pages(?, ?, ?, ?)
__perform_reclaim
__alloc_pages_direct_reclaim
__alloc_pages_slowpath
__alloc_pages_nodemask
alloc_kmem_pages_node
alloc_thread_info_node
dup_task_struct
copy_process.part.56
do_fork
sys_clone
el0_svc_naked
Core 6 after taking mapping->tree_lock is waiting on zbud pool lock
which is held by core 5
zbud_alloc
zcache_store_page
__cleancache_put_page
cleancache_put_page
__delete_from_page_cache
spin_unlock_irq
__remove_mapping
shrink_page_list
shrink_inactive_list
shrink_list
shrink_lruvec
shrink_zone
bitmap_zero
__nodes_clear
kswapd_shrink_zone.constprop.58
balance_pgdat
kswapd_try_to_sleep
kswapd
kthread
ret_from_fork
Core 5 after taking zbud pool lock from zbud_free received an IRQ, and
after IRQ exit, softirqs were scheduled and end_page_writeback tried to
lock on mapping->tree_lock which is already held by Core 6. Deadlock.
do_raw_spin_lock
raw_spin_lock_irqsave
test_clear_page_writeba
end_page_writeback
ext4_finish_bio
ext4_end_bio
bio_endio
blk_update_request
end_clone_bio
bio_endio
blk_update_request
blk_update_bidi_request
blk_end_bidi_request
blk_end_request
mmc_blk_cmdq_complete_r
mmc_cmdq_softirq_done
blk_done_softirq
static_key_count
static_key_false
trace_softirq_exit
__do_softirq()
tick_irq_exit
irq_exit()
set_irq_regs
__handle_domain_irq
gic_handle_irq
el1_irq
exception
__list_del_entry
list_del
zbud_free
zcache_load_page
__cleancache_get_page(?
So protect zbud_alloc/free/reclaim with spink_lock_bh
CRs-Fixed: 986783
Change-Id: Ib0605b38e7371c29316ed81e43549a0b9503d531
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Prevent driver from disabling the tear check when
going to LP1 state. This is needed for certain
panels in cases where there are more than one
frame update in LP1 state.
Change-Id: Ib80f06e0609d9d49584118504adf87da44455563
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
TRB Pool is allocated and de-allocated per endpoint when USB endpoint
is enabled and disabled respectively. In some instance, it has been
observed that usb_ep_disable() (for rmnet case, (u_bam.c) it is called
from set_alt or resume context i.e. interrupt context) and usb_ep_queue()
(for rmnet case, (u_bam.c) it is called from work queue context) are
racing for USB endless endpoint when USB bus suspend and resume is
happening quickly. It is causing NULL pointer dereference while accessing
TRB pool. Fix this issue by moving check if USB endpoint is enable or not
after acquiring dwc3->lock and before calling __dwc3_msm_ep_queue() which
prepares endless TRB.
CRs-Fixed: 986071
Change-Id: I842f6a82f3c454111ba68661cf835e86022e3e18
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The uapi directory shouldn't contain compat definitions,
so move this file out of there.
Change-Id: Ieef35ec02157c253a137c1b1bce3c6518c7f1b31
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Currently for PMI8996, IBB_SPARE_CTL is configured to slower PFET turn off
while exiting out of TTW mode. As per the hardware documentation, this
setting needs to be modified to faster PFET turn off for both PMI8996,
PMI8994 and PMI8950. Modify it to improve IBB efficiency.
CRs-Fixed: 966167
Change-Id: I0693eb275eeab5c349b455da31a96ba6dbeb4cf9
Signed-off-by: Harry Yang <harryy@codeaurora.org>
As per the hardware documentation, update the following register
configurations in AMOLED mode.
IBB_NONOVERLAP_TIME_1
IBB_NONOVERLAP_TIME_2
IBB_SPARE_CTL
This is to improve the IBB efficiency.
CRs-Fixed: 966167
Change-Id: I127a2b895bfce4afcdac1ad6aba051347d621cbe
Signed-off-by: Harry Yang <harryy@codeaurora.org>
The transport "smd_trans" is required if far end is running SMD
instead of Glink. If far end is already running Glink, this property
is ignored in Glink layer and communication will be through Glink.
CRs-fixed: 986398
Change-Id: I76b59a9782ab77e1ee3b37afb1db6ec01340ea33
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
Commit 0717dcb898a085f863f65252d1ceec4e026e1183 ("uapi:
msm: mdp: Add color space in mdp_input_layer") adds
the csc params member on input layer but does not
pass the same configuration to sspp pipes. Post
Processing module will select the default CSC table
without this configuration.
The CSC configuration on MDSS hardware is not double
buffered. This needs additional input layer validation
check against CSC reconfiguration on staged pipes.
Change-Id: I3e6ea00fc426501cbbbeffa4545ed9cff711dcb4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
When underlying channel fails to send the APR buffer to the remote
end, APR should put the Tx buffer back into queue to avoid memory
leak.
CRs-fixed: 979283
Change-Id: I4f94daa3c9be748a30d532cf9cc8f3aa2284c060
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
There's a possible null pointer deference if APR open fails.
Add the fix to handle error case cleanup gracefully.
CRs-fixed: 979283
Change-Id: I4c0cc05bf08d2eae5c27a1dba0a33f4183f81cf3
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
Retention modes for testing only. The actual modes supported
would be a subset of these modes
CRS-fixed:975790
Change-Id: Ida27125d337f2a15ac152f49a14bdde254d3e535
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
'start' and 'stop' in the snapshot ringbuffer header are supposed to
be the dword offset that the data starts and stops at respectively.
For the current ringbuffer which is parsed 'start' and 'stop' are
equal to the CP wptr but all other ringbuffers are just dumped from
start to finish so 'start' and stop' should be 0 and KGSL_RB_DWORDS.
And having said that, why are we bothering to make the current
ringbuffer special anyway? In every case we are dumping the entire
ringbuffer so we might as well dump it in order. While messing about
in this code go a few more steps to make sure that we don't dump the
same ringbuffer more than once.
Change-Id: Ic0dedbada33adda660b7f0bf5eb165b0aa159004
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
HPS/DPS sequencer type is configured statically for PROD EPs
according to ipa3_ep_mapping table. This change adds the ability
to set a different HPS/DPS sequencer configuration for PRODs,
which mainly be used in testing
CRs-Fixed: 986167
Change-Id: I47dec10e757694596385f5118486603c702fe302
Signed-off-by: Nadine Toledano <nadinet@codeaurora.org>
Add a l2pc-cpu-mask-latency in device tree. This latency
is used in kgsl_pwrctrl_update_l2pc() API to avoid L2PC
on masked CPUs by giving reduced latency value.
Change-Id: I0447977bce5ed5c09a863b03bb42b9428686a9f5
Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
When disabling agregation on Q6 pipes during SSR
there is a possibility that index -1 is used. Make
a change to skip processing if ep index is not valid.
Change-Id: I7578e582d1eda0b181225af9d00ec8ad5fbe372d
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
frame buffer allocated in recovery mode is not mapped for MDP3 pan display
control path resulting in IOMMU fault. Add mdss_smmu_map_dma_buf call in
mdp3_ctrl_pan_display and use mapped virtual address for DMA.
Change-Id: I4d37ccb86eaea4690862bef76ee3762ff952892a
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
This patch updates the stale pointer corrupted at
specific ssid ranges.
This patch also addresses wrong range tools value
updation.
CRs-Fixed: 980487
Change-Id: I2b8afcef25dceb76118b803c67f4c5656feae82b
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Deadlock is observed in zcache reclaim paths due to
different locking sequence.
Core#0: Core#1:
|spin_bug() |do_raw_write_lock()
|do_raw_spin_lock() |_raw_write_lock_irqsave()
|_raw_spin_lock_irqsave() |zcache_rbnode_isolate()
|zcache_flush_inode() |zcache_load_delete_zaddr()
|__cleancache_invalidate_inode() |zcache_evict_zpage()
|truncate_inode_pages_range() |zbud_reclaim_page()
|truncate_inode_pages() |zcache_scan()
|truncate_inode_pages_final() |shrink_slab_node()
|ext4_evict_inode() |shrink_slab()
|evict() |try_to_free_pages()
|dispose_list() |__alloc_pages_nodemask()
|prune_icache_sb() |alloc_kmem_pages_node()
|super_cache_scan() |copy_process.part.52()
|shrink_slab_node() |do_fork()
|shrink_slab() |sys_clone()
|kswapd_shrink_zone.constprop |el0_svc()
|balance_pgdat()
|kswapd()
|kthread()
|ret_from_fork()
The deadlock happens because alternate sequence are
followed while taking
zpool->rb_lock (protects zpool rb tree), and
rbnode->ra_lock (protects radix tree maintained by rbtree node)
Fix the sequence of locks being taken to avoid deadlock.
Change-Id: I32db23268f63eb8eb5aee30e4462c190e2e02f48
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Recommended value for A306a VBIF out registers is 0x10.
Change-Id: I5ea3f4203b7649007fa62bdfe70a41c8d86432ef
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>