Commit Graph

3389 Commits

Author SHA1 Message Date
Shamika Joshi
f3525a4051 disp: msm: sde: enable second dedicated CWB feature
Set the boolean property to enable second dedicated
CWB feature on pineapple hardware.

Change-Id: Ibacf0ec327c5d6d803f1fc5211dedb3a591b441a
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2022-10-13 20:03:59 -07:00
Shamika Joshi
493362f656 disp: msm: sde: add support for IRQs in new CWB Pingpong blocks
For second dedicated CWB pingpong blocks, the overflow irq needs
to be mapped properly to existing IRQ handlers.

Change-Id: I7630766d1865f7ad7079947185ef4ae629d71f3e
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2022-10-13 20:03:26 -07:00
Shamika Joshi
b9553cf5f3 disp: msm: sde: add changes to support additional dedicated-CWB
Update the hardware blocks and corresponding APIs
to configure new D-CWB data path. Add new hardware
pingpong blocks that are dedicated for second DCWB.

Change-Id: I529c24ac5aa483f30b6c9e7653eb1713c6b8fb8a
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2022-10-13 20:02:57 -07:00
Alex Danila
5fce708923 disp: msm: sde: pineapple display compilation
This change enables display-drivers compilation for pineapple
target.

Change-Id: Iae1f8b1cafeae111ff197065928e20e100f2e6ac
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-11 09:42:46 -07:00
qctecmdr
eb15d0d825 Merge "disp: msm: sde: enable dsc full ICH error precision" 2022-10-10 13:49:32 -07:00
qctecmdr
d92a44d525 Merge "disp: msm: sde: enable 32bit intf te registers" 2022-10-10 13:49:32 -07:00
Nilaan Gunabalachandran
8da662ebee disp: msm: sde: add break to switch case logic
This change adds a missing break in the switch-case logic.

Change-Id: I6eb1eb9c2532187803c956e590eb5353f3fc9c3d
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 12:03:55 -07:00
Nilaan Gunabalachandran
719e3a8e1d disp: msm: sde: upstream memblock_free API returns void
The memblock_free API has been updated to return void. This
change removes the check on return and passes the pointer
address in correctly.

Change-Id: I8b60c8d3c5e3e8c2f94e33015c2c03686a556807
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:50:33 -07:00
Nilaan Gunabalachandran
a0f3537872 disp: msm: sde: include file.h
This change adds includes for <linux/file.h> required for the
display driver in kernel 5.19.

Change-Id: Ibe5401997b43844b692869ebb6d28faa7bcb7740
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:21:55 -07:00
GG Hou
61359169c5 disp: msm: sde: implement format_mod_supported API
This change implements the drm_plane_funcs API format_mod_supported
necessary to correctly check if format modifiers are supported.

Change-Id: I39a26f7b053c44ef7577401d88e7cf6934c198f8
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:21:30 -07:00
GG Hou
61cc323db6 disp: msm: avoid the usage of dropped DMA APIs
This change adds downstream implementations of DMA APIs
that have been dropped in the upstream kernel.

Dropped APIs:
dma_resv_get_excl_unlocked
Link: https://patchwork.freedesktop.org/patch/msgid/20211005113742.1101-25-christian.koenig@amd.com

drm_atomic_set_fence_for_plane
Link: https://patchwork.freedesktop.org/patch/msgid/20220429134230.24334-1-christian.koenig@amd.com

Change-Id: Ic6a8f5e80ca671cda9c75b94a638f185717f4342
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:20:40 -07:00
GG Hou
45b0891612 disp: msm: sde: replace the allow_fb_modifiers variable
The allow_fb_modifiers variable has been replaced by
fb_modifiers_not_supported. This value is disabled by default
so no additional initialization is necessary.

Link: https://patchwork.freedesktop.org/patch/msgid/20220128060836.11216-2-etom@igel.co.jp

Change-Id: Id738be53ce1133232f525b75ec0b678ce777eff7
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:20:12 -07:00
GG Hou
16839d2e8a disp: msm: include delay.h for udelay and usleep_range
This change includes linux/delay.h to import the udelay and
usleep_range APIs.

