Currently, SDE relies on DSI to set a flag for POMS however
if a power ON modeset comes with a different mode than
previously configured, DSI is unable to detect the mode change
and does not set the flag nor perform the mode switch itself.
DSI should always align the panel mode to match the timing node
that is selected regardless of prior configurations.
SDE encoder can detect if POMS is required for the INTF block
without the flag from DSI by comparing the currently configured
INTF mode with the panel mode that is being set. The POMS flag
from DSI is still needed for any active panel mode change so
that the post-modeset cleanup operations are triggered.
Change-Id: Ib198b3098f21338ab35b2022b04be1c01c4cbd94
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Need to check trusted VM environment when loading DSI
firmware. Add this missing check due to propagation
issue.
Change-Id: I7c84b487a58133df49ba23e80e6b6ff8783cdf6c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Add the altmode communication events in xlog to help
debug the stability issues.
Change-Id: I29d4821a8222e6139187f92b75ec1d05b5ce4939
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
If trusted vm is disabled, the DRM_PANEL_EARLY_EVENT_BLANK
notifier does not get called because of this touch early
suspend does not happen which leads to continuous touch
i2c transfer failure during suspend.
Change-Id: I6abaacb9f8343eec24d5642f7eda9e7c410fd8b7
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
There is a corner case when dp-mst stream is disabled twice:
1. stream 1 is enabled
2. cable plugged out, stream 1 is disabled by kernel
3. cable plugged in, enable stream 0 first
4. disable stream 1
Stream 1 is double disabled and will cause hw crash. This change
will add the check and skip stream_off if already disabled.
Change-Id: Icd1e815a1ed14cd4e784924f3db19b98eb06d571
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
To avoid use after free issues this change gets latest rsvp_next pointer
in poll timeout scenario.
Change-Id: I4bd4ce1ce9d4f5f2df0e814ceb8babe544578fc6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Currently driver determines the RC regions to enable/disable by
combining partial update ROI information and RC mask flag field.
This lead to invalid outcome when a transition from partial update
frame to full update frame occurs.
This change modifies the enable/disable logic to only use RC mask flags
from usermode client. It also adds the non-intersecting RC and ROI use
case to global use case table and fix the y_start programming when ROI
is only in bottom region.
Change-Id: Ie05c5ecba6bd0323d1c8fd6949e12cec1f56b477
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
It is not applicable for all DFPS cases to update UIDLE state
according to current frame rate. If DFPS changes frame rate
through vertical front porch values, the SDE clocks and transfer
time will not get changed accordingly, and it always get fixed
at max frame rate configuration of DFPS.
Add this change to check max FPS of DFPS instead of current
frame rate for UIDLE update, if DFPS is enabled with VFP.
Change-Id: I7634bce6a9eb1af212ba19a267735be08b20ae1f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
SDE RSC and core perf avoids BW vote trigger if current
and previous AB/IB BW votes are same. This may cause
issue if target enters in idle power collapse state
with stale AMC vote. This invalidates the sleep vote
and does not remove disp_drv vote. This change triggers
BW vote on all rsc state updates.
Change-Id: Id738206ade0feeb067dfda3d06cc0c7e19d66df1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
In the current code during affinity change, irq cpu mask is
being updated without clearing previous pm qos vote. Due to
this, even after entering idle state, qos vote is still
present on other cpus. This change clears previous pm qos
vote before adding another.
Change-Id: Ic0326a09d37d03d5a8b0444362a6f1492993040c
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Add event to event_list after msm_register_event is successful to avoid
use-after-free vulnerability.
Change-Id: I34fb39c99051978cbab64a852851964691a5ea9e
Signed-off-by: Ping Li <pingli@codeaurora.org>
This reverts commit 91fc51777c67ddc92d0ba1fcddf6cd149f7a0560.
The original fix missed to add the client to list in cases when count is
larger than zero and client doesn't need to be deleted from list if
msm_register_event fails as it was not added to list yet.
Revert this change to upload the correct fix.
Change-Id: I00923d65387753b05b6b03efec109c019826f5d5
Signed-off-by: Ping Li <pingli@codeaurora.org>
Don't process any attention requests after hpd off. During automation
tests, scripts are doing a mst unplug after hpd off. But sometimes
disconnect thread freezes waiting for audio ack. During this freeze
unplug happens and uninstalls connector and free the panel and audio
objects due to which lock associated with completion variable causes an
exception.
Change-Id: I4038fd7debc383a96d60906eef17ec6e2163b326
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Reset the LTM merge_mode bit and portrait_en bit if LTM histogram and
VLUT are both disabled.
Change-Id: Ica9f681e458afe8c7cd1dfe8ba718cf46eadac3b
Signed-off-by: Ping Li <pingli@codeaurora.org>
In cases of adb shell stop, connector->state->crtc is
not updated which prevents panel power down
notification to be sent. In such cases updated crtc
from old connector state.
Change-Id: I94f9e5ad469d771cc673123b4e0cc65ea8f4653e
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Add a new mode DRM_PANEL_BLANK_FPS_CHANGE whenever there is
a change in fps and the power mode remains the same.
This will avoid unnecessary resume operations in touch driver.
Change-Id: Id3d5884ba862c864782636360e3832854464bf65
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Introduce low power mode so that listeners are aware when
display is going into low power mode. This requires moving notifier
inside sde code to be able to retrieve the low power state.
Change-Id: I8671e86af29c959d97e1b8ad758a07719ffa4bec
(cherry picked from commit c4b15f56dd63d24d6f4482deab2423809c700d7a)
Signed-off-by: Adrian Salido <salidoa@google.com>
[samtran@codeaurora.org: move changes to different file as
downstream use of notifier struct comes from different file]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
usbpd_attention_cb will do dp_display_disconnect_sync, but will
not deinit dp host. usbpd_disconnect_cb can deinit dp host, so
need to check dp state, if dp is unready, should not skip
usbpd_disconnect, can deinit dp host now.
Change-Id: I5a149923ecb043b3a7db973e092bd0d49a715981
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
Currently,power resource disable fails when pm_runtime_put_sync
returns negative values. Due to this, clock state update is
failing. pm_runtime_put_sync can return negative values in
scenarios where pending resume requests take precedence over
suspends. This change allows pm_runtime_put_sync to return
negative vales also.
Change-Id: I1a46ca574129ba953ddb6300f9b3ab24cdb3171e
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Currently, power_state variable does not reflect the GDSC
status. Due to this, there are scenarios where ctrl_power_on
is not happening leading to clock failures. This change
updates power_state based on current status of all the
regulators. GDSC enable is moved to pre_clkon and GDSC
disable is moved to post_clkoff.
Change-Id: I6d9508d5dffda0c94bd3b3bd9b5feb4724dc9dc7
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
[cohens@codeaurora.org: fixed static analysis error]
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This change adds more debug logs and event logs to MST callflows
to help with MST stability issues.
Change-Id: I9053eab5932487fccce522cc17ed2e9fb8d887ab
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>