Commit Graph

2781 Commits

Author SHA1 Message Date
qctecmdr
9c9343d54f Merge "Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0" 2021-12-13 21:16:18 -08:00
Jeykumar Sankaran
cf39b00660 Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0
Change-Id: I5d2b08380b6b0eb09492b950fb38cd9a0b3196c1
2021-12-08 12:37:35 -08:00
Amine Najahi
d59faab858 disp: msm: sde: increment rounded corner HW version
Increment rounded corner HW version to 1.1

Change-Id: I8b1004b84e4b897d68b08deb559ef96ea097d7b6
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2021-12-07 15:11:43 +08:00
Xu Yang
882cc50498 disp: msm: sde: extend RC2/3 and LTM2/3 for Kalama target
Change supports extending the enum for LTM2/3 and RC2/3.

Change-Id: I45df1808fa3a7e23f20afef084edaf091a59d7dd
Signed-off-by: Xu Yang <quic_yangxu@quicinc.com>
2021-12-07 11:40:54 +08:00
Renchao Liu
1238001c28 disp: msm: sde: add support for DMA 4,5 for Kalama
Expand reg dma data structures to support DMA 4,5.

Change-Id: I3aa7e879eb5ab7f89a7152e202759e885b05c75a
Signed-off-by: Renchao Liu <quic_rencliu@quicinc.com>
2021-12-06 17:32:08 -08:00
qctecmdr
c1bc0c5d3d Merge "disp: msm: sde: update ubwc version 4 check" 2021-12-06 12:12:21 -08:00
Jeykumar Sankaran
fe83c42f56 disp: msm: sde: add support for mdp vsync timestamp
MDSS.9.0 adds support for mdp vsync based HW timestamps
on top the existing support for panel vsync based timestamps.

This allows us to enable vsync timestamp calculations for all the
use cases including a few corner cases (e.g. programmable fetch)
which we couldn't support with the existing HW.

This change adds the new HW register support and modifies the
timestamp read logic to use mdp vsync on supporting targets.

Change-Id: I2cb1b56ca9154174331c4fc1d8f82319b6989247
Signed-off-by: Michael Ru <mru@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
2021-12-06 11:06:41 -08:00
Jeykumar Sankaran
24aa389edc disp: msm: sde: separate out DSC 4HS config programming
Dedicated registers are introduced for DSC 4HS merge block
programming from MDSS.9.0. This change adds support in the
driver to identify the change using a DSC feature flag
and separates out 4HS merge block programming to use appropriate
registers based on the DSC HW feature.

Change-Id: Ia64a1ed4bc5f5f301ab422144916cdce2a1dadac
Signed-off-by: Michael Ru <mru@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
2021-12-06 11:05:29 -08:00
Jeykumar Sankaran
39e7775bff disp: msm: sde: add support for CTL done irq
From Kalama, the HW scheduler abstracts the low level
PP_DONE/WB_DONE interrupts and generates a common
CTL_DONE interrupt per hw ctl. This saves the software
the irq latency delays to process the frame complete
operations when multiple encoders are involved.

If supported, this change enables and waits for the
CTL_DONE interrupt instead of PP_DONE and WB_DONE.

This change adds support to wait for CTL_DONE irq in
only command mode panels as we don't drive two WB blocks
with single CTL.

Change-Id: I084d6bfb6a9fb0b48f912fe5787401c460ec5b56
Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
2021-12-06 11:03:22 -08:00
Jeykumar Sankaran
4df7bb68dc disp: msm: sde: clean up INTF2 interrupt masks
Clean up stale mask bits which were deprecated from
the HW for the past few generations.

Change-Id: Id6bc20557d1047f7bffbb9641248dfbe0170daf0
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-12-05 10:00:29 -08:00
qctecmdr
2a867bb340 Merge "disp: msm: add display config support for parrot" 2021-12-05 04:44:36 -08:00
qctecmdr
d72a4a4f0c Merge "disp: msm: dp: add support for 4nm DP PLL" 2021-12-05 04:44:36 -08:00
qctecmdr
e329cf3904 Merge "disp: msm: dsi: allocate priv info and bit clk list per fps" 2021-12-05 04:44:35 -08:00
qctecmdr
1f8ce74ba8 Merge "disp: msm: dsi: add ctrl and phy version support for Kalama" 2021-12-04 20:12:42 -08:00
Soutrik Mukhopadhyay
aa0eacb522 disp: msm: dp: fixed version check 4nm target
Changes include support to correct the version
check for DP PHY changes for 4nm target.

