Commit Graph

2781 Commits

Author SHA1 Message Date
Bruce Hoo
1ef7ff26d6 disp: msm: dp: pass drm_dp_aux to drm_dp_link_train* APIs
Pass additional parameter drm_dp_aux to drm_dp_link_train APIs
in order to use drm_dbg_* within those functions.

Change-Id: Icc111ecce78fbbac77eb044ce4200377d3616fc9
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:26:33 -07:00
Jeykumar Sankaran
095265339d disp: msm: sde: include of_common header for usage
Include of_common header file explicitly to use
of_fdt_get_ddrtype().

Change-Id: Idd814d6188d585b2d0ecd6935f3260a79d15401b
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:26:23 -07:00
Jeykumar Sankaran
3f072ce464 disp: msm: dsi: avoid using devm_pwm_put
API got deprecated in kernel 5.15. Remove the usage.

Change-Id: I10c4fdee1074fcf50ae4fe28124692dae7a31c7c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:26:09 -07:00
Jeykumar Sankaran
425df29bb6 disp: msm: sde: avoid checking debugfs_create_bool return value
Adapt 5.15 kernel upstream change to return void for debugfs_create_bool.

Change-Id: I9f2ece04dddeba8f43d603fbb62517ea5fb48e7c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:25:51 -07:00
Jeykumar Sankaran
0192a3616e disp: msm: sde: remove drm_irq header
Remove deprecated/unused header inclusion.

Change-Id: I0b0adc155b154c05f814c02cbff4945484896963
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:25:39 -07:00
Jeykumar Sankaran
83ddc159d0 disp: msm: remove stale ION references
After adapting dma buf api's these references and
paths are unusable. Clean it up.

Change-Id: Id6fa76945132e312e8bacf6e430633b0db9e48a3
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:24:53 -07:00
Lei Chen
8f074719a5 disp: msm: replace msm_smmu_set_attribute with qcom_iommu_enable_s1_translations
Domain attributes has been deprecated on 5.14 kernel, so replace
msm_smmu_set_attribute with qcom_iommu_enable_s1_translations.

Change-Id: I1bf2d5ee089a418eb73605327e82b2e26bd6bada
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:23:25 -07:00
Jeykumar Sankaran
6a3c793980 Revert "disp: avoid display techpack compilation for Kalama QMAA mode"
Reverting the temporary change merged to disable display dlkm compilation.

This reverts commit 87019ed83e.

Change-Id: If4e047aecf3b65e44fb506f084eeee3e65873650
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:22:57 -07:00
qctecmdr
3f2b2556f3 Merge "disp: msm: dp: remove benign warnings about missing properties" 2021-10-15 16:01:00 -07:00
Dhaval Patel
511c546a52 disp: msm: sde: disable vsync counter before tear check update
Disable vsync counter before single buffer tear check
update. It allows to trigger the resolution switch
frame as posted start frame.

Change-Id: I2726372fd0e6d14ab0f79e3e3b0731a074158682
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-10-15 13:59:43 -07:00
Sandeep Gangadharaiah
d3d3794b51 disp: msm: dp: destroy mst topology on unplug
On an MST unplug, the MST topology manager state needs to be cleared
so it can properly destroy the current topology. But since the mst
active state is cleared prematurely in the driver, this call is
skipped and on a subsequent plug-in, the topology manager ends up
using stale topology from previous configuration. Incorrect RAD 
values are used for sideband, causing them to fail.

This change fixes the order of operations, so the topology manager
state is properly updated on unplug. It also removes a duplicate
hpd notification to usermode.

Change-Id: Idcff17be113a361a0b58e54d85957f30d1d4e2d6
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-10-15 10:02:01 -04:00
qctecmdr
69820d1ac4 Merge "disp: msm: sde: handle partial update transitions in rounded corner" 2021-10-15 06:14:11 -07:00
qctecmdr
e587119a88 Merge "disp: msm: sde: fix reclaim error handling" 2021-10-14 15:32:33 -07:00
qctecmdr
e967184207 Merge "disp: msm: dsi: change allocation to kvzalloc" 2021-10-13 20:40:23 -07:00
Alisha Thapaliya
00fb8baa9d Merge remote-tracking branch 'quic/display-kernel.lnx.5.10' into display-kernel.lnx.1.0
* quic/display-kernel.lnx.5.10:
  disp: msm: sde: disable vsync_in to update tear check
  disp: msm: dsi: flush workers during pre-release
  disp: msm: dsi: swap DSI timing engine programming and ROI cmd tx
  disp: msm: sde: reset dsc mux config in encoder disable
  disp: msm: sde: avoid dsc hw allocation switch for an active display
  disp: msm: dsi: add support for non 1/1 MND dividers

