- Use IS_REACHABLE(RC_CORE) instead of IS_ENABLED: if cec is built-in and
RC_CORE is a module, then CEC can't reach the RC symbols.
- Both cec and cec-edid should be bool and use the same build 'mode' as
MEDIA_SUPPORT (just as is done for the media controller code).
- Add a note to staging that this should be changed once the cec framework
is moved out of staging.
Change-Id: If084eab2c2bbca7b9fa5b8959b27b1894b8ec2b7
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 5bb2399a4fe4a1703c1497b4838c5e8e869d0822
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting
it from MEDIA_CEC produces a warning:
warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT)
The warning is harmless, but it's better to add an explicit
dependency to shut it up, to reduce the noise during randconfig
builds.
Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)")
Change-Id: I637ceabfcc8f311f8ca723671f954e1db060c965
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: ea8c535e30c1066a0bf8acb2d39bb3c4e643a034
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
CEC_MSG_REPORT_PHYSICAL_ADDR can theoretically be received from
an unregistered device, but in that case the code should not attempt
to write the received physical address to the phys_addrs array.
That would be pointless since there can be multiple unregistered
devices that report a physical address. We just ignore those.
While at it, improve the dprintk since it would attempt to read
from that array as well with the same out-of-bounds problem.
Change-Id: Ic4e969669cadd3e9f59a587d7d075e130f5cd869
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: f8db65fe4336baf818dde5d226eb3d35773e2371
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Like the videodev2.h and other headers, explicitly allow these headers
to be used with the BSD license.
Change-Id: I8f9ae52ed90337ca1f697dbf310a774f50eb154d
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 12655445a2adc292db3352bbe80e43bd243517aa
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
When a reply to an earlier transmit is received, the tx_status of that
transmit needs to be restored. Otherwise the status that the transmit
was successful would be lost.
Change-Id: I53fac6d2346a88a8f93503952bd9e2c3c9bae5e6
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 7b12b47f78e458ea90cc350bc7a4b9385eef897a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.
Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.
This adds the cec-api.c source that deals with the public CEC API
and the Kconfig/Makefile plumbing.
The MAINTAINERS file is also updated.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: code cleanup and fixes]
Signed-off-by: Kamil Debski <kamil@wypas.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: ca684386e6e21ba1511061f71577cdb6c3f2b3d3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Change-Id: Ie0ac63f18e51cab0e920f9c6c618563faf57a83c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Specify short circuit (SC) interrupts for LAB/IBB so that the driver can
attempt re-enabling the module after PBS disables it for SC protection.
Interrupts are disabled by the driver if SC happens frequently so that
the module is kept disabled.
CRs-Fixed: 2002373
Change-Id: Idb6fdc4845aebb7133c210dd03ff77a167de5d69
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Free already allocated buffer before allocating new one
to avoid memory leak when someone keep writing to this file
but never read it.
CRs-Fixed: 2051862
Change-Id: I29784fb30ea8eed315b7d073d35480972642bc55
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Other than stats every debugfs entry should be under
CONFIG_ICNSS_DEBUG so that we don't enable these on
build which doesn't have debugging support.
CRs-Fixed: 2051871
Change-Id: I336f449313bb1f0f8af4e82f40869f65f58d9f4e
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Currently vconn is getting disabled late after disabling vbus.
This is causing failure if type-C compliance TD.4.8.3(DRP Connect
Alternate Mode), as delay is disabling vconn goes above 35ms.
Fix the issue by moving vconn disable as first step upon receiving
disconnect notification. Also, making policy engine workqueue as high
priority workqueue to be able to run state machine work with lower
latency.
Change-Id: If9a979b4cc5bab3aa2ebf42397c36e5b434b50b9
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change debugfs permission to allow root only access to those files.
CRs-Fixed: 2051867
Change-Id: I4bef907f8cbe39169b38e4f19072a0628e199691
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Fix a potential buffer overflow that could occur
during firmware download by storing buffer address
locally instead of inside MHI context.
CRs-Fixed: 1109397
Change-Id: If27ba602cdafdc8d25a94fdc0d74e8970bf0b0f4
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Hardened user copy provides an extra layer of security checks when
copy_to_user/copy_from_user APIs are used to ensure data accesses are
valid. When invalid accesses are detected the kernel will forcibly
crash.
Change-Id: Ia0529c67da84017ea91a72427db008737d3c5dbd
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
In transcode loopback session open, ALSA to ASM format conversion is
incorrect. Update the format based on ASM defined formats.
CRs-Fixed: 2049714
Change-Id: Ie5ddb6a58a30b0d6b78bfc68cbbbcd3d92f28fb1
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
Set voc path type according to stream type during routing
preparation for voice session to fix uninitialized voc
path type causing voc device port configuration failure.
CRs-fixed: 2045461
Change-Id: I4983ba55b1854879680b6d13c33904a522092eb0
Signed-off-by: Derek Chen <chenche@codeaurora.org>
There is a design limitation in host driver. Driver
sends regulatory_hint_user for both user-space and
11d country to kernel. So when wiphy re-registration
happens, kernel tells the source as USER even for 11d.
And per driver logic the 11d needs to be disabled
if INI gCountryCodePriority is set.
To mitigate this issue, storing the country source
in the platform driver.
CRs-Fixed: 2051651
Change-Id: I335a046a886ac3ce35cf96eb71231bfe75d33c60
Signed-off-by: Paul Zhang <paulz@codeaurora.org>
UHS-I SD cards support SDR104 mode which runs the SD card interface
clock upto 208 MHz. But we may see repeated CRC errors in SDR104
with some SDCC controllers. If this happens, commit <aafc430b36f3>
("mmc: sd: reduce the bus speed in case of multiple CRC errors") would
reinit the card to lower speed (SDR50) hoping that CRC error
rate would reduce at lower clock speed (100MHz for SDR50). As the error
may happen for any cmd, this change tries to fix several other paths -
clock scaling, mmc_rescan, non-data commands error path.
Change-Id: I8ccbbf7e330cde3862d9660d3be4d67fb00d97ca
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
This reverts commit e6855ed3fe ("arm: cpu: read all
address cells in dt for cpuid"). The address cells read
issue is fixed in upstream commit c84cc7b906 ("ARM:
8616/1: dt: Respect property size when parsing CPUs"),
and both changes conflict and break the parsing of address
cells.
Change-Id: Iafd918ce8623ceb0c701df15bbdbccba165c89dd
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Add support for required node for audio of HDK660/630 boards
with tasha codec.
Change-Id: I1b5acb70d4fb8e8e4958ffafb2b83c16df1d933c
CRs-Fixed: 2047107
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Currently PM QoS is not getting notifications if irq affinity
is changed by core isolation with irq_do_set_affinity.
Use irq_set_affinity_locked instead to get notifications when
updating affinity.
Change-Id: Iab745a23637d9353f730ca77ac7e92cf61b1bf67
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
ICL recovery mechanism is used by user space daemon
to recover from adapter collapse during voltage increment
event by reducing the USB ICL. There could be a situation
where nobody votes on usb_icl_votable and this could lead
to a negative ICL value.
Fix this by reading "HW_CURRENT_MAX" property to get ICL in
situations where usb_icl_votable is not voted by any client,
this ensures ICL reduction will always vote a valid ICL.
CRs-Fixed: 2048330
Change-Id: I8e53a945530c1685aaaba0537d16ac5fb11858df
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Current AICL re-run design for PM660 uses AICL restart mechanism
which starts AICL algorithm from Min ICL value to the configure ICL
value one step (25mA) at a time, this adds considerable amount of
delay for algorithm to reach a settled ICL value. Fix this by using
PMI8998 based AICL re-run design.
Change-Id: I84f612c275fa0d9785a6688a56c9da90df1b86d4
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Define ops_keep_radio_on_during_sleep as static as it is used
only in msm_11ad context.
Change-Id: Id95579961ce5cdd3fbdf063578bd4d9144f8a725
Signed-off-by: Maya Erez <merez@codeaurora.org>
Low latency use cases are failing because glink RX thread to handle
the TX Done command is not being scheduled during high system load.
These new APIs allow clients to specify if they need the RX glink
thread to be Realtime
CRs-Fixed: 2050701
Change-Id: I6bd4023394e9ee617797826687f34abaee3fe65d
Signed-off-by: Chris Lew <clew@codeaurora.org>
When pixel transfer is going on, there is a race condition during
which pixel clock can get turned off due to early clock gating
before CMD_MDP interrupt is triggered which can cause interrupt
storm. This change ensures CMD_MDP interrupt is received before
turning off clocks.
Change-Id: I33b664334912584170c12733329051b067c3f1da
Signed-off-by: Ashish Garg <ashigarg@codeaurora.org>
There is ref count mismatch in number of enable/disable calls for
regulators with low power mode allowed flag which is resulting in
random system crashes. This change makes sure number of enable/disable
calls are same.
Change-Id: I0c1906df8c3a83e8740412c272179d3d9c514c0e
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
Configure quat mi2s in slave mode. Create quat mi2s node and
add the pincontrols to be used for data lines.
Change-Id: Ib0a06389941f09014c0f872d3643251859eb6a6b
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
keep_radio_on_during_sleep allows reserving the 11AD connections
during suspend.
In such a case PCIe will suspend to D3hot and the device power
will not be turned off.
Change-Id: I04eed7802256c48ef9f39e7dc4e3b1a5386eb3c7
Signed-off-by: Maya Erez <merez@codeaurora.org>
Return mementry from kgsl_sharedmem_find only if pending_free
is not set for that mementry. This is necessary to avoid use
of a mementry after it is already marked for free.
Change-Id: I23111e9c82a88ccbda2ab259074c38d91f9ff5cb
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
PBS will be triggered in PMIC hardware to disable LAB/IBB regulators
when a SC(short circuit) error is happened. The regulators won't be
restart in hardware and they will be kept disabled always after that.
Restart LAB/IBB regulator in the software if SC IRQ is detected, but
stop doing this if the SC IRQ had fired frequently.
CRs-Fixed: 2002373
Change-Id: I5db2b70999d043395e070bc9d61015477455cce9
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Use subsys_set_error() to indicate invalid firmware image
that prevented subsystem from coming up. Userspace helper
applications will find this useful to take suitable
recovery action.
Change-Id: Ie03e4f2652692f30d32bbe80b39fb49ba95ea728
Signed-off-by: Meghana Ashok <meghanaa@codeaurora.org>
[fixed minor conflicts]
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Adding a new API subsys_set_error() which can indicate reason why a
subsystem failed to come up. This error reason can be useful for some
userspace helper application to take appropriate action.
Change-Id: I6df3580befd48a6b83bb8fd1099475da42fc9cf2
Signed-off-by: Meghana Ashok <meghanaa@codeaurora.org>
Transcode loopback api can be used by client to configure
compress loopback.
CRs-fixed: 2049714
Change-Id: I7286fbdfa89375d517f3dad7d04e1d2a360d6f7e
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
If we delete uninitialized timer on CONFIG_DEBUG_OBJECTS
disabled build del_timer_sync() will block for ever. For
all A3xx targets preemption timer is not initialized, but
dispatcher fault handler is trying to delete the
uninitialized preemption timer. Fix this issue by adding
a preemption check before we delete it.
CRs-Fixed: 2023690
Change-Id: I2c51a0b2286b82bf2eb5ee68d923dd9585f07f00
Signed-off-by: Wenbin Wang <wwenbin@codeaurora.org>
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
Based on the hardware recommendation, update the default empty
voltage from 2.8 V to 2.85 V. This is to prevent undervolting
in low temperatures (e.g. -20 C) when battery voltage drops below
2.8 V but the battery SOC may not reach 0% as the charger is
configured to issue GP_FAULT2 when battery voltage goes below
2.8 V. This helps in shutting down graciously.
Change-Id: Ifc68b825541c09d985d890ee7200ff8e0af2ba0f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.
Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.
This adds the cec-adap.c source that deals with the low-level CEC
messaging and logical address handling.
Change-Id: I0c9dfee5d78ef122a307946182f34ccf7e40d3fc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: change kthread handling when setting logical address]
[k.debski@samsung.com: code cleanup and fixes]
[k.debski@samsung.com: add possibility to clear assigned logical addresses]
Signed-off-by: Kamil Debski <kamil@wypas.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 9881fe0ca187c213eb3a6a8e78e45ad4d1cec171
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
The added HDMI CEC framework provides a generic kernel interface for
HDMI CEC devices.
Note that the CEC framework is added to staging/media and that the
cec.h and cec-funcs.h headers are not exported yet. While the kABI
is mature, I would prefer to allow the uABI some more time before
it is mainlined in case it needs more tweaks.
This adds the cec-core.c, media/cec.h and cec-priv.h sources.
Change-Id: Iccc9ce1e7c1c04aa7693c3ba73027d92b50b3bbc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[k.debski@samsung.com: Merged CEC Updates commit by Hans Verkuil]
[k.debski@samsung.com: Merged Update author commit by Hans Verkuil]
[k.debski@samsung.com: code cleanup and fixes]
[k.debski@samsung.com: add missing CEC commands to match spec]
[k.debski@samsung.com: add RC framework support]
[k.debski@samsung.com: move and edit documentation]
[k.debski@samsung.com: add vendor id reporting]
[k.debski@samsung.com: reorder of API structs and add reserved fields]
[k.debski@samsung.com: fix handling of events and fix 32/64bit timespec problem]
[k.debski@samsung.com: add sequence number handling]
[k.debski@samsung.com: add passthrough mode]
[k.debski@samsung.com: fix CEC defines, add missing CEC 2.0 commands]
Signed-off-by: Kamil Debski <kamil@wypas.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: a56960e8b406d36b612776c79134b954adc2ca18
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This public header contains static inlines to pack and unpack CEC
messages. It is for use in both the kernel and in userspace.
Since the CEC framework will initially be in staging this header is
not yet in include/uapi. Once the framework is moved out of staging
this header should be moved to uapi at the same time.
Change-Id: I3a6eaf417787e9bfd6e8dc06bedbee03f9c3552a
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 50f7d5a65e5a31e92a9d46663770cd9509f939a2
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This header contains the CEC public API. Since the CEC framework will
initially be part of staging this header is kept out of include/uapi for
the time being until the CEC framework will be moved out of staging.
Change-Id: I8ad69b57531e65fc9919f92b473280dd821f1272
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 3132583e5bd7cb56dffb2c04128ec4db12c32027
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
The cec-edid module contains helper functions to find and manipulate
the CEC physical address inside an EDID. Even if the CEC support itself
is disabled, drivers will still need these functions. Which is the
reason this is module is separate from the upcoming CEC framework.
Change-Id: Ia20fb7ef771c0455d369029738c509d59f5e4adc
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Git-commit: 29fb44a58ac12bffe4c225f95afdc22364db070e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
We have seen that host controller's clock tuning circuit may go out of sync
if controller clocks are gated. To workaround this issue, we are now
triggering the retuning of tuning circuit once clocks are ungated.
Change-Id: Id2db1cb4829fbb1af4f8c4e463d1e16c0f45e590
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Previously, parsing of the iommus property nodes was done at every probe
call, making it time-consuming. This change makes the property parsing
outside the probe call at arm_smmu_init and stores the parsing info in a
data structure and later the probe calls can utilize this data structure
to perform the parsing in a time-efficient manner.
Change-Id: Ifd5558b94c134158c5cf15ca6b9e325ba45c55ba
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Remove wait for vsync in display commit if both PCC and DDIC
need to update for external backlight feature.
Change-Id: I57aeb48acba24e0ca3fff21b1117e48fe452028b
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
If kernel stack variables are not initialized properly,
there is a chance of kernel information disclosure.
So, initialize kernel stack variables with null characters.
CRs-fixed: 2042592
Change-Id: I213c0e5c7f67824c2cecace276ff2f8f81599d51
Signed-off-by: Sai Krishna Juturi <jsaikrishna@codeaurora.org>
Add dai link MultiMedia20 for custom card to support SEC_MI2S_TX
ASM Loopback to TDM port.
CRs-Fixed: 2045651
Change-Id: Iff03923cdf843a1873cf464cd6a66feab2c306fb
Signed-off-by: Cong Tang <congt@codeaurora.org>