Change-Id: Ib891d43bd5db10edc4b49a70f7a3b8af073167cd
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2021-12-03 17:47:25 +05:30
Ingrid Gallardo
450f6b19b4 disp: msm: sde: update ubwc version 4 check
Update ubwc version 4 check to only check for
the major version.

Change-Id: I4050f7d1a0858741e20f621d186e0ec2b9f7b10c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2021-12-01 22:21:45 -08:00
Veera Sundaram Sankaran
3cebf0853a disp: msm: sde: add idle power collapse support for writeback
Extend idle power-collapse support for writeback.

Change-Id: I9b85f367dc7489c1e3c927cbd6040be8b879057e
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
ec7bb6c31f disp: msm: sde: enhance writeback encoder logging
Add encoder-id and wb-id in all the eventlogs, errors and debug
messages throughout writeback phys encoder to help in debugging.
Add traces to all the IRQs in writeback to track them efficiently.

Change-Id: I919e4d5054407ea5b01889dfd17c8cab6b40ee52
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
8a86ccc9fc disp: msm: sde: add dnsc_blur validations in wb encoder
Add downscale blur block validations in atomic_check phase of writeback
encoder. Downscale blur along with partial update is not supported.
NV12 output in WB is not supported with downscale blur as CDM block
usage is mutually exclusive with dsnc_blur. If destination scaler is
enabled, the ds src or dst should match with dnsc_blur src based on
the ds tap point chosen.

Change-Id: I1d643dc26738c0e77d8e9181b4c834693153209c
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
88c9a184f9 disp: msm: sde: use dnsc_blur src w/h for calculating crtc/lm w/h
When downscale blur feature is enabled, calculate the mixex and crtc
width and height using the dnsc_blur's src width & height. Update the
sde_crtc_get_mixer width/height functions to return the correct size
based on the features enabled.

Change-Id: I52dd88cc52e1ca5cb37e381e92e0e3032e7b090f
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
cc23729c87 disp: msm: sde: configure the dnsc_blur hw block
Add changes to configure the downscale blur hardware block based on
the conifgs set by user-mode. Program the ctl's writeback flush and
active bits when dnsc_blur is enabled. Bind the pingpong block that
feeds pixels to dnsc_blur hw block. Disable the active bits and unbind
the pp block binding during wb disable.

Change-Id: I1961ab437e344b13d0c186c1675a5bf79b84ea74
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
93ec98a33e disp: msm: sde: expose dnsc_blur connector properties
Add downscale blur connector properties to expose the hw block count,
downscaling filters used and the ratios supported. Add a custom dnsc_blur
property to allow usermode to send the required configuration to program
the hardware. Expose only for the virtual connector as the dnsc_blur is
only supported with writeback block.

Change-Id: I35dd263d9d5aafdb59bacbb3a0528ffd2bcaf6a3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
c24dd3d172 disp: msm: sde: add supported filter and ratios for dnsc_blur
Add sde catalog entries for the downscale blur supported filters
and the corresponding downscale ratios. The PCMN supports ratio
from 1 to 128 and gaussian filter supports specific ratios in the
range between 8 to 64.

Change-Id: Ifdf1a8fc7cfc5f5bd1297f10c7946c2bf9b63dcd
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
4d3e8b1306 disp: msm: sde: extend topology_control to reserve dnsc_blur
Extend the topology_control connector property to support downscale
blur block. This gives user-mode the capability to reserve the downscale
blur block. Add sde rm changes to reserve the block based on this
connector property during sde_rm_reserve.

Change-Id: Ica2d7c57e6f528eb917acb6aae7e860352895a06
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
1c722f2094 disp: msm: sde: add hw catalog parsing for dnsc_blur block
Add device tree parsing code for downscale blur block and sub blocks.
Add restrictions to allow downscale blur block to be used only by the
writeback. Set allowed interfaces for the block while parsing from
device-tree to restrict usage.

Change-Id: Ifa4c89ec52863d245a40bd4715a4e31f542b8117
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
c0434459bc disp: msm: sde: add ctl wb active/flush setting support for dnsc_blur
Add sde ctl hw changes to support downscale blur. The ctl flush/active
bits for downscale blur are part of the writeback flush/active bits.
Add a new ops to update the dnsc_blur flush mask.