Change-Id: I69491902ce0bf6391303e407d06cc6a4cd3087a2
2021-10-13 15:51:58 -07:00
Dhaval Patel
25c3b955c6 disp: msm: move thread priority call from component bind
Move thread priority call to kernel worker thread because
component bind API may run from vendor_modeprobe process
context when all drivers probe succeed. Thread priority
update is not allowed from vendor_modeprobe process
context.

Change-Id: Iafac97ce02942d6a2134495232f3c395ba4a362f
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-10-13 15:00:40 -07:00
Shashank Babu Chinta Venkata
e13444d9ac disp: msm: dsi: avoid updating bitclk when dyn clk is disabled
Currently the bit clk rate is overridden by cached clock rate
even in dynamic clock disabled usecase where it is not configured.
Avoid this override by retaining calculated bit clock rate for respective
mode in such usecase.

Change-Id: Ib159219fd50ab977edb8332c83bc8b34aee2dc0f
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-10-13 14:08:44 -07:00
Abhijit Kulkarni
b17cb15861 disp: msm: sde: fix reclaim error handling
On reclaim error, mem handle is still valid and reclaim
should be retried on next commit. This change keeps the
mem_handle valid.

Change-Id: Ie3e0cc3d37c7f1f260a7655f48a6aadece65a1ca
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-10-12 18:07:57 -07:00
qctecmdr
b1e561d3f5 Merge "disp: msm: sde: disable vsync_in to update tear check" 2021-10-12 13:00:35 -07:00
Shashank Babu Chinta Venkata
b14335c311 disp: msm: dsi: change allocation to kvzalloc
Alter allocation method from kzalloc to kvzalloc since virtually
contiguous allocation should suffice requirement. This will avoid
unnecessary invocation of OOO handlers.

Change-Id: I8291ddae08f6427478cdd9b88d6148e02d7ab002
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-10-12 11:34:51 -07:00
Anjaneya Prasad Musunuri
95c0a9e681 disp: msm: sde: reset feature wrappers based on target capabilities
Reset feature wrappers of Rounded corner, Demura and SPR
based on display processing engine capabilities of target.

Change-Id: I0db1f23a1b8b81eb7867680930168e2c3a6999b9
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
2021-10-12 18:23:50 +05:30
qctecmdr
493cb4b048 Merge "disp: msm: dsi: flush workers during pre-release" 2021-10-11 13:32:47 -07:00
Yu Wu
1b6075d5c1 disp: msm: dsi: remove check for reset gpio config in ext bridge mode
When validating panel resource, no need to check reset gpio if using
ext bridge mode.

Change-Id: Id0df84b9e0d8b10f4dd6851d5b3ab31b220f8622
Signed-off-by: Yu Wu <zwy@codeaurora.org>
2021-10-10 22:58:58 -07:00
Mahadevan
7f7c4b8e20 disp: msm: sde: add rev checks for diwali target
Add required revision checks from display for
diwali target.

