Commit Graph

122 Commits

Author SHA1 Message Date
Jeykumar Sankaran
e8e526b692 disp: msm: sde: add uidle fill level scaling
Kalama adds support for uidle fill level scaling to allow
fal10 mode for 90 and above fps use cases.

Pre-Kalama, the fill levels are clamped at 4-bit values supported
by the threshold registers. But to achieve the targeted 50us idle
time on fal10 modes with higher FPS use cases, we need fill levels
higher than 15 (max for 4 bit). The hardware change in Kalama
achieves by using a 5 bit scale factor in combination with the
programmed threshold values.

Change-Id: I638705355c03910a83e7d922b6fe48ab11c120a8
Signed-off-by: Jeykumar Sankaran <quic_jeykumar@quicinc.com>
2022-02-02 09:43:06 -08:00
GG Hou
e29493c71d disp: msm: avoid using #ifdef for configurations
Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.

Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.

The differences are as follows:
	1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
		module (=m) or built-in (=y).
	2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
		built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
		Use this only when you're certain you want to do the same thing
		when the config is set to module or is disabled.

Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2022-01-17 10:10:04 +08:00
qctecmdr
7f4c58ac65 Merge "disp: msm: sde: add line-based QoS calculation support" 2022-01-10 19:12:59 -08:00
qctecmdr
69d1699364 Merge "disp: msm: sde: add offline WB QoS support" 2022-01-10 18:41:50 -08:00
qctecmdr
a33fefe00b Merge "disp: msm: sde: update danger/safe QoS LUTs for landscape panels" 2022-01-10 17:38:19 -08:00
qctecmdr
2d519071e8 Merge "disp: msm: sde: remove rgb/cursor pipe related code" 2022-01-10 16:24:25 -08:00
Veera Sundaram Sankaran
d1dcc8da8e disp: msm: sde: remove rgb/cursor pipe related code
The HW support for RGB pipes were removed from MDSS 3.x and cursor pipes
from MDSS 4.x. Remove the support from s/w as well with this change.

Change-Id: Ib5b363234e200ee5c421684cf1904a38a5d90b58
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-07 16:53:44 -08:00
Veera Sundaram Sankaran
56862f8118 disp: msm: use pm_runtime_resume_and_get instead of pm_runtime_get_sync
pm_runtime_get_sync increases the usage_count refcount immaterial of
success/failure of the call, leading to invalid refcount on failures.
Use pm_runtime_resume_and_get instead, which takes care of reducing the
refcount on failure cases before returning from the function.

Change-Id: Ib96050d5d7ecbd717e58b8a0dde2d03312444e15
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-05 17:28:41 -08:00
Veera Sundaram Sankaran
ebe8b1bace disp: msm: sde: add line-based QoS calculation support
From kalama, add support for QoS fill level calculations based on
line-based QoS calculations.

Change-Id: I524ca29c6e9d1912b44a328a2a88d08341cccefc
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-05 17:16:24 -08:00
Veera Sundaram Sankaran
b7f241585a disp: msm: sde: add offline WB QoS support
Add support to parse and configure QoS values for offline writeback.
Expose a writeback connector property to allow user-mode to set
the usage type of the writeback block - WFD, CWB, offline-WB.

Change-Id: I864f79c4896ec757ac2d8b0f57a6a5775d164f21
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-05 17:16:12 -08:00
Veera Sundaram Sankaran
689d2cd473 disp: msm: sde: update danger/safe QoS LUTs for landscape panels
Update the DT parsing logic to get danger/safe LUT values for
both portrait & landscape for all the usage types.
As part of the change, fix the correct CDP write setting for
CWB usecase.

Change-Id: I4fb6d17537de5df31c9b7f52983c0c3890265174
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-05 17:13:44 -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
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
Veera Sundaram Sankaran
825bb55976 disp: msm: sde: add system cache support for writeback
Add support to enable writeback block to use system cache for writing
the output buffer. This is useful in cases where output is routed to
primary source pipes with 2-pass composition. The implementation is
modelled based on existing pipe based cache configuration.

Change-Id: I2b9a96c5b42eb5727d11ca0f337aeeb4e69362c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-11-17 14:57:02 -08:00
Amine Najahi
d36499ca86 disp: msm: sde: add support for DMA 4,5 for Kalama
Expand various SSPP and CTL related data structures
to support DMA 4,5.

Change-Id: I0ce052b6a2f1599a9b6eb82ce8e4f34f4c68333d
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-11-17 17:12:31 -05:00
Amine Najahi
c526f4aefa disp: msm: sde: add support for SSPP VBIF clock split
Add support for localized CLK_CTRL access through SSPP
hardware block.

Change-Id: I86345c94cb12c5584337aa45b562bceaab6cf8e6
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-11-17 13:25:21 -05: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
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
qctecmdr
88877f3037 Merge "disp: msm: sde: add sde data to va minidumps" 2021-08-15 18:31:12 -07:00
Jayaprakash Madisetty
dad1b5f51e disp: msm: sde: handle spec fence bind failure case as non fatal
Add changes to handle speculative fence bind failure case with
invalid userfd as non fatal scenario and stage white frame in such
case.

