Commit Graph

1782 Commits

Author SHA1 Message Date
qctecmdr
02e82d15e1 Merge "drm: msm: Reset register when NoiseThresh disabled" 2020-12-03 19:16:31 -08:00
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
qctecmdr
ee8ad711e9 Merge "disp: msm: sde: use prepare_commit connector callback for DSI" 2020-12-02 15:02:46 -08:00
qctecmdr
13c448e20f Merge "disp: msm: dp: add support for continuous PPS command" 2020-12-02 06:10:50 -08:00
Yuchao Ma
c1263308c7 drm: msm: Reset register when NoiseThresh disabled
The change reset register of noise thresh when disabled.

Change-Id: I2bb13167b52c6ba92e32c4fa9b4f0a57122164ab
Signed-off-by: Yuchao Ma <yuchaom@codeaurora.org>
2020-12-01 23:08:15 -08:00
qctecmdr
d9208128c7 Merge "disp: msm: sde: fix dsc 1_2 rate control parameter" 2020-12-01 21:38:54 -08:00
qctecmdr
7c8f6d1332 Merge "disp: msm: dp: fix DSC and PPS version mismatch" 2020-12-01 21:38:54 -08:00
qctecmdr
7d396c0c19 Merge "disp: msm: sde: always enable prog fetch and fix prefill calculations" 2020-12-01 09:15:53 -08:00
Steve Cohen
4eff2d1bce disp: msm: sde: use prepare_commit connector callback for DSI
Some DSI panels require qsync on/off DCS commands to be sent in
prepare commit phase. Add the hook for sending these commands
to the panel. If these commands are not present in the panel's
device tree node, it will be treated as a NO-OP.

Change-Id: Ida65512fe0214779dfa848f6c7b33644d3934afd
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-30 14:02:50 -05: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
Jayaprakash
ea5b9b3157 disp: msm: sde: always enable prog fetch and fix prefill calculations
Enabling and disabling programmable fetch dynamically
across different fps can cause dsi underflow/overflow followed
by underrun. Add changes to always enable prog fetch to handle
such cases. Fix needed_prefill_lines calculation for vfp method
of dfps since linetime is constant in this method and hence
prefill lines need to be based on max_fps. For panels whose
linetime varies with fps, the needed_prefill_lines calculation
remains unchanged.

Change-Id: Ib7b68b577ff903fc2359a8e8c4573d62d55c3828
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-11-26 14:43:43 +05:30
Amine Najahi
7a9e08de70 disp: msm: dp: fix DSC and PPS version mismatch
Currently, driver hardcodes the DSC version to use
to v1.1 in DP driver even if the sink reports v1.2 in
the DPCD DSC_ALGORITHM_REVISISON register. This causes
a mismatch between the source DSC hardware programming
and the PPS packet information sent to sink.

This change sets the PPS DSC version field to the one
reported by the sink and falls back to v1.1 in case of
DPCD parsing error.

Change-Id: I76fb55b7bf9b3925ae3f408008f3257fc85cef2c
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-25 13:16:37 -08:00
Abhinav Kumar
6db41ed532 disp: msm: dp: add support for continuous PPS command
Add support to send PPS command with every frame for DP.
This is needed to satisfy the requirement of certain bridge
chips which need the PPS to be sent every frame.

Change-Id: I8711dff41e60d8b1e1c515a5d34a370a2409ce14
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2020-11-24 18:16:28 -05:00
qctecmdr
a2a3c5e864 Merge "disp: msm: sde: cache encoder_mask for vblank_work" 2020-11-24 06:44:04 -08:00
qctecmdr
318dfe0726 Merge "disp: msm: sde: add vblank mutex lock during irq unregister" 2020-11-23 21:20:26 -08:00
Abhijit Kulkarni
6244f0a8f8 disp: msm: sde: fix dsc 1_2 rate control parameter
This change fixes the rate control parameter namely
first_line_bpg_offset as per recommended hardware
settings.