Change-Id: I6ed406cb0f83aebf682420a53b44da72d7ec0456
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:18:35 -07:00
GG Hou
398572ab21 disp: msm: rename dma-buf-map to iosys-map
The dma-buf-map struct has been renamed to iosys-map.
This change updates the usage of the struct and APIs in
the display driver.

Link: https://patchwork.freedesktop.org/patch/472236/

Change-Id: I5b48424dd5f8c60a28958a036ee2859963b059d2
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:07:55 -07:00
GG Hou
11f0929a72 disp: msm: dp: update include file path for upstream headers
This change updates the include file path for necessary dp
and dsc headers that have moved in upstream kernel.

File path changed in upstream:
include/drm/display/drm_dp_aux_bus.h
include/drm/display/drm_dp_dual_mode_helper.h
include/drm/display/drm_dp.h
include/drm/display/drm_dp_helper.h
include/drm/display/drm_dp_mst_helper.h
include/drm/display/drm_dsc.h
include/drm/display/drm_dsc_helper.h
include/drm/display/drm_hdcp.h
include/drm/display/drm_hdcp_helper.h
include/drm/display/drm_hdmi_helper.h
include/drm/display/drm_scdc.h
include/drm/display/drm_scdc_helper.h

Change-Id: Icb9a227c7464061f68fe60cbda6d93858fa768c5
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:06:29 -07:00
GG Hou
5624dc5b2e disp: msm: import DMA_BUF module symbols
This change imports the necessary DMA_BUF symbols from the module
as they are now contained within the module namespace.

Link: https://patchwork.kernel.org/project/dri-devel/patch/YU8oVDFoeD5YYeDT@kroah.com/#24477195

Change-Id: I18a0a812567425d55fedbab67f7a42d3f54351ca
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:05:05 -07:00
Nilaan Gunabalachandran
c348513806 disp: msm: sde: enable dsc full ICH error precision
This feature enables using all available bits when ICH
error calculations are made. This improves precision and
image quality when there are more than 8 bits per component.

Change-Id: I851f05418283d0e731332d4069e3b6e57487b9a3
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-06 13:51:52 -07:00
Nilaan Gunabalachandran
f73f15ae39 disp: msm: sde: enable 32bit intf te registers
This change adds support for INTF TE using 32 bit values and
single update per TE. These features help ensure that during
QSync mode the TE does not overrun in certain late trigger uses.

Change-Id: I893d0cde81320c3f17604694a4d8ee52b29a9425
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-06 13:51:35 -07:00
Nilaan Gunabalachandran
00369e3266 disp: msm: sde: enable mdp vsync frame count
Currently, the driver uses the panel frame count along with
mdp vsync timestamp which can be unreliable if there are any
latencies. This change adds support to use mdp vsync frame
count, if the hardware supports it.

Change-Id: I784d4f4e525212269371a40071bcb912181cba9f
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-06 13:51:29 -07:00
Nilaan Gunabalachandran
875db134b3 disp: msm: sde: add pineapple mdss version support
This change adds pineapple mdss revision and enables features
based on the hardware capabilities.

Change-Id: I930e1ffd8e070f5bd258e5d3e441a966ade5f760
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-06 13:50:35 -07:00
Narendra Muppalla
7fcbec0c8d disp: msm: dsi: add dsi ramdump support without DEBUG_FS
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.

Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2022-10-05 03:53:37 -07:00
qctecmdr
e567bba0d5 Merge "disp: msm: sde: detach dsc/vdc encoder blocks properly during modeswitch" 2022-10-04 14:30:33 -07:00
Gopikrishnaiah Anandan
5edd5553a9 drm: msm: disable LTM hardware during encoder disable
LTM block should be disabled when encoder is being disabled to avoid
display hang when all driver clients have been closed.
Change disables LTM hardware block when encoder is disabled.