Change-Id: I1386bfc5ecb5107ab100be220c24597f883d9bd6
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-07-27 13:22:51 +05:30
Andhavarapu Karthik
76d171e611 disp: msm: sde: add sde data to va minidumps
VA minidumps supports to add any allocated variable or data to
minidumps. Add panic notifier and wrapper function to add
sde data to minidump va. Add event log, register log, register dumps,
debug bus and different sde variables and states info to minidump.

Change-Id: If54da0b7067df17877e4da645d82f1705baa3f6d
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-07-19 16:00:57 +05:30
Ping Li
1971601fbd disp: msm: sde: assign correct size for sspp color proc feature data
Instead of hard coding the size of the blob data, pass the exact
size retrieved from drm property framework to color processing layer.
Color processing layer has size check to make sure the blob data size
matches the expected size.

Change-Id: I277f9be1ba84e4e4707847756a9ed0ea1ed23f53
Signed-off-by: Ping Li <pingli@codeaurora.org>
2021-06-17 20:56:11 -07:00
Linux Build Service Account
b3097f1990 Merge "disp: msm: sde: fix qos lut index calculation for high refresh rate" into display-kernel.lnx.5.10 2021-05-21 10:05:11 -07:00
Prabhanjan Kandula
c35d5ca0cc disp: msm: sde: fix qos lut index calculation for high refresh rate
Fix qos lut offset calculation based on the refresh rate index.
Current calculation is not accounting qos lut size for qseed and non
qseed lut types.

Change-Id: I281fa7b3a245ad9f4a3d2ba45bb5957c3900abd6
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-05-19 14:48:55 -07:00
Abhijit Kulkarni
944a0629f5 disp: msm: sde: fix cont splash pipe identification
This change fixes the continuos splash logic that identifies the
pipes staged by bootloader. The same code flow is used in trusted ui
handover as well. Existing logic was counting the pipes twice if the pipe
is staged on both the layer mixers. This change simplifies the pipes
already staged before handover by using the pipe index to convey if
it is staged or not.

Change-Id: Idb255f2077161dc3553114ac5d04e0ef743bb5ea
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-05-14 12:23:57 -07:00
Samantha Tran
978edfa200 disp: msm: sde: check for valid pointer before accessing
This change initializes a variable as null to account for cases
when it is not set. This change also ensures proper pointer
checks before attempting to access function pointer.

Change-Id: I2f06a0877293668e80bee9d9b82d412476dc5184
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-04-27 16:07:29 -07:00
Nilaan Gunabalachandran
c5835a215e disp: msm: sde: frame data feature
Add support to send a data packet of info, written to
predefined buffers, providing information about each submitted frame.
Add required UAPI definitions for frame data buffers and event
notification.
Add support to read ubwc statistics from hw, based on defined rois.

Change-Id: I51f279de98ae4e2a02b0df6943d334764011d5db
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-04-06 08:49:49 -04:00
Abhijit Kulkarni
559620308e display: msm: sde: update qos lut after scaler config
This change moves the code of updating the qos lut for qseed3
to each plane after updating the scaler configuration. This
avoids using stale values for qos settings.

Change-Id: I2c55a98e1ba9790d596c55160933cd5afd2388e5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-03-31 17:32:30 -07:00
Xiaowen Wu
2f36a8f57a disp: msm: sde: add scaler3_cfg and pixel_ext to sde plane
Add scaler3_cfg and pixel_ext to sde plane to avoid updating state
variables in commit thread. This fixes atomic check failure when
scaler lut is not set.

Change-Id: I936b124ca6f90af22a87df31536204e837422a70
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-03-31 17:31:44 -07:00
qctecmdr
2177667f89 Merge "disp: msm: sde: remove rotator llcc" 2021-03-24 16:52:43 -07:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
Prabhanjan Kandula
68b83b3ffc disp: msm: sde: update uidle fal1 maximum threshold for waipio
This change provides support to have per target configuration
of the maximum value for fal1 threshold & updates value for waipio
as per qos recommendation.

Change-Id: I48df0d1c58a8de80f40200b35e406d07621a3f68
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 17:25:51 -07:00
Prabhanjan Kandula
0c31168eff disp: msm: sde: update qos lut configurations for waipio
This change refactors qos lut configuration by redefining & adding
few new lut usage cases for supporting waipio qos recommendations.

Change-Id: I62607208c289c6ffee32fc8008066eb603acb504
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 17:25:13 -07:00
Dhaval Patel
b5cde14bca disp: msm: sde: calculate line_time once during modeset
Calculate line_time once during modeset and allow
each plane to use it instead of calculating for each frame.
It also simplifies the line_time calculation for
command mode display.

Change-Id: I94ce29eec94bfdbee9016fbf93378661ebf79c03
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-03-18 15:03:30 -07:00
Nilaan Gunabalachandran
b9cfa5b37f disp: msm: sde: remove rotator llcc
Rotator llcc is no longer supported. This change removes the
unused code.

