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>
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>
The OLEDB driver provides the regulator interface to control the AVDD
bias voltage for AMOLED display.
Change-Id: I0b2a363f26f5ca3949892b2bbba3ff4d80184de4
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
The OLEDB module provides the AVDD bias supply for the AMOLED display.
The supported voltage range of the bias is 5 to 8.1V. This driver provides
the regulator interface to control the bias voltage.
Change-Id: Ide4af995ca9fd12b3467de42e5d08eddc3981344
Signed-off-by: ansharma <ansharma@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>