Change-Id: I279296b566ab93c302e6166b6fa4b7197c2cc0ab
Signed-off-by: Gopikrishnaiah Anandan <quic_agopik@quicinc.com>
2022-10-04 01:49:57 -07:00
Yashwanth
a14aea9aac disp: msm: sde: detach dsc/vdc encoder blocks properly during modeswitch
In the current code if there is a switch from DSC to non-DSC
mode, all the DSC blocks attached to the sde_encoder are not
cleaned up properly. Due to this, during virt disable these
DSC blocks are disabled and flushed resulting in underruns
on other ctl paths which might be using them. This change
properly cleans up all the dsc/vdc attached to the sde
encoder to avoid such issues.

Change-Id: Ie644701cbda6b4d056bc7ef30300be96096c5214
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-09-30 01:39:15 -07:00
Linux Build Service Account
9fbbeb65ba Merge "disp: msm: sde: move some frame_events from crtc commit to event thread" into display-kernel.lnx.1.0 2022-09-23 12:20:26 -07:00
Linux Build Service Account
78456d91bb Merge "disp: msm: dp: disable aux switch at the start of the disconnect path" into display-kernel.lnx.1.0 2022-09-23 12:20:25 -07:00
Linux Build Service Account
b76adef208 Merge "disp: msm: dp: clear MST sim context during DP sim disable" into display-kernel.lnx.1.0 2022-09-23 12:20:16 -07:00
Sandeep Gangadharaiah
cc997cd3d1 disp: msm: dp: disable aux switch at the start of the disconnect path
Currently the aux switch is disabled at the end of the disconnect
path which would include the wait time upto 5 secs becauase of usermode
cleanup. However, the PMIC module is expecting the aux switch to be
disabled within 400 msec after the disconnect is notified. If not, this
would trigger an LPD failure. This change moves aux switch disable
further up in the disconnect path, before waiting on completion of
usermode cleanup.

Change-Id: I42e0608f06127729a78de11631d16d0a3ca0d2b4
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-09-23 11:48:47 -07:00
Veera Sundaram Sankaran
58bff0115e disp: msm: sde: move some frame_events from crtc commit to event thread
Move frame data stats collection/notification during frame-done and
retire fence sysfs notification to event thread. This will free up
some interrupt time.

Change-Id: I2648ac4287ce8712e9a059edd408a59753aa6d32
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-09-23 11:48:34 -07:00
Sandeep Gangadharaiah
31ae12f079 disp: msm: dp: clear MST sim context during DP sim disable
After freeing MST sim context memory the pointer isn't set
to NULL leading to unauthorized memory access. Along with
this fix, this change also defers checking sim device ports
pointer at a more appropriate place in the function call.

Change-Id: I20c09edbd454c9d491060815dc73bae34aab6b08
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-09-23 11:48:28 -07:00
Veera Sundaram Sankaran
2139b617bf disp: msm: sde: fix crtc count based on layer mixer
Fix the max crtc count based on the number of real layer mixers
available. Usermode can use the crtc count to derive the number
of layer mixers. This will be used in usermode to check if a new
DP/IWE/WB session can be supported by the HW, based on the existing
displays at that point. This will avoid atomic_check validation
failures in driver.

Change-Id: I63b033604ac549fc01bccef2a9320e0befab5926
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-09-23 11:48:21 -07:00
Linux Build Service Account
5d2c1a0801 Merge "disp: msm: sde: expose cdm block count through connector" into display-kernel.lnx.1.0 2022-09-23 11:36:44 -07:00
Linux Build Service Account
c5ffc48adf Merge "disp: msm: sde: avoid connector remove in dual display recovery" into display-kernel.lnx.1.0 2022-09-23 11:36:42 -07:00
Linux Build Service Account
25d6c5aab9 Merge "drm/msm/dpu: merge dpu_hw_intr_get_interrupt_statuses into dpu_hw_intr_dispatch_irqs" into display-kernel.lnx.1.0 2022-09-23 11:35:41 -07:00
Raviteja Tamatam
45a1db8361 disp: msm: sde: avoid connector remove in dual display recovery
Add changes to get drm object reference for connector and
remove out fb in dual display recovery case.

