free allocated memory in error handling of spcom_register_client()
and spcom_register_service() kernel API.
Change-Id: Ieb5787cb1a11d4b3320237fa8cdde3dc357d9084
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Do not call runtime suspend forcefully while holding the mutex as runtime
suspend also tries to acquire the same mutex. Instead acquire it properly
with the condition of runtime_pm enablement status without mutex.
Change-Id: I2347820e81ded0821e6f56a415af3bed17a951b4
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
This change enables a new LP property to specify panel specific
low power modes. This is needed to differentiate between normal
panel "on" and "on but low power" scenarios, something that
is not available through the standard DRM DPMS property.
The sde connector calculates a consolidated "power mode" setting
between the DPMS and LP properties and provides a callback to
the underlying display driver(s) whenever one of them is updated.
CRs-Fixed: 2071893
Change-Id: If5c80ac9eefbf1f119bcae5513ae18c7be6f618d
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Add enabled flag to the CRTC to be able to track the enabled or
disabled status in the display thread instead of the atomic
state. The atomic state is swapped prior to the display thread
dispatch. This is before the display thread executes the enable
or disable operation, so the state is not properly reflected for
a running VSYNC work item.
Also, simplify the CRTC VBLANK function structure to use a
single common function call to update the CRTC's VBLANK
registration with the encoder to avoid extra refs and unrefs.
CRs-Fixed: 2071893
Change-Id: I9b473becec15427b03b5ebf0333e10e4911dfd9b
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Move the debug print in the sde core irq out of the general
DRM DEBUG log area and into pr_debug directly to avoid flooding
the DRM general logs.
CRs-Fixed: 2005394
Change-Id: Ib9456bb49ed1d8c045f353b4a41f43575fc3fd03
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Fix disable callflow in sde encoder so that the physical
encoder has a chance to wait for the frame done first, before
the virtual encoder declares an error for a missed frame done
event in the encoder disable case.
Change-Id: Ifc6cad708ad98324eef31435e709ad763059abbf
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Need to check for and wait for the unlikely event of a hardware
initiated CTL reset in video mode. Need to wait for the reset to
complete before initiating the next kickoff. If CTL reset fails
to complete, initiate a panic.
CRs-Fixed: 2005394
Change-Id: I27dfaf602a9c2ba2faacabe723a9593a39ed891e
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add logic in the SDE video encoder vblank irq handler to verify
that the hardware actually flushed before decrementing the
pending flush counter. This prevents incorrectly signaling that
the buffer was flipped.
Change-Id: Idd723f80a8a7f5f596654a784c3a76abe75c4f19
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Need to consider hardware pipe priority when validating an
atomic commit. Hardware requires certain source pipes to be
left-most compared to other source pipes when in source split
configurations.
CRs-Fixed: 2005394
Change-Id: I4a19fbe9f78db8e557720ef7973034fdbd2f8a58
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add checks to sde debug facility to reject poorly formed
register block ranges. Add names for dsc and vbif register
blocks. Register the vbif hw block under the vbif base register.
Fix the names of the printed register blocks to be 0 based as
expected. Fix the DSC register length initialization. Sort
register ranges before printing. Register mdp top block
address before dumping the sde debug bus.
Change-Id: I0179d59543de52537937abcc7d556f79569e9c55
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add support for dumping the sde and vbif debug buses. Can be
triggered via sysfs, or via the SDE_DBG_DUMP macros by providing
"dbg_bus" or "vbif_dbg_bus" strings in the dump area list.
Change-Id: I8b3261a7bdc0161e77729ed0d05bf90cf9214298
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Need the capability to dump the content of sde registers during
panic and other scenarios. Add debugfs facility for triggering
register dumping. Add registration of sde and vbif as base
hardware blocks. Add the blocks within the sde as named register
dumping ranges.
CRs-Fixed: 2005394
Change-Id: I410c4e5270447d4d3a8364287fa61748ead5410f
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Need to read register block length from the DTSI and populate
into the catalog to support register debug dumping. Also add a
name string to each of the blocks for debug purposes.
CRs-Fixed: 2005394
Change-Id: Ia2299a51d649942b9335bc023d098d9c4882f1de
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Specify the lengths of the register blocks for the sde hardware
on msm8998, needed to support register dumping.
Change-Id: I7f798b8a98cc3a8f919e994e1203d2d7c76687d0
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add a mutex to protect q6_proxy_clk_vote.
The proxy vote/unvote may be called from different contexts
which can result in a a race condition.
Change-Id: I402090be5ff35897ed61499a13bf52eb60a1f5cf
CRs-Fixed: 2094724
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Add support for the msm8996 CV2X board that uses an mdm9650
module as endpoint for CV2X radio functionality. The msm8996
is responsible for running the CV2X application stack and
providing external debug and control access to the system.
Change-Id: I575f565580e8f81f15a9017a97aa064e7f2c6088
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
Currently the handler skips calling the update function
but uses the final result from the votable not_ok_to_qnovo_votable.
Fix it by calling the update function so it gets a chance to vote on
not_ok_to_qnovo_votable.
Moreover do not return early from ptrain_done handler without setting
QNI_PT_VOTER's vote on pt_dis_votable. This is a self clearing bit and
unless QNI_PT_VOTER's bit is removed, the next restart may not trickle
down to hw.
Change-Id: I0a860287b638d20b6a4aa05c7bb25e9b81a980d2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Usually, DC path is connected to a wireless charger. It is advisable
to disable qnovo when charging wirelessly.
Disable qnovo for dc path unless a property in device tree is set to
specifically enable qnovo for dc path.
Change-Id: I4ca475f30ca0a564f533b4ed8bcd55cfb5da291f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
If a charger was already present at bootup, we may not delay the start
of qnovo by 15 seconds.
Fix it by setting the chg_ready votable to false during init.
Change-Id: Icf185763576f65028cf2ef0d1c0bbcf6570460ba
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
While shutting down set the not_ok_to_qnovo votable to true, so that
we skip measuring ESR if a pulse train done interrupt triggers right
during the shutdown.
Change-Id: If3a0a8e9b1d60920cbbedc16af91c05caec8dcb2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Sometimes we observe that the ptrain_en bit is reset back to 0 while
in restart work.
Set it again if so.
Change-Id: I15d46f96a8b751f0386677e3b6876eec8bba9a1f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>