Commit Graph

2781 Commits

Author SHA1 Message Date
qctecmdr
ce1eceafb0 Merge "disp: msm: dp: fix warnings due to dp_hdcp2p2 thread reparking" 2021-11-02 14:52:25 -07:00
qctecmdr
24057ec69c Merge "disp: msm: dsi: implement ESD recovery cleanup" 2021-11-02 14:52:24 -07:00
qctecmdr
5e95df6d30 Merge "disp: msm: dsi: terminate buffer with NULL character" 2021-11-02 14:52:24 -07:00
qctecmdr
fd1bc18411 Merge "disp: msm: dp: send mst act signal after link maintenance" 2021-11-02 14:52:24 -07:00
Dhaval Patel
0ecc150e06 disp: rsc: update mode-1 threshold config to 1 hz
Update mode-1 threshold configuration to 1 hz to avoid
selecting mode-2 if panel vsync is irregular.

Change-Id: I06b16b8ff35fc145df2af480353a45348548cc3b
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-10-29 20:19:19 -07:00
qctecmdr
c9ecf74127 Merge "disp: msm: add display config support for neo" 2021-10-29 08:35:13 -07:00
Karthik Andhavarapu
6e05f12db7 disp: msm: add display config support for neo
Add display config support for compilation on neo target.

Change-Id: Ia2b9b8b76f833e233a8bf801485c6dd2104e1700
Signed-off-by: Karthik Andhavarapu <quic_kartkart@quicinc.com>
2021-10-29 12:49:40 +05:30
Sandeep Gangadharaiah
994d2568be disp: msm: dp: send mst act signal after link maintenance
If MST is enabled, the controller needs MST ACT to be 
completed to successfully transition to 'Ready for Video' 
state. The driver is sending ACT during the normal flow
when transitioning from link training to stream enable. 
But it is not sending ACT, if a link maintenance is
triggered after stream enable. This change adds the ACT 
update to the link maintenance call flow.

Change-Id: I7aea53a1e54202f1d9059a8eb59f01fa97fe9eb9
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-10-28 16:04:22 -04:00
qctecmdr
ad6ad703c7 Merge "disp: msm: dsi: fix pll lane count in split link usecase" 2021-10-27 19:41:25 -07:00
Shashank Babu Chinta Venkata
213d490593 disp: msm: dsi: fix pll lane count in split link usecase
In split link usecase with single DSI and dual sublink, the
pixel clock rate should  be calculated based on effective lanes
rather than cumulative lanes on that DSI PHY. This effective lanes
can be expressed as number of lanes being used per sublink.

Change-Id: Ia534e816cc64b62c5fe0b9fcaabb9ba52d05bab0
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-10-27 11:50:59 -07:00
qctecmdr
3e2f9ddbd9 Merge "disp: msm: sde: reset feature wrappers based on target capabilities" 2021-10-27 08:00:26 -07:00
Andhavarapu Karthik
c6b0d1fbe9 disp: msm: sde: Move TVM related code under SDE VM config
This change moves TVM related code under SDE VM config.

Change-Id: I8357d6a984fd97f18f24eee33464299e8ea66b12
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2021-10-27 17:51:27 +05:30
Jeykumar Sankaran
15342a23fe disp: msm: sde: add kalama mdss version support
Add kalama mdss revision and enable features based
on the hardware capability.

Change-Id: I27dff07b00ba16d313c5c8dc2661a10e522daea5
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-26 11:34:59 -07:00
Steve Cohen
d9794d82cd disp: msm: sde: remove sde_hw_blk
The sde_hw_blk was meant to be a generic base object for all
SDE HW blocks, however, it enforces using a common set of ops
which is not practical when blocks have different capabilities.
Since this object was never used as intended and is not doing
anything functional today, remove the dead weight.

Change-Id: If76006c1ae5c62e8d7d77b100837dbaf6c661bd3
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00
Steve Cohen
5fe7c2f8a0 disp: msm: remove gem functions without callsites
Many upstream files and APIs have been removed in downstream
driver. Some function definintions are left dangling without
any caller. Remove the functions which are not used downstream.

