The UFS error handler work may be entered from the clock scaling context
which may have acquired the lock used to synchronize between clock scaling
and shutdown. Part of the error handler work is to send management
requests during which the same synchronization lock is acquired again.
This condition leads to a dead lock. To avoid this dead lock,
skip acquiring the synchronization lock when sending management
requests as part of the error handler.
Change-Id: I38179528868aaeb4a788a83ca8f9c458afea862a
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
This is found to be improving the performance of Random
read and write with FDE enabled. The scheduling was
introduced as part of 4.4 kernel for mq support.
Change-Id: I300750b5f7f1cff4b81f028ae938e7d2b3652bd2
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
Without this pointer being correctly initialized, subsys_set_error()
would end up accessing invalid memory
Change-Id: Ic62224e830d17c25f2bf9eeeecc81422fc0d5906
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Move SPCOM_MAX_CHANNELS to common H file to make sure that kernel spcom
driver and user space spcomlib library are synced.
Change-Id: I5e19f8def7de755fa89b6a5c67e9d3372f8433f1
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
IOMMU driver takes vote on regulator for every unmap, attach or
detach call and removes it once done.
This is an overhead if GPU is in power collapse mode and huge
number of unmap calls are pending from a given context. It would
end up in turning ON/OFF the regulator those many times.
To optimize this, do a deferred regulator disable about 80ms so that
all subsequent requests to regulator enable will be just refcounted.
Change-Id: I816156f1bdf34a2c0cb8171c2ca1df6b3ae8fe72
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
Enable CEC notifier support in CEC adapter driver, so the
adapter could get notification whenever physical address
is available. This removes the requirement for userspace
to manually set physical address.
CRs-Fixed: 2041335
Change-Id: I337c189d625922391374d3cdeb1f2840ad829cd7
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
When echo values to debugfs entry force_error, unclocked
register access error would be detected. This change fixes
it by making sure the host is powered up and host clock is
ticking before access force event register for error
interrupt status.
Change-Id: I995523d64de36cd4872209db4a558aa83103fbb3
Signed-off-by: Can Guo <cang@codeaurora.org>
Currently, DIV_ROUND_CLOSEST is used while finding the delta
between initial and final cc_soc_sw in terms of percentage. This
can go beyond 32 bits with the intermediate multiplication before
it is down-converted back to less than 32 bits. Fix this.
Also, when the cc_soc_sw delta is less than 50 %, discard the
data so that the last learned capacity won't be updated.
While at it, fix a similar use of DIV_ROUND_CLOSEST in another
place fg_encode_default() where an integer overflow can happen
if it is passed with large integer values.
Change-Id: Ia2b0f5456663a90bcd32a4fed52d1e579cff4e1f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
EXIT_SNK_BASED_ON_CC bit is only to be used while we are in hard
reset. There is a possibility for that bit to remain set if
cable were removed while a hard reset was in progress.
Clear that bit in removal path
Change-Id: I5e0776de9322a8015f851312df51a202e35c7a78
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
In resume_scaling, the host current clock is compared with max clock
of the card to adjust the current-scaling clock.
If max clock supported by the card is more than the max clock that the
host can support, then the above-mentioned comparison is resulting in
setting the current-scaling clock to scale-down clock frequency even
though current host clock is at the maximum clock. This will lead to
skipping of scaling down to lower clock in low load use-cases. So clock
would remain at max clock till next time clock is scaled up and then
scaled down.
To prevent this scenario, compare the host current clock with max clock
that host can be scaled-up instead of max clock of the card.
Change-Id: Ibbed4bb374f1cbb5aee21cfca4e7e97d8f999d51
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
USB 3.1 super speed compliance equipment may be detected as floating
charger by PMI as it may leave D+/D- lines floating (High speed data
lines). PD Policy engine does not start USB stack which results into
compliance failure as compliance expects USB stack to be started. Add
module parameter usb_compliance_mode to start USB stack on cable
connect (w/o depending on charger type).
Change-Id: Ieb33057a85b4bcff9c1e7c32c256663dd23f17ef
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Add CEC notifier support which allows HDMI driver to
inform CEC driver with the new physical address. With
this information the CEC adapter driver does not need
to manually set the physical address from userspace.
CRs-Fixed: 2041335
Change-Id: I5b5707ad40ee381b5cd67f1e89f0d2397a9a7bb2
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Support the CEC notifier framework, simplifying drivers that
depend on this.
Change-Id: I911181db4dc082befa625ce0acc3993ff6f3a1a3
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: e3a93adcc4f6c3b538f3d617fc48a87979d4548b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Add support for CEC notifiers, which is used to convey CEC physical address
information from video drivers to their CEC counterpart driver(s).
Based on an earlier version from Russell King:
https://patchwork.kernel.org/patch/9277043/
The cec_notifier is a reference counted object containing the CEC physical address
state of a video device.
When a new notifier is registered the current state will be reported to
that notifier at registration time.
Change-Id: I00697db780b127a52512a6e55cabac745d8ebfa3
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 6917a7b774133d60e0cfd8f9ac8bb62ae6ba10aa
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
[rayz@codeaurora.org: resolve merge conflicts by discarding the MAINTAINERS
change.]
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Enable CEC adapter driver in mediabox config. This is required
to support HDMI CEC functionality.
CRs-Fixed: 2041335
Change-Id: I006ccd85a6467841c32343372d83771482d0efcd
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Align partial update roi start and height to 256 pixels
for nt35597 panel.
Change-Id: I56e78d1adab769c4d226d88cfb5badcfe7eb6dc2
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
In the current implementation, 5Ghz channel frequencies and txpower of
world regulatory rules are not in par with the Micahel Green's
master sheet.
To address this, modify the frequency ranges and associate tx powers.
CRs-Fixed: 2052854
Change-Id: I119ceda704bea4681d373e72ccedddd3619e6e2f
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
With the current SIGDET value of 0x6E there
seems to be NOP timeouts seen frequently.
Hence, change the SIGDET value to 0x6C as per
updated Hardware Programming Guide.
Change-Id: I46426382033603c4727de6b0a485015eed690f34
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Regulator HW has the programmable voltage upper and lower limit
registers and doesn't allow voltage set points outside the pre-
configured voltage limits. Add a check in driver that throws an
error if the SW specified voltage range is not within the pre-
configured limits in HW.
CRs-Fixed: 2044789
Change-Id: I3593ebf8e88824a0cfcb068686673a00051a11f0
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Add support for PMIC FTSMPS 426 type regulators. These have a
4 mV step size and a voltage control scheme consisting of two
8-bit registers defining a 16-bit voltage set point in units of
millivolts.
Also address the mode register configuration differences between
FTSMPS 426 type regulators and other regulators supported in
spm-regulator driver file.
CRs-Fixed: 2037603
Change-Id: Ide54c8c9dd8113ab4588979ec97915403b3ecab1
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Different COPPs can be mixed into one POPP when recording
data. Use ADM_CMD_SET_PSPD_MTMX_STRTR_PARAMS_V5 cmd to support
this requirement.
Change-Id: If079b586fafe84f7dec7732c7037af2f59f063c7
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Specify a 2 A PWM vs AUTO mode load current threshold for the
PMI8998 BoB regulator. Also specify the initial mode as AUTO.
Consumer that require the BoB to be in PWM mode should request
2000000 uA or more.
CRs-Fixed: 2054771
Change-Id: Icb6ff634359c8ae12c36dcda127bffa247c6eb71
Signed-off-by: David Collins <collinsd@codeaurora.org>