Change-Id: I88cfc745443cdf6b96a8fca01306dec8a7572b1f
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-23 09:16:03 -08:00
qctecmdr
dd441d864e Merge "disp: msm: sde: clear pending flushes after disable commit" 2020-11-22 22:51:31 -08:00
qctecmdr
559b960ba7 Merge "disp: msm: read mdp intf line count and trigger dma accordingly" 2020-11-22 22:51:31 -08:00
qctecmdr
96ff60165d Merge "disp: msm: sde: add mutex lock to handle ppdone timeout usecases" 2020-11-22 19:38:57 -08:00
qctecmdr
69e06f9fd7 Merge "disp: msm: dsi: avoid TE status check based on rechecks count" 2020-11-21 13:13:35 -08:00
Linux Build Service Account
b76d65a7a6 Merge "disp: msm: sde: use drm mode set by user-mode in trusted-vm" into display-kernel.lnx.5.4 2020-11-20 17:17:33 -08:00
Linux Build Service Account
3f6007cead Merge "disp: msm: sde: reset sw state on vm transition" into display-kernel.lnx.5.4 2020-11-20 17:17:32 -08:00
Linux Build Service Account
36453ed93f Merge "disp: msm: sde: request hard reset on vsync timeout" into display-kernel.lnx.5.4 2020-11-20 17:16:31 -08:00
Linux Build Service Account
f80e5bce2b Merge "Revert "disp: msm: sde: use mdp scratch register to pass drm mode info"" into display-kernel.lnx.5.4 2020-11-20 17:16:31 -08:00
qctecmdr
316f28ff40 Merge "disp: msm: sde: add check to fix null pointer dereference" 2020-11-19 21:56:31 -08:00
qctecmdr
e2bd8f1a9b Merge "disp: msm: sde: move qsync validation to encoder atomic check" 2020-11-19 21:56:31 -08:00
Veera Sundaram Sankaran
db67b18a28 disp: msm: dsi: avoid TE status check based on rechecks count
The rechecks count in dsi_display_status_check_te defines the
number of times the TE status needs to be checked before exiting.
Avoid the execution if rechecks is set to zero as it would avoid
unnecessary irq status changes.

Change-Id: Ice31701ac06f5b0a82f29b5f415dcb0b055e7b16
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-19 12:13:18 -08:00
Veera Sundaram Sankaran
643e9c2d80 disp: msm: sde: move vm-ownership check to crtc custom events
Currently all the custom event register/unregister calls are
blocked based on the vm-ownership checks. Avoid this check
for connector events as it has only software updates unlike
the crtc events which directly touch the HW registers. This
allows the connector events to be registered before the first
commit where the VM ownership is obtained.

Change-Id: Id78e365929cb958ead10221b9267f1c1c0406a27
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-19 12:13:17 -08:00
Jeykumar Sankaran
46e0ac3354 disp: msm: sde: remove HARD_RESET recovery event on frame-timeouts only
On frame timeouts, the driver should only be responsible for
reporting the error event to user space clients. Handling of
the error events should be left to the user space clients.

This change removes explicit mechanism in SDE driver to track
error events for a pre-defined threshold levels and RESET hints
sent to the user space on handling those error events during
frame timeouts.

Change-Id: I7bdf2495fae6430384b4031a7edf043b6efe88c5
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-11-19 10:33:30 -08:00
Harigovindan P
8dd3b42c57 disp: msm: read mdp intf line count and trigger dma accordingly
when a broadcast DSI command is scheduled, the command can get
triggered close to the schedule line. This might cause DMA
timeout. This change reads the video line count from
MDP_INTF_LINE_COUNT register and checks whether DMA trigger
happens close to the schedule line. If it is not close to the
schedule line, then DMA command transfer is triggered.

Change-Id: Ida92e63e46b4cc703d57ce24097834f810776aa8
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
2020-11-18 23:41:05 -08:00
Veera Sundaram Sankaran
e07097c244 disp: msm: sde: use drm mode set by user-mode in trusted-vm
Trusted-vm uses the cont-splash path to initialize the software
states by reading the hardware registers and populating the
SDE & DRM software states. But drm mode cannot be determined by
register reads, so rely on user-mode to get the mode which comes
as part of the first atomic_commit check phase which handles the
transition. The primary-vm user-mode passes the current mode to
trusted-vm through qrtr which is in-turn passed to driver to
set that particular mode.

Change-Id: I4fb86b40b8a0583c8edb539b0a51dcd33de731ff
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 17:32:58 -08:00
Veera Sundaram Sankaran
b403c57119 Revert "disp: msm: sde: use mdp scratch register to pass drm mode info"
This reverts commit e8309fcbf5. Removing
the scratch register logic to pass information between the VMs as the
design changed from kernel to user-mode for passing the mode information
through qrtr from primary-vm to trusted-vm.

Change-Id: Ibfa4b0004496f68b272da808e866f5226b02c013
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 16:56:50 -08:00
Abhijit Kulkarni
91a070feb3 disp: msm: sde: request hard reset on vsync timeout
During frame updates if vsync timeout happens, the probable reason
is pixel_clock is turned off. In such a case the recent update is
not applied on hw and can lead to issues. For example if a pipe
was detached it will not get detached since this update will not
take place.
This change detects the timeout and requests a hard reset from user mode
driver so as to ensure that all the displays are power off and footswitch
is turned off. This will ensure dpu hardware gets reset.

Change-Id: Ic9bade88b6502feb7334d239eaf669977233dbac
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-18 15:13:55 -08:00
Abhijit Kulkarni
fef65e7b8c disp: msm: sde: reset sw state on vm transition
This change resets the plane and crtc dirty properties on
transition to other VM. This ensures when the VM acquires the
hw again all these properties on the new state are reapplied.