Change-Id: I1fd0c4818575b3f532d51ad41285031e8320c5fe
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2022-09-21 11:17:52 -07:00
Gopikrishnaiah Anandan
4ee3a1a5e2 drm: msm: re-enable driver disabled color features
When encoder is disabled, demura is disabled since pipes
are disabled internally.
Change marks the features which were active and disabled
by driver as dirty so that it can be applied in the next commit.

Change-Id: I805d17d673a8ff41f9bdb18ba7f2fd185b5ccb5a
Signed-off-by: Gopikrishnaiah Anandan <quic_agopik@quicinc.com>
2022-09-21 11:02:43 -07:00
Veera Sundaram Sankaran
8602fee9f8 disp: msm: sde: expose cdm block count through connector
Expose the number of cdm blocks available through the connector
capabilities. Add CDM to the topology_control table, so usermode
can use the property to reserve the CDM block during modeset.
Additionally, fix a error code return during CDM block reservation
failure in sde resource manager.

Change-Id: Ib42ca4e8614076a8e5df77d8abc77a9e73674390
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-09-21 11:01:17 -07:00
Dmitry Baryshkov
5ddbc95058 drm/msm/dpu: merge dpu_hw_intr_get_interrupt_statuses into dpu_hw_intr_dispatch_irqs
There is little sense in reading interrupt statuses and right after that
going after the array of statuses to dispatch them. Merge both loops
into single function doing read and dispatch.

Change-Id: I1259476549bcaf9f9f4e12591a7e182796e150dd
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Git-commit: 0abdba47dc1df708c365421d481734d3f7fecb01
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-09-21 10:48:43 -07:00
Ashwin Pillai
4afb745c53 Merge remote-tracking branch 'origin/display-kernel.lnx.5.15' into display-kernel.lnx.1.0
* origin/display-kernel.lnx.5.15:
  disp: msm: update RSC bandwidth during solver mode transition
  disp: msm: sde: fix null pointer dereference issue
  disp: msm: dp: resend hpd notification to usermode
  disp: msm: dp: skip waits when processing usb disconnect in sim mode
  disp: msm: dp: free DP sim ports during DP sim disable
  Revert "disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds"
  disp: msm: dp: add debug node to capture source and sink crc
  disp: msm: sde: use new connector state for topology checks
  disp: msm: uapi: increase SDE_FRAME_DATA_MAX_PLANES size
  disp: msm: sde: skip msm_lastclose if display is stuck in splash
  disp: msm: cancel all delayed_works before triggering msm_lastclose
  disp: msm: sde: bound event log traversal to allocated memory in coredump
  disp: msm: sde: add crtc width restriction when 3d-merge is enabled
  disp: msm: dsi: avoid DSI PHY shutdown during idle
  disp: msm: dsi: reorder various resets of DSI PHY
  disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds
  disp: msm: sde: convert ubwc stats roi into blob property
  disp: msm: sde: update hw configs on dnsc_blur disable
  disp: msm: sde: add check to avoid NULL WB output fb
  disp: msm: dp: remove register call for regdump framework for DP domains
  disp: msm: sde: disable spr and demura for secondary panel in trusted vm
  disp: msm: dp: remove disconnect call for downstream port status change
  disp: msm: sde: use mode from new state during CP check phase
  disp: msm: sde: enable encoder resources before phys enc disable
  disp: msm: sde: reduce stack size in _sde_crtc_check_rois
  disp: msm: dp: address race condition in LM allocation

Change-Id: Ia2f228316d38721227b643cd7b25e740c8917c6c
Signed-off-by: Ashwin Pillai <quic_ashwpill@quicinc.com>
2022-09-09 14:04:57 -04:00
qctecmdr
fe7effd4d5 Merge "disp: msm: sde: fix null pointer dereference issue" 2022-09-02 15:05:09 -07:00
Amine Najahi
abf0fdd341 disp: msm: update RSC bandwidth during solver mode transition
Currently when disconnecting a secondary monitor, RSC will
transition to solver mode. If the bandwidth remains the same
for primary display, SW will not update BW indication register
causing stale TCS wait values.

