Add initial device tree and socinfo support for SDM658 SoC.
Also add device tree and socinfo support for SDA variant.
Change-Id: I3d8860ed57c859d35eaf4d77f0064091993a1bcf
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Some smd-rpm and voter rpm clocks are critical for system booting
and should not be gated until a unused clock tree late_init level.
So add support for handoff functionality for system critical rpm
clocks by using CLK_ENABLE_HAND_OFF flag.
Change-Id: I9f9674a25fc5f7a2bc9b5672b00716b82223b06b
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
Add ipc logging for ipa driver for different use cases
such that ipa driver can direct messages to ipc logging
buffer which can be found in crashdump.
Allocate ipa_low IPC only when needed,
for data path and other frequent log prints to avoid
performance penalty.
Change-Id: I5350a015b587b6cbcbfdcebe523376a8e50fc06c
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Sometimes after failing RPMB access due to card in bad voltgae state,
If issue USER parition access request,it fails as card is already in
bad state. Fix this by adding error handling to mmc_blk_part_switch()
and by resetting the block whenever partition switch fails.
Change-Id: I245683b0b0a06b13938036dbc37e87ed1ef70b89
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
Enable CPZ feature for A512 GPU on sdm660.
This is required to process secure conent by GPU.
Change-Id: Iaaedde4e56e331379be0b44b23527df0d5807f55
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
MMC_PM_WAKE_SDIO_IRQ flag is used by platform driver(sdhci-msm
here) to determine if SDIO wakeup IRQ needs to be enabled
or not. If this flag is not removed in every mmc_resume_host,
then while suspend, platform driver will configure the sdio
wakeup IRQ even though wlan is disabled from UI.
This flag can be enabled by wlan driver before entring into suspend.
In this case since Wlan is not enable and thus not entering WoW mode,
pull up present on this SDIO GPIO line will pull the line high (which
otherwise is pulled low by wlan firmware in WoW mode and triggers
interrupt by pulling it high in WoW mode) which eventually will
trigger a false SDIO wakeup interrupt thus breaking the suspend
everytime.
Hence disable the flag everytime in mmc_sdio_resume and let
wlan driver enables it (-by sdio_set_host_pm_flags)
before entering into suspend if needed
for sdio wakeup part.
Change-Id: Iecf9eef4d91a741116bc8b8bb59c49ae7f2891fd
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This patch enables the deferred resume support which would
prevent initialization of the card each time the system resumes.
With this change, the resume process would only be initiated if
a request is received.
Following scenario can occur:
1. device runtime suspended, system suspend is triggered
When resumed, the device would not be resumed until a
request is received.
2. device is runtime active, system suspend is triggered
When resumed, the device would be marked as BUS_NEEDS_RESUME
and actual resume would happen, when a request is received.
At this point, the device may also enter runtime-suspend or
system suspend may also occur. In both the cases, since the
device has not been resumed, it won't be suspended again.
However, the platform device would be runtime suspended
and resumed as before.
It can so happen that the card is removed even before a
request is received. In this case the device would be
resumed and card would be removed from core layer and
upper layers would be notified.
In case of SDIO cards, this change would not have any effect
since manual resume would be enabled for devices supporting
a block read/write commands.
CRs-Fixed: 561382
Change-Id: Id39befea109ee24864dfde0898395b972d0a1b3a
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Glink pkt client is calling glink_queue_rx_intent even after calling
glink_close, this result in calling with invalid handle.
glink_queue_rx_intent is called with mutex lock and dev handle is
set to NULL right after call to glink_close.
CRs-Fixed: 1098097
Change-Id: I6fc8e7d91a6d27fe6602e8aabcffcdbfb1316c97
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
variable size is output variable and is not initialized,
printing it can lead to information leak.
variable size is removed from log message.
CRs-Fixed: 1093837
Change-Id: I95cf227bb82a2ee7c6f43db151f75a942e8e55ce
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Avoid printing of the error messages and register dumps,
incase of data endbit errors like other data errors.
Change-Id: If8ed082cc97a895cfbf959201c579914d5768b23
Signed-off-by: Pavan Anamula <pavana@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
API check the wlan firmware ready status in icnss platform
data and return the status(true/false) to caller.
CRs-Fixed: 1106520
Change-Id: I1246e6c213011d73ade5078c07bb2190135e54ec
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
During suspend/resume, the driver writes to AUTOBKOPS_EN bit in
EXT_CSD register of eMMC which is R/W/E. Even after power off
R/W/E bit will retain it's value, as it will be stored in NAND
flash. Multiple writes can wear out the specific NAND block which
store the system data(AUTO BKOPS bit in this case). So to avoid
this, enabling/disabling of autobkops has been removed from
suspend and resume. The background operations, if any, will stop
when sleep command is sent during suspend process.
Change-Id: I8aa7eda86beafacb3337be81c5a7f1f1e86f4998
Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org>
In targets with dedicated writeback paths, the FPS isn't
set properly for BW calculations for WB cases. Setting
the FPS to default frame rate, for such cases.
Change-Id: I83c545f3344ee5fc3d356f0e08d3c20453e22b31
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Commit dd7ad27eb3de6b088b6525b066c40f5a29ac4c60 ("msm: mdss: fix
race condition between iommu attach and sending DCS cmds") protected
the iommu attach/detach to fix possible race condition between the
display thread and DCS cmd sending from ESD or some other thread with
iommu_lock. But this still leaves possibility of race condition based
on iommu_attached status flag.
-> Display thread finishes the attach and releases the iommu lock
-> DCS cmd thread gets the iommu lock and checks iommu_attached
status before display thread could change it.
Protect the iommu_attached status variable along with iommu
attach/detach to avoid such cases.
Change-Id: I42d0ced5cbfd741cf02ad71c80c4f01dde37f647
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Memset commit structure in compat path ioctl as some
of the pointer variables might go uninitialized, if not
explicitly initialized by the userspace. These uninitialized
variables contain garbage values which can further result
in kernel crash.
Change-Id: I09518a43438e27751f2b918d682f551550c4342e
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Added sysfs node on mdss to get fps value at runtime.
The calculation is time based where in mdss driver
counts number of frames transferred for every 1 second.
Change-Id: I6f38298d066852d1a41cb90167aa41f594eec9c0
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
WB timeouts are seen when WB is connected after 4k HDMI
use case. This was seen when WB is using the same mixer
which was earlier used by HDMI, with 3D Mux enabled.
Since 3D Mux registers are double buffered, the best way
to clear control operations is to re-use the control path.
Hence allowing WB to choose the first available control
path.
Change-Id: Ie599a6d58f461ee7905402bf0a948ac829d8de12
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
DSI phy v2 is used on msm8996 and sdm660. Update the phy
timing device node property to mention the correct DSI PHY
version. This will ensure that proper naming convention is
followed across msm8996 and sdm660 target.
Change-Id: Idd88110ddebf2dd38cfe375ac1bf3804ce4bb4d0
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
FB driver will call this function even if there is no MDP.
mdss_mdp_get_mdata will return NULL in that scenario and needs to be
checked.
Change-Id: Icebed1bc9b4da214fec2ca924590403d1656fa5d
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Add fence name to the warning message instead of sync pt
data fence, to help in debugging sync fence timeout issues.
Change-Id: I4bee08786ff3fc7f6109afcf923df46e76ad1619
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Update structures in mdss compat layer with the new
interface changes in mdss headers, so that 32_to_64
backward compatibility is maintained.
Change-Id: I1b75ee6d0d13438fedbaf045a3cdc7f47bf32ba2
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Add cpufreq device node for SDM660 target which
helps cpu core frequency scaling.
Change-Id: Idca3fd5959ac83bfd9abaf929f4c6fc405a6bf10
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Dynamic fps should be set to max fps supported if it is out of
range. Configure the clocks based on the max fps set.
Change-Id: Ied2d4803c0840be00929b7093601aab39930b3e9
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
At present the ctl->offlock mutex is used for synchronization
between ESD thread and OFF sequence. Using the same mutex
for synchronization between add_vsync_handler() and OFF
sequence was causing unnecessary synchronization between
ESD thread and add_vsyc_handler(). To improve performance
a new mutex, cmd_off_mtx is used for the second case.
Change-Id: I7d0b0690672869937d82df68ea9f571023fc88d1
Signed-off-by: Shalini Krishnamoorthi <shakri@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Initialize the pan_name array to 0 before trying to copy
data from mdss_mdp_panel array to prevent junk values
being wrongly parsed by strnstr function and return error
when panel name is '0', this would let us read the primary
panel interface from device tree.
Change-Id: I07bfc1f7195f6cc61dfd3e470d2e3e3e43c0049d
Signed-off-by: Shalini Krishnamoorthi <shakri@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
'commit 3bf808d38b78b55eb2bf686555a0c2f371eccdf2 ("msm:
fb: add mdp foot switch for multiple splash displays")'
considers DSI0 and DSI1 as separate displays even if
split display is enabled. So the number of displays
are calculated as 2 whereas the driver considers this
as a single display. This causes MDP clocks to remain
ON. This change corrects number of displays calculated
by checking for split display.
Change-Id: Ie0d3dbbcb93cc86b88a8b903fd1f7ccd89a8a871
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
If there are multiple splash displays enabled in LK, mdp foot switch
needs to perform multiple times. Otherwise, clock resources are not
enabled/disabled symmetrically.
Change-Id: Iaca1163f44883be9e027460c48bd0ebc0ec2266a
Signed-off-by: Camus Wong <camusw@codeaurora.org>
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Camera cpp node need to trigger/de-trigger HW mode for CPP GDSC
so add support for the same for the required targets.
Change-Id: I92eb57e51b2078c493fb9acc8dfc3dff1a02ef84
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
SDM630 platform can support either PM660l or PM660a PMICs,
add support for the same.
CRs-Fixed: 1106556
Change-Id: I82e35ef278ea5900c4023ab714cbf31f8c01151f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Multimedia and Graphics clock controller is required to be enabled for perf
defconfig. Also enable OSM clock controller for CPU clocks.
Change-Id: I6d9f7b6a40e5899af4104949c59a9b9fee87587c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The total number of rpm clocks are required to be updated to the correct
index else it would not send RPM the first vote. Also update the bimc mux
sel value. Add an extra mmssnoc_axi active vote of 19.2MHz.
Change-Id: I502c72a18a3e3493f44cdf72f48efcbae41efb7b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The values passed from device tree overrides the default values
defined in the topology code.
Change-Id: I323b43a228f9bc61cad079d1ac76940af209a1c5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Add support for building new sdm defconfigs.
Change-Id: I7d1ae9fb0a3888a92ee4df850061afe3d2e378c6
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>