Change-Id: I29483ab399c5503ef4cfe5804d25cd26ad6265b2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
37ab0f2419 disp: msm: sde: add dnsc_blur HW block support
Downscale blur HW block support is added from MDSS 9.x. The block
can be used to downscale the layer mixer output before feeding it to
the writeback block. It can be used for both writeback & concurrent
writeback usecases. Add hw files and the respective blocks in sw to
program the downscale blur block.

Change-Id: Ic5787e1655eff5ef0960b7569e48d2f35d23bfc9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:15 -08:00
Veera Sundaram Sankaran
5929098cfa uapi/drm: add data structure for dnsc_blur HW block programming
Define the data structure and relevant flags for user mode program
to configure the downscale blur block.

Change-Id: Ic2916f5ac8626b93ab8b7adc7270f1e4bf1ec23a
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:15 -08:00
Srihitha Tangudu
f288c1248d disp: msm: add display config support for parrot
Add display config support for compilation on parrot target.

Change-Id: I994b18687187f89b2794a886286280901ca44edb
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2021-12-01 14:37:16 +05:30
Narendra Muppalla
7c5d715673 disp: msm: snapshot change for mdp driver to support multiple SIs
This change adds support in mdp and dsi driver to support
multiple SIS.

Change-Id: I432068cea17e1784d7570a472fbadaa86695df07
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-11-30 14:42:51 +08:00
Bruce Hoo
88c7d83030 disp: msm: adapt inactive list management for multiple SIs
Commit bfb91aa ("Fix a null pointer access in msm_gem_shrinker_count()")
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 makes commit bfb91aa adaptive for both kernel-5.10 and
kernel-5.15.