Change-Id: I9f936e7cdac3be6f854b3c67725164fad785f0d4
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00
Steve Cohen
a683fba2e8 disp: msm: sde: use common naming for version/revision in catalog
Align the HW catalog to use common naming amongst the "revision"
and "version" structure members.

Change-Id: Ib6c81aee6cb49208b0699db4a75b4eb9dc79e800
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00
Steve Cohen
7f0c843da4 disp: msm: sde: move boolean flags in catalog to a bitmap
Move all the individual boolean flags from HW catalog into a
"features" bitmap. These flags are used to specify support of
various target specific features.

Change-Id: I2334b3b873f3737f91bbae4ef576408247710156
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:21:33 -07:00
qctecmdr
195bb007d8 Merge "disp: msm: sde: update rc checks for mask configuration" 2021-10-25 22:07:45 -07:00
qctecmdr
5f5525b418 Merge "disp: msm: sde: add new function for updating the cp feature lists only" 2021-10-25 18:47:06 -07:00
qctecmdr
a757117e6b Merge "disp: msm: sde: protect file private structure with mutex lock" 2021-10-25 11:31:12 -07:00
Sandeep Gangadharaiah
ce86cc5397 disp: msm: dp: fix warnings due to dp_hdcp2p2 thread reparking
This change checks "dp_hdcp2p2" thread's parked state, before
attempting to park the thread. This would avoid a warning
message from the kernel module, in case if the thread is already
parked.

Change-Id: I3133da7159c9806981e4760be275c0a54036958b
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
2021-10-22 19:09:52 -04:00
qctecmdr
dd76bc04e6 Merge "disp: msm: sde: add null check while getting pointer to kms" 2021-10-22 15:17:12 -07:00
qctecmdr
8895819310 Merge "disp: msm: fix rsc static wakeup time calculation" 2021-10-22 12:21:30 -07:00
qctecmdr
8e7228f7be Merge "disp: msm: dsi: limit dma read commands to sublink 0" 2021-10-22 12:21:30 -07:00
Prabhanjan Kandula
35f07ca601 disp: msm: fix rsc static wakeup time calculation
Currently RSC timer register programming is optimized for updating
only during timing param changes and not during RSC state changes
with same timing. Static wakeup time computation should consider
panel jitter for RSC clk state too, else it can result in RSC hang.
This change also removes extra logic for video mode prefil lines
computation for rsc config as video mode does not enable RSC solver.

Current issue scenario exposing the hang is in dual dsi display scenario
where RSC is in clock state and static wakeup time is programmed by
not considering panel jitter, after suspend/pmsuspend while waking up
if RSC switches to command state if primary enabled first and vsync
may arrive much early based on the panel jitter. RSC hw can not handle
if TE arrives earlier than static wakeup time causing RSC hang.

Change-Id: I1434fdd71eb04fdbe22b3601500493c818e9126d
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-10-22 10:55:26 -07:00
qctecmdr
d6d5bcebe3 Merge "disp: msm: dsi: avoid updating bitclk when dyn clk is disabled" 2021-10-22 04:30:39 -07:00
Satya Rama Aditya Pinapala
1317b11bc2 disp: msm: dsi: implement ESD recovery cleanup
After an ESD failure, the PHY lanes and controller can be stuck in
an unknown state. This can result in interrupt storms and watchdog
failures, if these error states are not handled correctly. The following
change implements the below mechanism to avoid failures.

1) Disable error interrupts during an ESD reg read, which are re-enabled once
ESD check is successful.
2) On ESD failure, before turning off LP clocks, reset the PHY lanes and DSI
controller.
3) After the HS clocks are turned off, issue a PHY hard reset.
4) Before enabling/disabling error interrupts, clear the error status registers
as they are not cleared as part of controller reset.

