Fix wrong calculation for the amortized prefill
parameters to use destination coordiates as well
as adjust ts_count denominators for the correct
units, also make sure vsync clock is enabled.
It was causing problem when feature was enabled.
Change-Id: I62a3bd31997be05181de98307089e2a69d98ab7b
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Use u64 variables to store intermediate results while calculating
mdp clock for qseed3 scaling scenarios, using u32, results in overflow
and incorrect mdp clock setting.
Change-Id: I4fbc9aa1f30d36d35a9ad181185761e697cbbef7
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Add mdss_rotator node with smmu subnodes.
Change mdss_mdp to interrupt controller so rotator can receive interrupt
routed by mdp handler.
Also, reserve control 4 and writeback 0/1 and their associated mixers
for v4l2 rotator driver.
CRs-Fixed: 1017182
Change-Id: I32f312f11fcbebbff0799120448d6e8f0d9ec98d
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Fix register offsets for top, ctl_path, qseed3 in reg-dumps for
capture of these registers in ram dump.
Change-Id: I312444176373f73f02aa0ceddf5e114a39702641
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Adding support in mdss and pll drivers for such hardwares where
mdss part is not functional.
CRs-Fixed: 993024
Change-Id: I32b0e57c8e958b7e5f1d647e37e46fda052b3d1e
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Related threads in a group could execute on different CPUs and hence
present a split-demand picture to cpufreq governor. IOW the governor
fails to see the net cpu demand of all related threads in a given
window if the threads's execution were to be split across CPUs. That
could result in sub-optimal frequency chosen in comparison to the
ideal frequency at which the aggregate work (taken up by related
threads) needs to be run.
This patch aggregates cpu execution stats in a window for all related
threads in a group. This helps present cpu busy time to governor as if
all related threads were part of the same thread and thus help select
the right frequency required by related threads. This aggregation
is done per-cluster.
Change-Id: I71e6047620066323721c6d542034ddd4b2950e7f
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[joonwoop@codeaurora.org: Fixed notify_migration() to hold rcu read
lock as this version of Linux doesn't hold p->pi_lock when the
function gets called while keeping use of rcu_access_pointer() since
we never dereference return value.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The USB power_supply now allows PROP_TYPE to be modified. Update it
to 'USB_PD' only after PD communication has been established. This
can happen only in a couple places:
- in sink mode, when a source capabilities message is received
- in source mode, when GoodCRC is received after sending the
source capabilities message successfully
Since PD_ACTIVE=1 is required to be set, also update it in source
mode prior to sending out the capabilities, and clear it if all the
attempts fail. Remove the unreachable/dead code found there as well.
Change-Id: I77c5875ee8514395a82fac0109b7cff1d507250b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The POWER_SUPPLY_PROP_PD_ACTIVE property is intended to be a flag
set whenever the PD PHY is in use. But this includes attempts to
establish communication, which may involve trying to perform a hard
reset to see if the port partner responds. Thus updating the
psy_desc.type field to 'USB_PD' right when PD_ACTIVE=1 is premature
as the port partner may not be PD-capable and it could be un-set.
Instead allow the PD driver to directly update POWER_SUPPLY_PROP_TYPE
only after it is sure PD communication has succeeded.
Change-Id: Iae6804bcb3121e0852ec5d14d0939623b97a6e67
Signed-off-by: Jack Pham <jackp@codeaurora.org>
API retrieves the IRQ number for the CE ID passed.
Change-Id: I87cca1215134e6d406f60d54f6d0430978eeae9c
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
If we add the mem entry pointer in the process mem_idr too early
other threads can do operations on the entry by guessing the ID
or GPU address before the object gets returned by the creating
operation.
Allocate an ID for the object but don't assign the pointer until
right before the creating function returns ensuring that another
operation can't access it until it is ready.
CRs-Fixed: 1002974
Change-Id: Ic0dedbadc0dd2125bd2a7bcc152972c0555e07f8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Existing rotator block is serviced by fbdev rotator driver.
This change enables usermode to use external v4l2 rotator driver by
exporting rotator interrupts (WB0 & WB1) thru interrupt domain,
and share smmu access for writeback and rotator.
mdp_irq_export is only set if has_separate_rotator is specified
in device tree and MDSS version is prior to 2.0.
mdp_irq_export is set to zero otherwise, and will effectively
disable mdp irq export and will introduce only minimal overhead
to interrupt processing. This is the default behaviour for
MDSS newer than 2.0.
CRs-Fixed: 1017182
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Change-Id: If634894768b02d124ceab071a9eca1c36f258600
Currently, while setting the voltage on LAB and IBB regulators,
slew rate is always calculated based on the difference between
user specified minimum voltage(min_uV) and the minimum voltage
(min_volt) that can be supported on the regulator based on the
mode it is operating.
However, it should be really calculated based upon the difference
between current voltage and new voltage which will be set. Fix
it. Also, add the missing return -EINVAL to set_voltage of LAB
regulator if min_uV is less than min_volt.
While at it, remove the redundant function name added to the
pr_err() statements in set_voltage callbacks.
CRs-Fixed: 1013913
Change-Id: I9a17c83d6613ff37cede4a7bb52612465e4d0101
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This support is needed to enable GSO (Generic Segmentation
Offload) on msmcobalt.
Change-Id: Id9949bef91835318a7b344753983eea0aeab7bdc
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Update IPA node to not not use IPA channel 20 due to hardware limitation.
Change-Id: Id849055526bf70e0cc8161239b4530a7fc575744
CRs-Fixed: 1005061
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Fix a bug in IPA ODU where debugfs directory was deleted after
creation.
CRs-Fixed: 1015545
Change-Id: I5aad7032f3f8048216a41765f1cf91fde98f6ade
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This change in a software workaround for a hardware limitation
to not use GSI channel 20.
CRs-Fixed: 1005061
Change-Id: I4ed9f1c6ad089f80dcd19762fda151ce1572f471
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Add qrng driver support for msmcobalt. This enables qrng
to be used from hlos side.
Change-Id: I2c808713aaac42345b97665a8990f5bbb9b9145e
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
There are few cases where the count argument passed by the user
space is not validated, which can potentially lead to out of bounds
or overflow issues. In some cases, kernel might copy more data than
what is requested. Add necessary checks to avoid such cases.
Change-Id: Ifa42fbd475665a0ca581c907ce5432584ea0e7ed
[veeras@codeaurora.org: Resolve conflicts in mdss_debug.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
GRO is currently enabled only on SMP systems so move the check for
cloned packets from commit b8a7d12f33ecba4 ("net: Warn for cloned
packets in ingress path") within CONFIG_RPS to prevent printing an
unnecessary warning on single core systems.
CRs-Fixed: 1006937
Change-Id: Ib8cb979136def6696861a7835bcde763dabe874f
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
DT changes for nfc are required on msmcobalt describing
the GPIO behavior for the nfc controller chip.
Modified dtsi files for MTP and CDP device.
Change-Id: Id19733e6e075a427c4aa745b5bedc93f29a2dd4f
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
If the ioctl syncsource_destroy is accessed by parallel
threads, where the spinlock is acquired by threads after
getting syncsource, then the simultaneous processes try
to remove the already destroyed syncsource->refcount by
the first thread that acquires this spinlock. This leads
to race condition while removing syncsource->idr.
Avoid separate lock inside getting syncsource, instead
acquire spinlock before we get the syncsource in
destroy ioctl so that the threads access the spinlock
and operate on syncsource without use-after-free issue.
Change-Id: I6add3800c40cd09f6e6e0cf2720e69059bd83cbc
Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
The debug bus information for VBIF block was not dumped
correctly for A5XX GPU during the snapshot dump.
Change-Id: I75089e210a6fc72683dcf98cdd4da9d6ab3e6fcf
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Corner bands used on CPRh controllers may not necessarily define
per-online-core or per-temperature adjustments. Do not
attempt to program adjustments on corner bands whose sdelta
tables do not have either core-count or temperature based
adjustments defined.
Change-Id: I87d18778fef81671c5e7cc261cc70ce07c662933
CRs-Fixed: 1020505
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
The step quotient is used for target quotient adjustment when
sdelta table margins are used. Add support for fixed or dynamic
step quotient for CPRh controllers to allow per-core-count and
per temperature adjustments to work in conjunction with
closed-loop operation.
Change-Id: I6b9d663b44c96dafba26ad25bcfc4b61c8c86d56
CRs-Fixed: 1020505
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Dump the value in gladiator error registers in raw format.
CRs-Fixed: 1019798
Change-Id: I7bccd68866457bb0635ae5166ec935f9e82ba760
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Update the single and double bit error strings to reflect the Kryo2xx
silver and gold processors.
CRs-Fixed: 1020529
Change-Id: Ia4f54bfee8111f9f039f772a8bcc7c9a0400d5aa
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
This change adds maximum input and output width for destination scaler.
CRs-Fixed: 988990
Change-Id: I9a4b9701e078fa39783f33f023eef2da75c1c162
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Destination scaling is a new hardware feature in MSM mdss 3xx hw. When user
mode enabled the destination upscaling, framebuffer will get upscaled
and then transmitted to the primary panel.
CRs-Fixed: 988990
Change-Id: I19aa5983316bec4a87811c8aa8b54f770001c45f
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
ISPIF hardware also needs csi clock along with vfe clock, but csi
hardware controls clock rates hence changed clock control type
so that ispif won't alter clock rate set by csi.
CRs-Fixed: 972998
Change-Id: I6a99fa6961e9205d7d9ccb470873c26adde8a91f
Signed-off-by: Sagar Gore <sgore@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Change the type of temperatures in the qpnp-temp-alarm driver
from unsigned long to int. This ensures that the driver can be
compiled successfully when the following commit is in place
which changed temperatures in the thermal framework from
unsigned long to int: commit 17e8351a77 ("thermal: consistently
use int for temperatures").
Change-Id: I38c637936b398f2fb1665c8233ed5e49e83bf296
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
ISPIF version was incorrectly defined in the defconfig
used for 8996, remove it.
CRs-Fixed: 1020515
Change-Id: I2c1fb7dcc698142f9ce42f40164521b8a78268e1
Signed-off-by: Harshal Trivedi <htrivedi@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
update config options for msm-perf_defconfig to match with options
on 3.18.
CRs-Fixed: 1013947
Change-Id: I7df9aeb55a95185077c679a217ed8772eb83c8b9
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Policy engine needs to provide the plug orientation upon
type-c cable plug in. qmp phy driver needs to program phy
lane based upon this information.
Change-Id: Idd236136c9f0a9163b4ae7a8405c412f1d69ca9e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
In order to support super speed mode using type-c cable, phy
driver needs to programe the phy with appropriate lane based
upon plug orientation.
Change-Id: I893c0b729015cd22791d168453309168246961e2
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Register callbacks for plug orientations in order to
cache the current plug orientation reported by extcon.
This allows super speed phy driver to configure the
appropriate lane upon phy initialization.
Change-Id: I906005680b4cc90cc38dc3d403beebf7aa515ad7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Type-C factory mode is unreliable and causes the Type-C mode to be
incorrectly detected in some cases. Disable it.
CRs-Fixed: 1019313
Change-Id: I5f66be80899c33816c886df526db9e50d7e9aff9
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
The change extend the support in video driver
to enable few SEI extradata. Also update the
extradata menu V4L2 control with all the
available list of extradata.
CRs-Fixed: 1007521
Change-Id: I6d060afb48aca34c2bb54221c5babc0ac55aff7c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
As part of of IPA driver refactoring a separation has been made
between IPA core driver and the IPA clients.
MHI specific code in ipa_mhi.c has been transferred to a new file
called ipa_mhi_client.c.
IPA clients drivers are the interface between IPA core driver
and external drivers. Specifically, ipa_mhi driver is the
interface between the MHI driver and IPA core.
CRs-fixed: 989505
Change-Id: Iebcde6d233ff8580aa83b1885f1e8a01644dd1f4
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Defer wb driver probe until mdss probe is completed, this is
required for supporting bin parts where multimedia hw is not
functional.
CRs-Fixed: 993024
Change-Id: Ic21c25a33a8b2430903e9c1f3d339022551d81d6
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Create sysfs entry to have option to disable software clockgating
NAP state.
CRs-Fixed: 973565
Change-Id: I2376f10161040dbf426887ce146ac597f401153f
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
User can pass arguments as part of write to requests and endpoint number
will be calculated based on the arguments. There is a chance that driver
can access ep structue that is not allocated due to invalid arguments
passed by user. Hence fix the issue by having check and return error in
case of invalid arguments.
Change-Id: I060ea878b55ce0f9983b91c50e58718c8a2c2fa1
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Remove unused APIs icnss_register_ce_irq &
icnss_unregister_ce_irq. These APIs are divided into multiple APIs
to provide flexibility to WLAN driver.
Change-Id: Icd56b61a372cb18e6600617184d8b185b78ce99d
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
Provide a hw guarantee that a userspace watchdog process receives cpu time.
Move ping_other_cpus() prior to waiting for the userspace signal in order
to minimize the effect of a late userspace pet on the safety margin. The
safety margin is the difference between the workqueue's timer interval and
the bite interval.
Change-Id: I715cf7ad7975c6e020458f623262dc02927795a7
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>