Change-Id: Ia1d95e3f4386d25e0d2e06a87802b3f5b694998d
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-03-18 12:33:24 -04:00
Gopikrishnaiah Anandan
1d39b8a5a9 disp: msm: sde: add checks for hfc feature enablement of demura
HFC feature of demura needs a skip blend plane to be set. If skip blend
plane is not set and HFC feature is requested to be enabled, driver
should skip turning on HFC demura feature. Change adds checks to ensure
that HFC is always enabled with skip blend plane staged.

Change-Id: I923359c7cb143867660b4c1e667f56ed42fa51c9
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
0c2aa527bf disp: msm: sde: fix partial update offset calculation
Panel height and width should be passed for partial update offset
calculation. Change passes the offsets to demura partial update
function.

Change-Id: Ic4113d46e8c1643a855f672e7a2bdd848ef99adc
2021-03-17 11:22:08 -07:00
Christopher Braga
812782e76b disp: msm: sde: check fetch active registers for active data planes
Continuous splash setup checks the CTL configuration to determine and
log all planes that have been enabled for continuous splash boot.
This logic currently only checks the planes mapped to each LM on
a given control path, resulting in data planes being missed.

Update the boot plane enumeration logic to additionally check the CTL
fetch active registers to detect and log missed planes. This logic
checks against all planes found through the original enumeration path
to avoid logging the same plane twice. Note that planes found via the
fetch registers are assumed to be used across both rectangles due to
hardware logging limitations.

Change-Id: Ic1f4aaba94111fe096ba9764eeaef242beb6adf5
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
db39b61a5f disp: msm: sde: populate DRM pipeline setup during cont-splash
Declare the continuous splash pipeline setup to userspace by filling
in the DRM states for all plane, crtc, encoder, and connector objects
in use. This information will be treated as an 'informative' state,
and will be cleared at the start of the first commit to maintain
the DRM methodology of DRM clients being the only controller of
the pipeline. This ensures any configuration provided by userspace
is accepted and applied, even if it may already align with the setup
done by continuous splash.

This DRM state configuration is done via manual modification of the
DRM object states. Modification via the exposed DRM UAPI functions
is not possible due to no drm_atomic_state object linking the DRM
pipeline objects together.

Change-Id: I67650e05aafbb4e799cf60939f0595bc3786fc6e
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
qctecmdr
3b347d347c Merge "disp: msm: sde: replace demura pipe index cap. with general pipe index" 2021-02-17 12:40:11 -08:00
Christopher Braga
9a5a42c453 msm: drm: sde: Add support for FP16 via AHB programming
Introduce support for the FP16 format and FP16 color processing
blocks. This includes support for FP16, FP16 UBWC, and inline
rotation on tiled FP16 pixel data.

Change-Id: I06a70cab5447140598682f687129d4f8662524b2
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-02-11 12:31:22 -08:00
Samantha Tran
73373271a7 disp: msm: sde: add multirect error status for ubwc and meta
This change adds support for error checking ubwc and meta error status
based off whether REC0 or RECT1 is used.

Change-Id: I7c39755da99a9d6c0d02b4ef16fa93b8ec7458a9
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-02-09 22:12:38 -08:00
Christopher Braga
d036a97b00 disp: msm: sde: replace demura pipe index cap. with general pipe index
Generalize the demura pipe index capability on sde_plane objects to
instead provide the relative pipe index for all plane types. This
information can be used by clients to fully determine a plane type
and its position.

Change-Id: I597da0dab92c249b16934b9327353e4937635606
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-01-22 14:59:42 -08:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Yashwanth
312bd53656 disp: msm: sde: update input fence after plane state destroy
In few cases, even though input fence is freed, it might
get accessed through debugfs node while dumping fence list.
This change updates input fence to NULL in plane state
destroy once it is freed to prevent accessing it further.

Change-Id: I1a3799249e6a177af87653e17d014d1dad7ca638
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-28 11:53:39 +05:30
Nilaan Gunabalachandran
2a3fe5e4c5 disp: msm: sde: skip unnecessary cache register programming
Plane update will call system cache update, and by default,
will clear any cache programming. This clear is only necessary
after returning from a cached state. This change will reduce
unnecessary programming and event logs if the sys cache
was previously disabled and remains disabled.

Change-Id: I7f560ff24990a8c7ad785e560873193b7bf3a491
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-09-10 08:33:23 -04:00
Lei Chen
fb4edab2b3 disp: msm: sde: Update UIDLE and QoS LUT when DRM mode is changed
UIDLE and QoS LUT configurationis might be different between
different frame rates.
Add this change to update UIDLE and QoS LUT according to frame
rate when DRM mode is changed.

Change-Id: Ia16a963e185b911b7dd11e81a26cab732c2b185c
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-08-18 09:56:43 +08:00
Narendra Muppalla
cea2d1cef0 disp: msm: sde: add macro for default fps
This changes adds macro for default fps.

Change-Id: Ieb1d38bd6fbfcd3fec7e2cc6e39636b6297dd0ef
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-22 13:07:45 -07:00