Graf commitů

177 Commity

Autor SHA1 Zpráva Datum
Samantha Tran
e778d2688e disp: msm: sde: add support for WD timer on INTF
Watchdog timer is moving from TOP to INTF. This change adds
support for movement and ensures backwards compatibility.

Vsync select only needs to specify whether or not to use
Timer 0 associated with the interface. It does not need to
select between Timer 0-4.

Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Change-Id: I9d89a8cb1ea607e9fc0bdbffa0a6a9acceff7f13
2021-02-12 13:49:31 -08:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Lei Chen
ab3f86f918 disp: msm: use connector properties to expose and set panel mode
Expose panel mode from kernel to SDM with SDE connector property
CONNECTOR_PROP_MODE_INFO and set panel mode from SDM to kernel
with SDE connector property CONNECTOR_PROP_SET_PANEL_MODE for
avoiding private change in upstream code in QGKI kernel.

Change-Id: I0629dad9399967cc1118ac02ce30597076ca367d
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 23:40:22 +08:00
orion brody
d00d481360 disp: msm: move from drm_mode to msm_mode
Move away from the private and private_flags fields from drm_mode,
as it is being deprecated in latest kernel version. Instead, Add
msm_display_mode as a wrapper to be used in downstream to store these
parameters. Also, store msm_mode in connector_state to be accessed
in commit path.