Change-Id: I8efb66e239e2f8f56a3989370a58b96932a19f76
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 11:56:30 +08:00
Bruce Hoo
e2a1b77afa disp: msm: adapt IRQ interface change for multiple SIs
Commit 45160ca ("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.
This change uses macros to control the calling of correct irq interfaces
for kernel version 5.10 and version 5.15.

Change-Id: I367021df783c0aa02f729920b673e6f1f7397e65
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 11:23:55 +08:00
Bruce Hoo
c9d1adc535 disp: msm: dsi: adapt MIPI_DSI_* flags for multiple SIs
Commit bf0d220 ("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.
This change puts macros around MIPI_DSI_* flags to adapt the name change
of flags for kernel version 5.10 and version 5.15..

Change-Id: I1c9a8da3819a6b641ca9b6d81191bc944913b49e
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:57:13 +08:00
Bruce Hoo
87c65e29e4 disp: msm: adapt msm_gem ops and drm_drver callbacks for multiple SIs
Commit d1d1173 ("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 truct dma_buf_map. Rename dma_resv_get_excl_rcu to _unlocked.
Remove deprecated GEM and PRIME callbacks.
This change adapts all the interface change for kernel version 5.10
and version 5.15..

Change-Id: Icb495dc4e5d20999f773ed5881eff233ff3a48bc
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:50:34 +08:00
Bruce Hoo
a5c5224acd disp: msm: dp: adapt function change of drm_dp_mst_topology_mgr_init for multiple SIs
Commit 283560c ("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.
This change puts macros in the callers of function drm_dp_mst_topology_mgr_init to
handle interface change between kernel version 5.10 and version 5.15.

Change-Id: I394c70640606de477d67b08cafb495bebb6c549f
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:32:02 +08:00
Bruce Hoo
773b0e5b64 disp: msm: adapt crtc plane and connector atomic functions for multiple SIs
Commit ddac29b ("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.
This change puts macros in the callers of atomic functions to handle API
changes between kernel version 5.10 and version 5.15.

Change-Id: I8e710e33f0a149bbfaa54820a7174a05810e2da4
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:29:14 +08:00
Bruce Hoo
a7ee8c6b1e disp: msm: dp: adapt drm_dp_link_train* APIs for multiple SIs
Commit 1ef7ff2 ("disp: msm: dp: pass drm_dp_aux to drm_dp_link_train* APIs")
passes additional parameter drm_dp_aux to drm_dp_link_train APIs in order
to use drm_dbg_* within those functions.
This change put a macro in the drm_dp_link_train* APIs caller to handle API
changes for both kernel version 5.10 and version 5.15.

Change-Id: I9fd22e0effbe87b6cfecf72b38a10d74a2c0c5ea
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:23:09 +08:00
Soutrik Mukhopadhyay
bbc87c5dde disp: msm: dp: add support for 4nm DP PLL
Changes include support for 4nm DP PHY and DP PLL.
Added dp_pll_4nm.c file with register programming
sequences for DP PHY and PLL.

Change-Id: I104cf69964904c9a47a17e75a84df011d7994c9f
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2021-11-27 09:39:07 +05:30
qctecmdr
79cf605ddc Merge "disp: msm: increase size of sde_kms_info" 2021-11-25 20:20:39 -08:00
Jeykumar Sankaran
c890f9d88f disp: msm: dsi: add ctrl and phy version support for Kalama
Add dsi ctrl version 2.7 and dsi phy version 5.2 support for
Kalama hardware.

Change-Id: Ia7b4c8a2e1579458f114e466de8b24855e9251ce
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-11-24 16:51:34 -08:00
Soutrik Mukhopadhyay
2bc4fbcd94 disp: msm: dp: add DP PHY support for 4nm target
Changes include support for specific DP PHY
registers and related code changes for 4nm
target.

Change-Id: I9b349e47ff057421fa465a59e1206fd09f7e367a
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2021-11-24 21:33:45 +05:30
Kashish Jain
c079b51c81 disp: msm: dsi: allocate priv info and bit clk list per fps
Currently, in dsi_display_get_modes, priv_info, rates,
front_porches and pixel_clks_khz memory is allocated for each
timing node and the same memory is copied for each supported fps.
The values of front porches calculated to maintain constant fps for
each bit clk rate gets overwritten with the values for last fps in
the dfps list. But the values of front porches should be different
in case where DFPS and dynamic clock are both supported either by
vfp approach or hfp approach. To fix this, allocate memory
separately for each fps.

Change-Id: Ibf753aa8cca8d77b02b20785b5435f1aba05106e
Signed-off-by: Kashish Jain <kashjain@codeaurora.org>
2021-11-21 23:51:10 -08:00
qctecmdr
ae1d2e9c54 Merge "disp: msm: sde: deprecate idle notify work scheduling" 2021-11-20 00:19:10 -08:00
Veera Sundaram Sankaran
8707002bba disp: msm: sde: extend perf debugfs to control all disp sys cache
Extend the existing sys_cache_enabled debugfs node functionality
to enable/disable all the display related system cache. Boolean
property is converted to integer and each BIT is associated with
a system cache.

Usage:
enable SYS_CACHE_DISP:
        echo 1 > /d/dri/0/debug/core_perf/sys_cache_enabled
enable SYS_CACHE_DISP_WB:
        echo 2 > /d/dri/0/debug/core_perf/sys_cache_enabled
enable both:
        echo 3 > /d/dri/0/debug/core_perf/sys_cache_enabled

Change-Id: I41eaacc4d3f448bb566993b20aa74caa979f1258
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-11-19 11:13:42 -08:00
Veera Sundaram Sankaran
7cb040c3a6 disp: msm: sde: add cache hints support in fb
Add a cache_flag in msm_fb object to store the system cache state hints.
Writeback connector will store cache write hints if system cache write
is enabled while HW is writing into this buffer. Plane in the primary
display path, in a 2-pass composition strategy will use this cache hints
to enable the display HW to use system cache for reading the pixel data
from this buffer.

Change-Id: Iff92a453a36d4a60b5a0162832eebd5e8739b5c3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-11-19 11:13:42 -08:00
Veera Sundaram Sankaran
993f61c91d disp: msm: sde: expose system cache support for writeback
Add a custom cache_enable property in writeback connector to allow
user-mode to control the cache setting on a frame basis. Configure
the hw and activate/deactivate the llcc based on the property. The
custom property is added based on the availability of the system
cache for writeback.

Change-Id: I812b31955eb36c75c33ac279b56502a13f7cdcbf
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-11-19 11:13:29 -08:00
qctecmdr
ebe5742806 Merge "disp: msm: sde: add system cache support for writeback" 2021-11-19 08:59:50 -08:00
qctecmdr
c8c4ffef9f Merge "disp: msm: sde: remove wb kickoff/frame count & bypass_irqreg logic" 2021-11-19 03:44:27 -08:00
qctecmdr
34ca07a0b0 Merge "disp: msm: sde: add support for DMA 4,5 for Kalama" 2021-11-18 09:52:55 -08:00
qctecmdr
a2eacc19e9 Merge "disp: msm: sde: fix constness of list_sort compare function" 2021-11-17 22:19:22 -08:00