The performance Monitor Unit on the kryo processor
has additional performance events over the architected
events in ARM processors. This adds support for these
additional events.
Change-Id: I90356b7d2cfebd9d985ec6f92c6d000be9911a7c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution and remove check_event &
map_event functionality to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Make some functions global so they can be referenced
by chip-specific drivers.
Change-Id: If20de0b9191c2cd32c48da5c0b8b5bc60ac4a97b
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution and move changes
in arch/arm64/include/asm/pmu.h to include/linux/perf/arm_pmu.h
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Use existing avaialble PMU counters if there are multiple requests
for counting CPU cycles.
Change-Id: Icc3a7a5859ef60ab56ffcb1339e3734c3885ede2
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Add the exported function into the header so it can
be used by other drivers.
Change-Id: Ic1c2fba3efa1d091033d66e25ec59627134b065f
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
perf trace user provides a debugfs node to which a marker string
can be written by userspace. This will create an ftrace and perf
entry containing the current value of L1 and L2 enabled
performance counters and the marker string. This allows usermode
programs to write snapshot entries at specific places in their
code, then see the difference in performance counter values
between those locations.
Change-Id: Ib6f6c6e7333f58fd98c4c0b6ed3d3bbf84a8f830
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
The perf debug directory is exported so that other
drivers can place nodes there.
Change-Id: I570f4b61267ce4ef20275852ec769464b7f68827
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution and move changes
in arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Tracecounter code was not disabling counters as early as possible
and enabling them as late as possible. Refine the logic so cycles
spent inside the handler are lower. This results in more accurate
per-process counter values.
Change-Id: I5a83028da3c747c30a9e5a0ea3003638beadffec
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Due to the mismatch between counter values saved across CPU hotplug
by perf and tracecounter logic, incorrect values are calculated
for a cpu's first entry in trace buffer.
Ignore the first entry when CPU comes out of hotplug and set previous
counter values in this scenario.
Change-Id: I0a61943d14aa3bc96b50f7ed05e25c592be9aa35
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Bring all cores online before doing a force reset for PMU.
This is required in order to handle corner case related to
freeing of IRQs for offline cores.
Change-Id: I091d9039e6554099ff4dd80d4a69cabe8eff3138
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
[satyap: trivial merge conflict resolution and move changes
in arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Create debugfs node to clear PMU and some internal variables
used by Perf code. This provides the user with a recovery
path in case of PMU related unexpected error scenarios.
Change-Id: I4e62a51043d7dcaa21b551ce6a6715486ef46cca
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
[satyap: trivial merge conflict resolution and move changes
in arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Allow user-mode applications to use the performance
counters for debugging and performance analysis.
Change-Id: I3985c0fccfe925c50ace5d33435f6f69b31e07a5
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Provide a mechanism to track which msm perf patches
are present in a kernel. Some kernel branches do not
include all patches which causes problems trying
to debug perf issues. This framework provides a way
to keep track of which patches have been included
in a build.
Change-Id: I7d3e3022dcdec6204f8d2ba3c49fc37c674db221
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Preserves the bitfields of PMCR(AArch32)/PMCR_EL0(AArch64)
during PMU reset. Reset routine should write a 1 to PMCR.C and PMCR.P
fields only to reset the counters. Other fields should not be changed
as they could be set before PMU initialization and their value must
be preserved even after reset.
Change-Id: I835bf41f89a8a4691e996e6766aed4b4c8ef4368
Acked-by: Abhiroop Basak <abasak@qti.qualcomm.com>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This change update dload cookie if cdev->desc.iSerialNumber is already
available instead of trying to get string descriptors. It also adds
check against possibility of string descriptors being NULL to avoid
device crash.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Enable these defconfigs as they help with protecting the free pages,
modules and kernel text segment.
CONFIG_ARM64_PTDUMP
CONFIG_DEBUG_SET_MODULE_RONX
CONFIG_FREE_PAGES_RDONLY
CONFIG_KERNEL_TEXT_RDONLY
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Add changes to update camera drivers to:
1. Update necessary Kconfig files to support camera driver
compilation.
2. Support minor changes to V4L framework.
3. Export uapi headers to header_install export location.
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Add all camera drivers by picking them up from
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056 (e70ad0cd)
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Unset the HPD state on receiving a suspend event, and ignore
any HPD interrupts that are signalled while panel is in a
suspended state.
Change-Id: I21955079522e0688cd4cee17dae32f5e6d8496ab
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
The step version is different between msm8996 and msm8937 even
though the major/minor versions are the same. Update the DSI PHY
and clamp register programming for msm8937 by checking for the
step version to avoid incorrect DSI register programming.
Change-Id: Ia9582b2779f40429586e8709bb73c9a5c79bd6c5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Simultaneous buffer maps with read and write permissions are
possible due to the asynchronous nature of MDSS driver.
Client stages the same buffer on MDP & ROTATOR. It calls the map
API for both at the same time. Due to concurrency, the source buffer
is mapped by MDP before and is ref-counted. ROTATOR API called later never
updates the permission which is required for dst buffer.
This leads to permission fault. Requesting the map with DMA_BIDIRECTIONAL
flag to fix the issue.
Change-Id: Ieb819820b19d163fee541dd571c5a58dc78be7d3
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Fix compilation issues with unsigned division. Also build
errors are seen for 32bit compilation as local variable of
mdp_overlay in function mdss_mdp_overlay_get_fb_pipe has
huge size which crossing the 1024 limit. Use heap instead
of stack in this case to fix the issue.
Change-Id: I67e8498421d2e116e77076637716708cfc289c96
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
unify smmu probes for qsmmu and arm smmu since most of
the functionality is common.
Change-Id: I2a3ef5c95bf0008d9e1869decb25d7e3043a0786
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Display Steam Compression (DSC) use-cases requires parameter calculations
that affect MDP and DSI separately. Current implementation is not modular
and calculates all the parameters in one big subroutine. Due to this, an
issue has occurred where parameters that affect DSI relies on picture
width where as DSI parameters should be calculated only based on
uncompressed width to a particular DSI controller.
Also current MDP driver tries to service DSC setup for all different
topologies in a single subroutine and has become very error prone.
Modularize MDP DSC setup so that it is easy to maintain and also add
support for partial update for 4K DSC split-panel.
Change-Id: I7057e6a5a22a72a9a216e5bc9f7f946675bfbbb8
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
MDSS software should trigger frame timeout when command mode
interface recovery is in progress. After this new place for
event, there is a small window where wait4pingpong and recovery
path both can trigger this event. Use atomic_add_unless api
instead of read and dec so that it would add protection and
avoids timeline update multiple times for same frame update.
Change-Id: I412c6341ac4d547acde914409481e9b57b2b88f2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Adding initialization of appropriate flags related to QoS
and UBWC settings in MDSS capabilities for msm8937.
Change-Id: I16aaf0dd39ce6150183f9b71d4573fdbad62a1da
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
During kernel boot up, the splash memory is unmapped and released
at the beginning of first display commit during overlay start. By this
time, MDP will not start fetching the new buffers that are queued as part
of first commit. This can cause IOMMU page faults on the splash memory
since the buffer is unmapped but IOMMU is attached as part of overlay
kickoff. Hence, perform splash cleanup after waiting for a vsync
during kickoff cycle.
Change-Id: I0b6656f1cc2be9d96fd29e92b99b5aaed94eeb54
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Modify the Rotator and WFD OT setting as per recomendations
from systems team.
Change-Id: Ic523230ff0343bbac6c001080cce88acda4b3c7e
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Add support to configure pluggable feature through device tree,
but not hardcode inside driver.
Change-Id: I1aaf8a65c1910e22bdaf678d0d02d7fe791937bf
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
For PHY v2, the phy timing structure is different than PHY v1.
This change updates the phy timing structure with the latest
calculated PHY timing parameters for the given panel and refresh
rate.
Change-Id: Ibed32af5578a6dea5eb0f77d3bd0f102db6161dd
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
The doze_suspend and stop state resets the
recovery handler. It is required to register it
again in doze mode because there can be frame
update in this power state.
Change-Id: I1bef7cdd63f21698aca18d326074ac3a0e4e5de4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Use busy wait while waiting for DDC read and write to complete.
Using completion APIs to wait can result in thread to schedule
and waking up the thread back can cause a delay of 30 - 40 ms
or more. HDCP 2.2 authentication protocol uses some strict
timeouts and can be as low as 20 ms. Avoid any possible
scheduling and use busy wait to complete the DDC transactions
within allowed time.
Change-Id: I1c12d594a6e1e671fbaa4d197e375070deedc78d
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add pluggable information into panel info to let other modules
know that this interface supports HPD (Hot Plug Detect) and can
be dynamically connected or disconnected.
Change-Id: I8322b60c337cd2f46a4a500ad1a6083875f6206b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
The programming of the DSI Phy timing registers are dependent on
link frequency. In the current implementation, these values are
pre-computed statically based on the link rate required for a particular
panel. This approach does not scale very well, especially for use cases
when dynamically changing the refresh rate or resolution for a panel.
To address this, add support to dynamically compute the value for dsi
phy timing registers based on a particular link rate.
Change-Id: If1ff545318a540baee66f5357c519d7f428510c1
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Moved new file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Notify user space with only backlight changes that pass the backlight
threshold check.
Change-Id: Id2fef0a2d9c883d0e68a5ad6be699858be6898ae
Signed-off-by: Ping Li <pingli@codeaurora.org>
Commit be5fd56b0dbcb6a80b0e0322e77a1d368a840746 ("msm:
mdss: use usleep_range instead of msleep in mdss util")
replaces the msleep with usleep_range but does not fix
the sleep duration. That leads to invalid wait time
after vreg pre/post on/off operation.
Change-Id: I47ae12eda393fd6367e7045a9bd91add3bb4a942
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflicts]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
During mode switch, split_mode was set to pp split by checking
if the panel is in split_mode and MDP supports pp split. This
leads to faulty configuration as pp split should be set only
when the panel setting has pp split and MDP support it. Add
proper checks to set the split mode correctly.
Change-Id: I2f2c10bebcb3ce7d38c37ff09a25d864a89e646a
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Secure display works with default orientation. Fail
rotator request during secure session to avoid non-secure
or invalid buffer fetching from rotator smmu.
Change-Id: If99481c8a31a466166edb2b393fef19bc2a983b9
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Apart from authentications start, if any other work is already
queued, do not return any error in that case as the work is
going to run eventually. This doesn't apply for authentication
start as last session should have been closed before new one
is started.
Change-Id: If5f61f05758135d303974f8bd824ffcc9387259d
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add support to let the user select and switch to a particular
resolution over HDMI.
Change-Id: I8cd056fe120c9a459e9df22d3121203278973f4c
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add necessary buffer size checks for deinterlace layers during
validate. Invalid src rect configuration on mdp hardware was
leading to unmapped memory access. A valid bound check fixes the
input validataion and avoids such memory access.
Change-Id: Ic83ef5ea008e8d8043ab2bcf9278ec72e0269fa1
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Border offsets are taken from the ctl during pipe configuration
and if mixers are not associated with ctl, it might lead to NULL
pointer dereference. NULL check was missing while logging the
border offsets. Add proper checks to avoid it.
Change-Id: Ieefab77dac21e1eb1cffcfb71979c240a490041d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Update the DSI controller version and DSI PHY regulator
enable sequence for msm8937 platform.
Change-Id: I42a79a93322d5e58c1b01d8ee575063257f492cf
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Initial set of changes to support msm8937. This includes
adding MDP HW version for msm8937, and some makefile
changes.
Change-Id: I0646ea76060696d4fe35e3f6f5f2a949474c0b8b
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict.
Remove makefile changes, always build mdss_mdp_pp_v1_7.c]
Signed-off-by: Clarence Ip <cip@codeaurora.org>