Change-Id: If10e4edf095a334a9416d109ec4b1401d1a84505
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-10-21 16:25:44 -07:00
Shashank Babu Chinta Venkata
43697d6331 disp: msm: dsi: limit dma read commands to sublink 0
Limit dma read commands to sublink 0 in split link
configuration since all panels do not support read
on sublink 1.

Change-Id: I537abafc02afe1c3306175ac850f4f080154f443
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-10-21 16:22:57 -07:00
Krishna Manikandan
45380adf38 disp: msm: sde: protect file private structure with mutex lock
Access file private data structures inside the
mutex lock only to avoid use-after-free issues.

Change-Id: If70731f517bcb47d4515f131fecafe702064cb45
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2021-10-21 14:28:42 -07:00
Rajkumar Subbiah
14e61d16d8 disp: msm: dp: park pixel clock before disable
When switching between 2 dongles/adapters it is possible
to have the same resolution with different link configuration.
Even though the pixel clock could be the same on replug, the
vco clock could be different depending on the link
configuration. Since the dp driver only exposes limited clocks
to the clock framework, in this specific scenario, the clock
driver is unable to recognize the change in source clock rate
and ends up skipping the clock reconfiguration.

This change adds support to park the pixel clocks on disable,
thereby forcing a reconfiguration on subsequent replug even
if the pixel clocks are the same.

Change-Id: If90b37d6285f6cad23cf1c11a7d6ccd6b4cf850c
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2021-10-21 12:58:37 -04:00
Rajkumar Subbiah
af002925b8 disp: msm: dp: set vco divider during pll configure
The divider value for vco clock is only dependent on the link rate
and is known during pll configure. Instead of depending on the
clock framework to program this divider as part of stream clock
enable, this change moves the configuration to pll configuration
and removes the set rate call on the vco clock.

Change-Id: If687a8ab057fdfd6c3b3ad2bd1c51663d9182ff4
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2021-10-21 12:58:32 -04:00
Samantha Tran
6cd653bf2f disp: msm: sde: add null check while getting pointer to kms
Add a null check to avoid null pointer access while getting
pointer to sde_kms.

Change-Id: I00f77e2a5bf63217fa57408ee5ac238dcac3fb03
Signed-off-by: Samantha Tran <samtran@quicinc.com>
2021-10-20 21:28:48 -07:00
Ping Li
4d27e37beb disp: msm: sde: add new function for updating the cp feature lists only
When sde_crtc_atomic_begin is called before crtc is enabled, all the
color processing features need to be moved from active_list to
dirty_list after sde_cp_crtc_apply_properties(). However, the
ltm_hist_en flag doesn't need to be set to false in this case.
Setting ltm_hist_en to false in this case will result LTM merge_en bit
being cleared incorrectly. This change replaces sde_cp_crtc_suspend()
with a new function that only updates the color processing feature lists
in sde_crtc_atomic_begin().

Change-Id: I75d7874899838855bda05a1e8eca0cb9523417e9
Signed-off-by: Ping Li <pingli@quicinc.com>
2021-10-20 11:16:56 -07:00
qctecmdr
5f25adc693 Merge "disp: msm: dsi: add const qualifer for device node in get_named_gpio" 2021-10-20 09:37:40 -07:00
qctecmdr
a6400b2c81 Merge "disp: msm: dsi: remove check for reset gpio config in ext bridge mode" 2021-10-19 22:14:08 -07:00
Satya Rama Aditya Pinapala
4413e3bb7e disp: msm: dsi: terminate buffer with NULL character
Change terminates the copied buffer with a null character.

Change-Id: I18d6b3ca861058a242bde399f631771d3a48eddd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-10-19 12:03:44 -07:00
qctecmdr
531591b654 Merge "disp: msm: sde: add rev checks for diwali target" 2021-10-16 12:35:45 -07:00
qctecmdr
fedae52a47 Merge "disp: msm: sde: disable vsync counter before tear check update" 2021-10-15 19:09:23 -07:00
qctecmdr
705f82e82a Merge "disp: msm: dp: destroy mst topology on unplug" 2021-10-15 19:09:23 -07:00
qctecmdr
e5e23569a0 Merge "disp: msm: move thread priority call from component bind" 2021-10-15 19:09:23 -07:00
Jeykumar Sankaran
8c1a66d6bd disp: msm: dsi: add const qualifer for device node in get_named_gpio
Add const qualifier for the device_node param in get_named_gpio
function pointer hook to adapt msm-5.15 kernel.