Change-Id: Ib165b1133eea1203de3b946b46cf39ee0ad05e47
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-10-11 11:20:13 +05:30
qctecmdr
721fee5459 Merge "disp: msm: dsi: swap DSI timing engine programming and ROI cmd tx" 2021-10-08 14:35:59 -07:00
Dhaval Patel
daa4273e02 disp: msm: sde: disable vsync_in to update tear check
Commit b67da33a6307 ("trigger tx_wait if panel
resolution switch") increases the mode switch latency.
Alternatively, single buffer tear check registers can be
updated when vsync_in is disabled. It allows mode switch
frame trigger as posted start frame trigger.

Change-Id: I8068736b2ea01f6e4160e765fc39d7fc2a8590c9
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-10-08 13:29:45 -07:00
qctecmdr
11bda1ae79 Merge "disp: msm: dsi: add support for non 1/1 MND dividers" 2021-10-08 10:40:51 -07:00
qctecmdr
fba8cf7c57 Merge "disp: msm: sde: reset dsc mux config in encoder disable" 2021-10-07 21:23:56 -07:00
Jeykumar Sankaran
754552cfc4 Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0
* waipio_base:
  disp: msm: sde: add new support for digital dimming
  disp: msm: sde: trigger tx_wait if panel resolution switch
  disp: msm: reserve core clock rate during display disable
  disp: msm: dsi: reorder DSI registration
  disp: msm: sde: account for pref lm when exposing avail resources
  disp: msm: reset lm blend stages for missing vsync
  disp: msm: dp: set drm mode clock same as clock value from EDID
  disp: msm: sde: set top left coordinates for noise and attenuation layers
  disp: msm: dp: disable ASSR before link training
  disp: msm: dp: retry the request to set USB mode during bootup
  disp: msm: sde: clear intf mux select on slave encoders
  disp: msm: retry dma buf attach on msm_gem_delayed_import error
  disp: msm: dp: check for aux abort in sim mode
  disp: msm: dsi: add qsync min fps val in dsi display mode priv info
  disp: msm: dp: read DPCD registers using debugfs
  disp: msm: dsi: mark signature for stub appropriately
  disp: msm: dp: check for DP stream during audio teardown
  display: msm: sde: reduce dbg mem usage for tui vm

Change-Id: I285e4557ad258f17fc2948b478198b9b81c18276
2021-10-07 16:19:39 -07:00
Steve Cohen
bd01b504a5 disp: msm: dsi: flush workers during pre-release
Wait for asynchronous DSI DCS command transfers to complete
before disabling DSI interrupts during pre-release. This is
required to resolve a race condition where dsi worker threads
can trigger HW access while a VM lend/release is occurring on
the CRTC commit thread.

Change-Id: Ia1f153a2cd008c617dba274473e7678b01a38d29
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-10-07 17:24:57 -04:00
Satya Rama Aditya Pinapala
bcd04f60da disp: msm: dsi: swap DSI timing engine programming and ROI cmd tx
The ROI commands are sent with an asynchronous command transfer wait.
If the queued CMD DMA wait for done gets scheduled before the DSI
controller timing engine programming, the later will be blocked waiting
on the ctrl_lock, which was acquired by the queued DMA wait for done work.
This effectively negates any advantage of having the async wait flag for
ROI commands blocking the main commit thread.

The change swaps this order to ensure that such a scenario never happens.

Change-Id: I8a971c0c7733eea3d435b637ca41b34fa60adfc1
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-10-07 10:58:32 -07:00
qctecmdr
c460ffbd27 Merge "disp: msm: sde: trigger tx_wait if panel resolution switch" 2021-10-07 01:25:29 -07:00
Prabhanjan Kandula
9e988121fc disp: msm: sde: reset dsc mux config in encoder disable
During display encoder disable, reset the dsc control
mux configuration during null commit to ensure dsc hw
blocks are cleanly freed up.

Change-Id: I02e2f074450e4d7b49dc8fec14777f380786c63e
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-10-07 00:09:06 -07:00
Prabhanjan Kandula
7db951ec69 disp: msm: sde: avoid dsc hw allocation switch for an active display
While hw resources allocation for an active display during modeset, avoid
dsc hw allocation switch by finding which dsc encoders are allocated
previously and allocate same dsc hw encoders. This helps in fixing underrun
issues in below scenario of dual display power ON/OFF.
Use case: Dual DSI display setup, both are DSC enabled, primary in video mode.
    --> when both displays are in powered off, all hw block are free.
    --> enable second dsi display
    Since LM 0/1 marked for primary, LM 2/3 allocated along with DSC 0/1
    --> enable primary display
    LM 0/1 allocated with DSC 2/3 encoders
    --> Now power off secondary DSI
    DSC 0/1 are freed up
    --> Immediate modeset on primary, DSC allocation switched
    LM 0/1 and DSC 0/1 allocated. DSC 2/3 are freed up as per RM but
    decoupling DSC 2/3 blocks with respective pingpong or intf is not done.
    This is causing underruns on primary.
Tracking which DSC blocks are freed during resource switch and programming the
respective DSC control mux configuration is not feasible and not scalable as
any other display can allocate those blocks and would require synchronizing
across display threads. So approach taken is avoid dsc resource switch itself.

Change-Id: I7f740722a52266740c4b168edc0c619e3cf68989
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-10-07 00:04:33 -07:00
Srihitha Tangudu
b53b12b1ad disp: msm: dsi: add support for non 1/1 MND dividers
Adjust pll pclk rate to support non 1/1 dispcc MND
divider values by updating pclk div calculation.

Change-Id: I1972b536a109b97978e843f046b1db4ad6813a51
Signed-off-by: Srihitha Tangudu <tangudu@codeaurora.org>
2021-10-07 00:49:17 +05:30
Ping Li
629228c353 disp: msm: sde: add new support for digital dimming
Add new properties to support dynamically turning on and off digital
dimming and setting new minimum backlight.

Change-Id: I3b94190877d556768ba2c92ec59432dec44de0de
Signed-off-by: Ping Li <pingli@codeaurora.org>
2021-10-05 21:15:09 -07:00
Dhaval Patel
b696aa3b24 disp: msm: sde: trigger tx_wait if panel resolution switch
Trigger tx_wait if command mode panel resolution
switches during mode switch to avoid early single buffer
tear check programming.

Change-Id: Ib747df8250c714248a44b596c2c8aeef006ea4fc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-10-04 13:16:00 -07:00
Sandeep Gangadharaiah
b55d8085d8 disp: msm: dp: remove benign warnings about missing properties
The parser is throwing warning for missing properties in device
tree, which might not be present in all variants. This warning
can be ignored and is downgraded as a debug log.

Change-Id: I1b3f6e9e3d21a0a84585ace4eba15710464d7b51
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-30 11:26:01 -04:00
Anjaneya Prasad Musunuri
798f058dfb disp: msm: sde: handle partial update transitions in rounded corner
This change clear cached ROIs when rounded corner feature is
disabled to ensure full frame ROI for first frame when feature
is enabled again. This change depends on HAL change to disable PU
for one frame when RC mask config is set.

Change-Id: I4c48ccd3f64409d1b0fa19f0e6f92eab5f86d099
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
2021-09-29 17:09:00 +05:30
qctecmdr
5f5c61faa0 Merge "disp: msm: dsi: reorder DSI registration" 2021-09-29 02:10:57 -07:00
qctecmdr
f96c6ed42d Merge "disp: msm: dp: set drm mode clock same as clock value from EDID" 2021-09-27 19:14:22 -07:00
Dhaval Patel
c281b3a879 disp: msm: reserve core clock rate during display disable
Userspace module may not trigger the atomic check and it
can cause the commit failure. In such case, always reserve
the minimum core clock rate on mmrm module for built-in
displays to avoid the power ON failure.

Change-Id: Iafd92a7b7d1b35befe70b041cbedaec2add40de4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-09-27 13:44:12 -07:00
Shashank Babu Chinta Venkata
1263b4cabc disp: msm: dsi: reorder DSI registration
Reorder registration of various display drivers in the order of
dependency.

Change-Id: Idfa0616d3133f3b03c713e3c15a4fd3956ec2594
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-09-27 11:22:08 -07:00
Nilaan Gunabalachandran
711eabbf43 disp: msm: sde: account for pref lm when exposing avail resources
If an external display, such as DP, requests for the available
resources, resource manager (RM) will provide a count of all unused
mixers. If the primary/secondary display(s) are not active, the RM
will report the associated preferred mixers as free resources.
However, RM will not allow preferred mixers to be allocated to other
displays. DP driver could look at these available resources and assume
a high resolution mode is possible and fail during resource allocation.

This change updates the available resources info API to account for
primary/secondary preferences while exposing available resources.

Change-Id: I134a1047f24ac9f1fcee695aa14a1d3e43c1571f
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-09-27 12:13:37 -04:00
qctecmdr
f1ae36dfab Merge "disp: msm: reset lm blend stages for missing vsync" 2021-09-24 00:47:23 -07:00
qctecmdr
efebe33c3e Merge "disp: msm: sde: set top left coordinates for noise and attenuation layers" 2021-09-22 09:59:18 -07:00
Dhaval Patel
fc2226ea25 disp: msm: reset lm blend stages for missing vsync
MDSS INTF HW block does not generate vsync if controller
turns off the link clock prematurely. This leads to
frame trigger timeout and SDE driver triggers the retire
fence after 84ms to recover gracefully. A client may switch
source pipe from one CTL path to another CTL path based
on delayed retire fence. It can lead to other ctl path
hang. This can be resolved by resetting the lm blend
stages for each missing vsync frame trigger.

Change-Id: I5a6ed03afbdad83d8fd6decc593d39e04bef62e4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-09-22 09:46:32 -07:00
Sandeep Gangadharaiah
e3927fdfaa disp: msm: dp: set drm mode clock same as clock value from EDID
Commit Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1 updated the dp
driver to extract the drm mode clock from timing parameters
instead of using the clock value provided by EDID to align the
behavior with DSI driver. But this results in incorrect clock
value if the refresh rate is not an integer value. For rates
such as 59.94 or 29.97, the calculated mode clock value would
be different from what is stipulated by EDID. This change
reverts the mode clock calculation to use the clock value
from EDID.

Change-Id: I3e192ef09d2456fbb1d22a0bf9474ac25ba86c72
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-09-21 18:06:57 -04:00
Anjaneya Prasad Musunuri
0a214e5d4a disp: msm: sde: set top left coordinates for noise and attenuation layers
Noise and attenuation layers are full screen layers. Top left coordinates
are not cleared in some use cases when same blend stage is assigned to
noise and attenuation layers. This change sets top left coordinates of noise
and attenuation layers.

Change-Id: I6af7a38d011d0bb642dc3d8a4aff338075524906
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
2021-09-21 23:01:35 +05:30
qctecmdr
e5ed14f97d Merge "disp: msm: dp: disable ASSR before link training" 2021-09-21 10:25:33 -07:00