This change forces a register update when RSC mode is
changed to solver mode.

Change-Id: I99d2332621bad75a7b6abdb64d6aedd35c30ca63
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2022-09-01 10:33:48 -04:00
Renchao Liu
3ccfb39483 disp: msm: sde: fix null pointer dereference issue
This changes fixes null pointer dereference issue.

Change-Id: I9a9628f1fb274aea86a15792ac85b8505f25d28f
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2022-09-01 09:08:04 +08:00
qctecmdr
df56ac358f Merge "disp: msm: dp: resend hpd notification to usermode" 2022-08-31 07:46:50 -07:00
Rajkumar Subbiah
ecaabfefc9 disp: msm: dp: resend hpd notification to usermode
This change adds robustness to hpd notification by resending
it if there was no action in 2 seconds, just in case, the
first notification didn't make it to the usermode.

Change-Id: Iaf00669ec77e8c50618ee5618735a98518ad7f1a
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-30 13:45:59 -07:00
Rajkumar Subbiah
5043291e1a disp: msm: dp: skip waits when processing usb disconnect in sim mode
With real DP over Type-C sinks, DP driver requests access to USB
combo PHY from USB driver. But in DP SIM mode, there is no real
sink and PD management, so the combo PHY is managed by USB driver
and DP driver uses it without actually claiming it. If the USB
cable is unplugged in this scenario, USB driver notifies the
disconnection through an atomic notifier call. It does not expect
the handler to go into sleep, but the disconnect handler inside
DP driver has multiple wait for events and also sleeps to wait for
HW state updates.

This change passes a skip_wait flag to all the disable functions
to complete disconnect processing by skipping all processor sleeps
and event waits.

Change-Id: Ia98de0e7fa6b0573e644615ee59015914a93f4cf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-30 13:43:49 -07:00
Sandeep Gangadharaiah
2e9d68e174 disp: msm: dp: free DP sim ports during DP sim disable
DP sim ports created during DP sim enable aren't cleared
during disable path. This would retain the last status of
the DP sim port or the connector. This would impact the
next iteration of DP sim test, if done without device
reset. This change will set the port number to 0 during
DP sim disable and clear the memory allocated for these
ports.

Change-Id: I386a62e87fcaf006db8dd18e5751b33bbe70fc9b
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
2022-08-30 10:27:45 -07:00
Vara Reddy
001fa8da90 Revert "disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds"
This reverts commit 14e7e9b409346aa77fd08cca6eab85252d9ccabe.
Reverting this for now until we properly understand the reason
for command transfer timeouts that we are hitting for 5k panel.

Change-Id: I0390af66f9ca06abc1ebb81996bb683dea35beac
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-08-26 19:06:16 -07:00
qctecmdr
5ef4dc0b4d Merge "disp: msm: dp: add debug node to capture source and sink crc" 2022-08-24 21:15:52 -07:00
Rajkumar Subbiah
7eef92843d disp: msm: dp: add debug node to capture source and sink crc
This change adds a debug node named 'crc' to drm_dp to read
the frame CRC values for DP controller and DP Sink. In order
to facilitate the immediate read of the CRC values when
accessed, it enables the CRC calculation on the controller
and sink automatically when the stream is enabled. In addition
to the frame CRC values it also reads the MISR values from
controller and PHY to validate the data flow from controller
to PHY.

Change-Id: I1acee2dba931e4635caf4a400e336a72c86e88bf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
2022-08-24 13:47:27 -07:00
Veera Sundaram Sankaran
d44f0ff715 disp: msm: sde: use new connector state for topology checks
Use with the new connector state during validation phase for
checking the 3d-merge topology, since this is the state that
needs to be validated.

Change-Id: Ie212f948affa4dc439ef508363bac6713e560006
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-08-22 14:29:16 -07:00