Change-Id: I0129efeff5aeb85b567bf6f2b5d2e45312fab024
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:31:55 -07:00
Ingrid Gallardo
b3d598b926 disp: msm: sde: remove memblock_free api
Remove memblock_free api, since currently is not
part of the ack tree. This prevents modpost compilation
errors for the display driver.

Change-Id: I8f657a123fbecc5d4b029d511b8d08fec2293f0c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2021-10-15 17:31:51 -07:00
Ingrid Gallardo
de3e31a08a disp: msm: sde: adjust list_sort api to adapt kernel 5.15 params
Latest Kernel modified list_sort to receive 'const' parameters in
its function pointer, this change modifies the functions used
by list_sort to add 'const' parameters.

Change-Id: I83212e1e7a749132c90011d0a8933c5eb2990bd2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2021-10-15 17:31:47 -07:00
Ingrid Gallardo
cb20292c2d disp: msm: add build configs for Kalama
Add config files for kalama target and enable compilation.

Change-Id: I4ddd89ef927b32c70b66c54e64a8ae5156cccb29
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:31:30 -07:00
Bruce Hoo
45160ca04c disp: msm: use linux IRQ interfaces instead of DRM helpers
Update the msm layer to use linux IRQ interfaces as DRM IRQ helpers
are removed in 5.15 kernel.

Change-Id: I9f41032927cddabe8a5a48e5e9339acef6c6f67e
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:48 -07:00
Bruce Hoo
d1d11731f1 disp: msm: update msm_gem ops and remove unused drm_driver callbacks
Update msm_gem and msm_drv to comply with latest 5.15 kernel.
Modify dma_buf_vmap() and dma-buf's vmap callback to use
struct dma_buf_map. Rename dma_resv_get_excl_rcu to _unlocked.
Remove deprecated GEM and PRIME callbacks.

Change-Id: Ifdfc7f872c988d8455f465e7d17dfbcf212bb5f6
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:27 -07:00
Bruce Hoo
283560cb39 disp: msm: dp: use Extended Base Receiver Capability DPCD space
Pass additional parameters to supply maximum lane count and
rate to MST topology manager. In cases where sources have
lower maximum lane count or rate than default MAX_LINK_RATE,
these values will be used instead.

Change-Id: I9278ce6cc9fbacaf3f6d964c5036208c0695a79b
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:11 -07:00
Bruce Hoo
bfb91aa63f disp: msm: Fix a null pointer access in msm_gem_shrinker_count()
This change moves the point at which msm_gem_object is added to
inactive list. Moving this ensures that initialization will be
complete before adding the object to the list. This change also
removes unused functions from msm_gem.c.

Change-Id: Id8fa04cc88a21e04108ae21b18d5acc761ef4c6e
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:01 -07:00
Bruce Hoo
bf0d2209a0 disp: msm: dsi: add _NO_ to MIPI_DSI_* flags disabling features
Update names of DSI flags to follow upstream convention. Purpose of
the name change is to more clearly indicate what is not supported
when the flag is set.

Change-Id: Ifd62610c4dfebcbbccb0fb2046a7c453e39c9107
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:26:53 -07:00
Bruce Hoo
ddac29b52c disp: msm: Pass the full state to crtc plane and connector atomic functions
Pass full state to crtc, plane, and connector atomic functions and retrieve
drm_crtc/plane/connector_state within the atomic function. Additionally,
the plane atomic update function is used as an upstream hook as well as
locally called in the plane restore path. To ensure both paths are functional,
introduce a plane atomic update version which takes in drm_plane_state
keeping with the previous parameter expectations.

Change-Id: Ia295935dd81ea8680a347eba0929e209d93ae830
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:26:44 -07:00