Change-Id: Ia5bdebe75f00aa15fb7db4dc3a0d50c30894a95c
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2021-01-04 13:18:36 -08:00
Samantha Tran
16cc165833 disp: msm: obtain bridge from bridge chain
Commit 05193dc38197 ("drm/bridge: Make the bridge chain
a double-linked list") creates a bridge chain linked
list. This change updates the relevant changes to msm
driver to use the list to find the bridge associated to
the encoder.

Change-Id: I59eb2910be96f4fff7bdbeb040d6ad204c41d747
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:24:59 -08:00
Yashwanth
d069726235 disp: msm: sde: update encoder atomic check during qsync usecase
During wb/cwb usecases, connectors_changed flag will be
set and needs modeset condition will be set to true. This
change updates qsync concurrency check with modeset to
fail atomic check only if there is seamless poms, dms or
dynamic clock scenario.

Change-Id: I1183f25cd45310fbd1d0b5ce67ee3d5dd3660fe0
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-12-07 16:15:23 +05:30
qctecmdr
70df5208b0 Merge "disp: msm: sde: ignore HW recovery disable event" 2020-12-03 11:57:17 -08:00
Veera Sundaram Sankaran
98c9ba6153 disp: msm: sde: ignore HW recovery disable event
The current SDE driver logic during MDP hang cases is to send a capture
event to user-mode if recovery custom event is registered. Otherwise, it
will enforce a device panic for debugging purpose. This might have a race
condition during the display tear-down sequence as user-mode unregisters
the recovery event when the last frame is in progress. If the last frame
causes any MDP hang, it will result in a device reset. Support only the
event registration to avoid this case, since HW recovery is not expected
to be changed dynamically.

Change-Id: I8a11e1060b239ac6827f1d078e3e396cff4c1325
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-12-02 15:29:19 -08:00
Krishna Manikandan
6bf86dc2e5 disp: msm: sde: retain ubwc settings during LA to LE transition
Setting hbb value based on the ddr type of the target is
not supported in trusted vm environment. Add changes to
retain the ubwc configuration programmed by LA during the
transition to LE environment.

Change-Id: I1fa308ea99f815cfe4d1c75a22dbb6f89a806007
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-11-29 20:24:29 -08:00
qctecmdr
dd441d864e Merge "disp: msm: sde: clear pending flushes after disable commit" 2020-11-22 22:51:31 -08:00
Yashwanth
4c64aa726a disp: msm: sde: move qsync validation to encoder atomic check
In connector atomic check, seamless vrr cannot be
determined since mode doesn't get populated by that time.
This change moves qsync validation from connector to encoder
atomic check to verify & handle modeset concurrencies.

Change-Id: Ia41bde4c05f98d8ba4cb39c18f2da1683cf9e5a3
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-11-18 14:04:38 +05:30
Steve Cohen
a60eb29d55 disp: msm: sde: clear pending flushes after disable commit
Clear any pending flushes after disable so that they are not
re-applied on the next enable for this encoder.

Change-Id: Ic8d387e60b6369062269c48611ee9a9de8887ec7
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-12 01:55:38 -05:00
Abhijit Kulkarni
f1a277597f disp: msm: sde: delay frame trigger on esd failure
This change adds support for delaying kickoff in case of ESD error.
This delay is required to handle a race condition between esd
workqueue and display thread.
When ESD workqueue detects the esd and while handling the failure
notification if the new updates arrive on display thread, there
is a possibility that ESD workqueue will keep on waiting on pp_done.
This could happen if display thread keeps on incrementing the kickoff_cnt
before workqueue can check the condition. With this change the kickoff is
delayed, allowing the workqueue to get scheduled and avoiding the race
condition.

Change-Id: I8e6fff5ea5494ae801d1e60ae85b7ad19cc12961
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-03 10:14:58 -08:00
Steve Cohen
50e20bde15 disp: msm: sde: update RSC when QSYNC property is updated
RSC is updated during encoder enable/disable/modeset or power-
collapse/wakeup. The RSC vote for primary display will change
depending on QSYNC status which might change without modeset or
power-collapse. Add a call to update the primary display's vote
when the QSYNC property is updated.

Change-Id: I664754e4aae689ef2db5b1ef7b8b55a4c5fad3be
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-10-27 13:27:56 -04:00
qctecmdr
68f4129cc6 Merge "disp: msm: sde: add support for qsync min fps list" 2020-10-19 16:18:30 -07:00
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
qctecmdr
c83a1df2b3 Merge "disp: msm: sde: avoid tx wait during cwb disable and reset" 2020-10-14 23:19:14 -07:00
Jayaprakash
d1b2e0be42 disp: msm: sde: add verbose evtlogs for debug purpose
Add changes to extend the current evtlogs for ease
of debug purposes.

Change-Id: Ibe136afbf25b8b8decfc06ef3868e3f628df4dcb
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-14 11:19:05 +05:30
Dhaval Patel
d9f194e6f7 disp: msm: sde: avoid tx wait during cwb disable and reset
Avoid TX wait during CWB encoder disable and delay
reset call after last CWB frame trigger.

Change-Id: I9f96d522cfe4205e0272b6b3fa9edd409cab3648
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-10-08 21:51:23 -07:00
qctecmdr
5e96441e58 Merge "disp: msm: sde: delay cwb done wait for last frame" 2020-10-01 00:36:12 -07:00
Zhao, Yuan
01466c6032 Revert "disp: msm: sde: trigger esd recovery before event notification"
This reverts commit 9ce6a2fbb3.
Revert the change for sde_encoder.c, and keep the change for
sde_connector.c.

Change-Id: I19ff26e4543b9b338ccaf363c99c5eb2c115f99b
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-09-30 10:52:59 -07:00
Dhaval Patel
8d6fea832e disp: msm: sde: delay cwb done wait for last frame
Commit Ifa100424733 ("disp: msm: sde: delay
encoder disable for clone mode") delays the CWB
encoder disable but it is also skipping the CWB
disable flush. That can cause the underrun on dp
display if it uses the same 3d_merge HW block. This
change reverts the portion of original code and
only delays the last cwb frame done wait. It still
keep the last CWB frame done wait as it is if crtc
is also moving to inactive state.

Change-Id: I3461188a35197f2925899ceea7ef705adf00a398
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-30 10:19:23 -07:00
qctecmdr
5100a8e9e9 Merge "disp: msm: sde: check for null topology in dither setup path" 2020-09-25 10:44:51 -07:00
Amine Najahi
43113b945e disp: msm: sde: check for null topology in dither setup path
Check for invalid topology value before extracting the number
of LMs in dither setup path. This occurs when there is a race
condition between runtime supend/resume and dynamic FPS switch.

Change-Id: Ibf4bd2fe5f094ddec11ebc5b85ea9a5cfa0e91a7
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-09-25 10:32:10 -04:00
Dhaval Patel
9ce6a2fbb3 disp: msm: sde: trigger esd recovery before event notification
ESD recovery schedules KICKOFF event on event_thread,
switches the vsync source to wd_timer and waits for
pending frame. This work is triggered from workthread
and it must be finished before panel dead event
notification to avoid race condition with power off
sequence. This change also cancels the delayed work
after encoder is disabled.

Change-Id: Iadc5753238a54e6dad3ff57a9b8ae3bd9644c0dc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-22 16:53:49 -07:00
Steve Cohen
38a8d2134b disp: msm: update POMS detection logic
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>
2020-09-19 00:09:43 -04:00
qctecmdr
0252310b1b Merge "disp: msm: sde: avoid registering vblank callback during CWB" 2020-09-10 18:45:36 -07:00
qctecmdr
987b50fe8f Merge "disp: msm: sde: delay encoder disable for clone mode" 2020-09-09 13:17:51 -07:00
Yashwanth
35b948550d disp: msm: sde: add null pointer check for encoder current master
During virt enable call, sde_enc master will be removed and
re-assigned. If an underrun is observed during this
scenario, it results in crash due to uninitialized access.
This change handles the above scenario.

Change-Id: Iec9e4a0bc4b763e44933334dacf82f1439eacc17
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-08 10:00:31 +05:30
Abhijit Kulkarni
3db847b7bf disp: msm: sde: fix vblank wait after cache read mode update
This change fixes the vblank wait after system cache read mode
update. Without this change the wait does not happen since there is
no pending kickoff. This change uses encoder api to flush the
configuration and explicitly waits for vblank.

Change-Id: I8942f9b638e784c8fd9b5df33a9ccc7087a5eaef
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-09-03 13:33:27 -07:00
Dhaval Patel
28826f09cf disp: msm: sde: delay encoder disable for clone mode
Clone WB encoder disable before posted start commit
trigger adds wb_wait delay in current frame trigger
sequence. This adds 1 frame jank if CWB enable/disable
path exercised periodically like 100ms or 200ms. This
change delays CWB encoder disable after frame trigger
and vsync/wr_ptr wait to avoid jank issue.

Change-Id: Ifa10042473397b37396d217d2410e7cf5a1e32a1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-02 13:24:16 -07:00
Yashwanth
45d0998b96 disp: msm: sde: update misr check to configure misr in secure UI
This change updates misr checks so that misr can be
configured during secure display session. In the current
code, misr_reconfigure flag is set only when accessing
through debugfs node.

Change-Id: Ic3a8316a4881551da3f0f340f6ef5ae3fbe4913f
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-08-31 19:38:51 +05:30
Raviteja Tamatam
2211a5dac3 disp: msm: sde: avoid registering vblank callback during CWB
During cases where vblank callback registration happens during
CWB is enabled and deregistered at point of no CWB, WB encoder
is left with dangling vblank_cb. Added changes to avoid registering
vblank callback on the clone mode encoder.

Change-Id: I62aa12ef453166d2f5558852d924f87841872f37
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-08-27 13:41:41 -07:00
qctecmdr
20ed4f0785 Merge "disp: msm: sde: disable border color on empty blendstage" 2020-08-13 16:50:24 -07:00
Lei Chen
f11da41a6e disp: msm: sde: add a property to control display input touch event
Display input touch event is replaced with IOCTL in performance HAL
to early wake up DSI clock.
Add a property to enable/disable display input touch event for backward
compatibility.

Change-Id: Ib6b9123d726e79a2927b05d1ef77c343f01d0c5e
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-08-12 17:32:20 -07:00
Abhijit Kulkarni
9c9159afdb disp: msm: sde: disable border color on empty blendstage
This change disables the border color on the layer mixer,
based on the caller's request. This is required to totally
disconnect the layer mixer hardware when it is not
participating in blending the pixels. Having empty blendstage
but border color enabled, allows Layer mixer hw to produce
border pixels even when blend stage is empty.

Change-Id: I8e84aeedffbd42ad793a167a6cc5a3a653864c1a
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-08-10 18:29:04 -07:00
Lei Chen
91dbcc12f6 disp: msm: sde: change log level from error to debug when CRTC is null
Encoder CRTC can be null during modeset concurrecy, so change the log
level from error to debug when CRTC is null for display early wakeup.

Change-Id: I67c2413a284d70c415616921608eaebdf0f7a298
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-08-03 02:26:55 -07:00
Narendra Muppalla
f8e7d9d5d1 disp: msm: sde: program misr at encoder kickoff stage
As per current design misr enable sequence is happening at
atomic check level. At this state, misr configuration may reset
if clocks are enabled through atomic commit sequence. This change
moves misr enable/disable sequence from debugfs context to
encoder kickoff to avoid misr register reset with idle pc.

Change-Id: Ia4faa200f96b76ba8c7ef3f45a26108e34b5e687
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-28 17:26:09 -07:00
qctecmdr
32e305e278 Merge "disp: msm: sde: avoid extra vblank refcount from modeset" 2020-07-28 03:30:05 -07:00
qctecmdr
2b8aaf8652 Merge "disp: msm: fix driver unload issues in gki config" 2020-07-24 11:17:20 -07:00
qctecmdr
5c9e7ebc98 Merge "disp: msm: sde: add macro for default fps" 2020-07-24 06:38:09 -07:00
Linux Build Service Account
87f5eca6e0 Merge changes I63392417,I6ca0188d into display-kernel.lnx.5.4
* changes:
  disp: msm: add trace logs in display early wakeup function
  disp: msm: add support for display early wakeup
2020-07-23 07:38:30 -07:00
Dhaval Patel
b49188b45a disp: msm: sde: avoid extra vblank refcount from modeset
SDE encoder modeset add and remove the vblank refcount
based on userspace vblank refcount request. This logic
can have race condition with vblank update from
crtc event thread. It is already avoided with
Ibb810ec90e8 ("disp: msm: sde: manage vblank
refcount concurrency").

Change-Id: I1749bff2e2574500db03a405781eab7496f307b2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-07-22 22:35:19 -07:00
Narendra Muppalla
cea2d1cef0 disp: msm: sde: add macro for default fps
This changes adds macro for default fps.

Change-Id: Ieb1d38bd6fbfcd3fec7e2cc6e39636b6297dd0ef
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-22 13:07:45 -07:00
qctecmdr
e50c2562c7 Merge "disp: msm: sde: reconfigure misr based on user input" 2020-07-19 12:15:43 -07:00
qctecmdr
1e19ca1adb Merge "disp: msm: sde: trigger pm_qos vote with encoder idle pc" 2020-07-19 08:19:48 -07:00
Orion Brody
66f04c4716 disp: msm: fix driver unload issues in gki config
Resolves segmentation fault during driver unload in GKI
configuration, caused by repeated debugfs destroy calls.
Also removes redundant unload calls.

Change-Id: I20a8efc1916b9a60766f9c7714a4b458aa518566
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2020-07-15 12:26:08 -07:00
Narendra Muppalla
2c2a06abba disp: msm: sde: reconfigure misr based on user input
In current SDE driver when misr is enabled, for each commit in
encoder kickoff stage misr is configured for both lm and interface
misr blks. This can clear misr data before client could collect misr.
This change avoids misr data clear and configures misr based on
user input.

Change-Id: I85fc19c78afc6d01346219250c82f2ada824eb0d
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-14 18:06:14 -07:00
Dhaval Patel
5a6facc39e disp: msm: sde: trigger pm_qos vote with encoder idle pc
Commit d46cae019e ("disp: msm: sde: trigger pm_qos vote
with irq enable") moves the pm_qos vote with irq
enable/disable state. Such irq enable/disable call may be
triggered from atomic context and lead to scheduling issues
due to mutex_lock usage in pm_qos APIs. This change moves
the vote with encoder idle pc to allow lock usage with sleep.

Change-Id: I2d22566fbfb5399c5d2d2a4efe882a1928cfbbf8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-07-14 16:26:51 -07:00
qctecmdr
dba8ecd836 Merge "disp: msm: sde: remove unused output parameter in _get_tearcheck_threshold" 2020-07-14 12:28:45 -07:00