Change-Id: Id95676453eb9ae937b1b22f0e244b47449101cb0
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-18 14:37:04 -08:00
Yashwanth
91291bb9c4 disp: msm: sde: add vblank mutex lock during irq unregister
Currently, during ctl reset in video mode, irq register or
unregister might result in race condition with vblank
enable/disable calls on event thread resulting in enable
cnt mismatch. This change adds mutex locks to avoid race
conditions in such cases.

Change-Id: I45aef19864475ac1b02dd8e84810eee233fc60ea
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-11-18 15:39:43 +05:30
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
Mahadevan
a3fdf9025e disp: msm: sde: add check to fix null pointer dereference
In pstate_cmp the plane_state structures are accessed
without checking it is allocated or not, which leads to
null pointer dereference. To fix it NULL check is added.

Change-Id: I5982138b396b70979205d87bc9aa260d9501fee0
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2020-11-18 13:15:47 +05:30
Krishna Manikandan
8576a93988 disp: msm: sde: add mutex lock to handle ppdone timeout usecases
The irq register and unregister calls in ppdone timeout
path can result in race condition which can lead to
scenarios where irqs will be enabled with no
callback registered. Add vblank mutex lock to avoid
such scenarios.

Change-Id: I02b07b773d6b9a28c3af431eb3d8314292769f12
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-11-18 12:57:13 +05:30
Steve Cohen
aa064ada86 disp: msm: sde: cache encoder_mask for vblank_work
There is a race between disable commit swap-state on display
thread and vblank work on event thread which may skip applying
the vblank vote if the encoder_mask has already been cleared.
To avoid the race, use a cached encoder_mask that is gauranteed
to be valid between the vblank_on and vblank_off calls.

Also, vblank queue work is initializing a variable that's never
used and msm_disable_outputs has 2 instances of pointers to old
CRTC state. Remove this dead code.

Change-Id: I5e4a482b8f067e272a2aef5afa08cc0e1ab89434
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-17 17:24:30 -05:00
qctecmdr
7a98aa2134 Merge "disp: msm: sde: fix missing error handling in VM ops" 2020-11-17 02:59:24 -08:00
qctecmdr
783f3f8d88 Merge "disp: msm: sde: fix invalid dual-display TVM restriction check" 2020-11-17 02:59:24 -08:00
qctecmdr
dafa11efb1 Merge "disp: msm: sde: fix TUI CRTC selection for dual-display" 2020-11-17 02:59:24 -08:00
qctecmdr
614b3d7589 Merge "disp: msm: sde: bound crts and encoders for TUI displays" 2020-11-17 02:59:24 -08:00
qctecmdr
d0add46ba2 Merge "disp: msm: dsi: avoid TE-based panel status check in Trusted-vm" 2020-11-16 14:22:17 -08:00
Amine Najahi
622e4a37c9 disp: msm: sde: fix TUI CRTC selection for dual-display
Currently, driver is always querying CRTC-0 to determine if
a TUI session is active or not independently of where the request
is coming from (PVM/TVM) and the display it is intended to. This
leads to an invalid CRTC selection in dual-display use case as
the CRTC must be dynamically selected depending on the display
selection.

This change adds helper functions to dynamically query the
CRTC with an active VM request and uses those helpers in
PVM ops.

Change-Id: I62ef46a1f23bb812287ab1545e444b90eb8f554c
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-16 15:46:15 -05:00
Amine Najahi
84beddbe9e disp: msm: sde: bound crts and encoders for TUI displays
Currently, when starting a TUI session on a secondary display,
user-mode will select CRTC[1]/DSI-2 to initiate the session in
PVM and select CRTC[0]/DSI-2 in TVM to drive the frame. This
breaks existing cont. splash assumption that secondary display
will be using CRTC[1] in TVM session. Instead, driver can inform
user-mode of the possible CRTCs to use for each of the encoders.

This change sets the possible_crtcs variable on both DSI encoders
so that user-mode selects DSI-1/CRTC[0] and DSI-2/CRTC[1] in the
TVM use case.

Change-Id: Ic68f92901e42db80fb97799a05d11b5f3473af97
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-11-13 14:49:39 -05:00
qctecmdr
7e52459f8e Merge "disp: msm: dsi: Add support for parsing mdp_intf base address from dt" 2020-11-13 05:34:43 -08:00
Veera Sundaram Sankaran
899b201a0a disp: msm: dsi: avoid TE-based panel status check in Trusted-vm
Add check to avoid the dsi panel status check with TE
method as the GPIO support is not available in Trusted-vm.

Change-Id: I5ad6e7b77b189b5150302ab34767dfc4d97aaf61
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Veera Sundaram Sankaran
c99f3fd6ae disp: msm: dsi: enable ESD trigger through debugfs in trsuted-vm
Add support to trigger ESD through debugfs by directly
modifying the reset GPIOs TLMM register in trusted-vm as GPIO
driver support is not enabled.

Change-Id: I859affe69c13dbe115a48b0a63a600a57027db58
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00