Commit Graph

54 次程式碼提交

作者 SHA1 備註 提交日期
Rajeev Nandan
75037208b6 Revert "disp: msm: dsi: move backlight operations to post kickoff"
This reverts commit e60959b052.

Change-Id: I539522a6a01297fecfafb446a44e725679bc39c0
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2021-03-03 23:55:49 -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
Lei Chen
ab3f86f918 disp: msm: use connector properties to expose and set panel mode
Expose panel mode from kernel to SDM with SDE connector property
CONNECTOR_PROP_MODE_INFO and set panel mode from SDM to kernel
with SDE connector property CONNECTOR_PROP_SET_PANEL_MODE for
avoiding private change in upstream code in QGKI kernel.

Change-Id: I0629dad9399967cc1118ac02ce30597076ca367d
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 23:40:22 +08:00
orion brody
d00d481360 disp: msm: move from drm_mode to msm_mode
Move away from the private and private_flags fields from drm_mode,
as it is being deprecated in latest kernel version. Instead, Add
msm_display_mode as a wrapper to be used in downstream to store these
parameters. Also, store msm_mode in connector_state to be accessed
in commit path.

Change-Id: Ia5bdebe75f00aa15fb7db4dc3a0d50c30894a95c
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2021-01-04 13:18:36 -08:00
orion brody
dee5134f1e disp: msm: add private mode_seamless flag
This change adds DRM_MODE_SEAMLESS to private flags downstream,
as it was deprecated from drm UAPI. Additionally, this will
update the is_mode_seamless function to access the seamless
flag from private flags.

Change-Id: Idea0b4ac8e71063c000f582d3228bc0a50a6a8e6
Signed-off-by: orion brody <obrody@codeaurora.org>
2020-12-17 12:10:48 -08:00
Samantha Tran
0c08cb1fb5 disp: msm: update parameters for drm_bridge_attach
Commit a25b988ff83f ("drm/bridge: Extend bridge API to
disable connector creation") and commit ee68c743f8d0 ("drm: Stop
including drm_bridge.h from drm_crtc.h) add additional input flags.
This change adds fixes to the drm bridge attach API and includes
relevant drm_bridge header files.

Change-Id: I85e84eaff7df2995243896108a217fae81716b63
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:27:46 -08:00
Samantha Tran
16cc165833 disp: msm: obtain bridge from bridge chain
Commit 05193dc38197 ("drm/bridge: Make the bridge chain
a double-linked list") creates a bridge chain linked
list. This change updates the relevant changes to msm
driver to use the list to find the bridge associated to
the encoder.

Change-Id: I59eb2910be96f4fff7bdbeb040d6ad204c41d747
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:24:59 -08:00
Rajeev Nandan
e60959b052 disp: msm: dsi: move backlight operations to post kickoff
This change moves the backlight update operation from
drm bridge enable to connector post kickoff.

When timing engine is enabled with programmable fetch
enabled, the timing engine will start counting from
the prog_fetch_start point (which is somewhere in VFP).
It’s a grey area from that point to the actual panel
vsync and SW should not trigger DMA command during that
time.

During display resume, sometimes the INTF timing engine
do not get enabled completely at the first vblank irq.
The backlight update cmd transfer trigger as part of the
drm bridge enable can also take place at the same time,
that may cause DSI cmd transfer failure.

Change-Id: I2722d3c23012ef0e7bcc7f728ec5658318ce4e60
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-12-11 12:14:54 +05:30
Satya Rama Aditya Pinapala
ae5b602b4f disp: msm: dsi: trigger broadcast commands using DMA start window
As per the HW requirements it is highly recommended to use DMA start
window to trigger  broadcast commands. If not used then it can
result in a hardware hang with the DSI controllers going out
of sync. This behavior is even more prominent in cases of higher
refresh rates. As part of the change we change the default DMA
scheduling behavior to default to maximum possible DMA window
in case it is not specified in the panel device tree.

Change-Id: Ied4df9063664cedbc18ce009054d4e5ecae30ab2
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-12-04 20:01:55 -08:00
Zhao, Yuan
0cf3838ac8 disp: msm: dsi: recount drm mode count
Drm driver will remove the same mode that defined
in dsi panel dtsi. But the mode count was not updated,
so when checked drm mode, need to recount the mode.

Change-Id: I51a2c40ceb7d4ee83a15f74d9d724b4fb9c8a618
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-11-06 00:36:40 -08:00
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
qctecmdr
13154febbc Merge "disp: msm: check max FPS of DFPS to update UIDLE configurations" 2020-09-18 16:36:35 -07:00
Rajeev Nandan
19a54c5650 disp: msm: dsi: enable xlog in critical paths
Enable xlog in critical paths to increase debug coverage.

Change-Id: I177acd3f2c2ab349f533bb9fbd8a8122539d524b
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-16 13:00:11 +05:30
Lei Chen
c44e0b42df disp: msm: check max FPS of DFPS to update UIDLE configurations
It is not applicable for all DFPS cases to update UIDLE state
according to current frame rate. If DFPS changes frame rate
through vertical front porch values, the SDE clocks and transfer
time will not get changed accordingly, and it always get fixed
at max frame rate configuration of DFPS.
Add this change to check max FPS of DFPS instead of current
frame rate for UIDLE update, if DFPS is enabled with VFP.

Change-Id: I7634bce6a9eb1af212ba19a267735be08b20ae1f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2020-09-15 09:51:30 +08:00
Satya Rama Aditya Pinapala
03f9c40e7d disp: msm: add allowed_mode_switch blob property
The change adds a new mode property allowed_mode_switch. The new
property is a 32bit bitmask that indicates the modes each mode
can switch to. This change is required to pass the driver mode
switching capabilities, so that user mode can reject any mode switch
that is not supported by the driver.

Change-Id: I76d1733a07a6d57487ba9f461055270d7e60e060
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-04 17:58:46 -07:00
Linux Build Service Account
0af93447c5 Merge "disp: msm: dsi: enable dfps trigger at mdp intf flush" into display-kernel.lnx.5.4 2020-08-20 21:52:52 -07:00
Vara Reddy
c9cb9f51f3 disp: msm: dsi: enable dfps trigger at mdp intf flush
This change allows dynamic refresh trigger to sw trigger
and mdp intf flush. With this we can make sure that DSI
timing/clock update and mdp intf timings are updated in
one vsync.

Change-Id: Ic807f498e2e47be6dd0f1e11ff1fc0896a8ec758
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2020-08-20 12:48:32 -07:00
Krishna Manikandan
35d72973e0 disp: msm: update seamless check for connector
During CWB case where writeback connector is disabled
and connectors_changed is set, add support to allow
disabling of corresponding encoder for this connector.
Modify the seamless check for connector to handle
the same. With this cwb + dfps concurrency can
be handled.

Change-Id: Ia8f86bd12ac3c5ab622334fb04cdcb2e2b60f111
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-07-23 14:46:22 -04:00
Yuan Zhao
1cae362239 disp: msm: dsi: change the log level in seamless transition
This is a common case that seamless transition was rejected
when active/connectors changed, so just print an info log here.

Change-Id: Iada9ad84af1c072ccdbc97f5bf438de6a032f45f
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-05-29 19:06:21 -07:00
Rajeev Nandan
b990bd6a04 disp: msm: dsi: select timing mode shared from kernel command line
If the command line timing is given, select corresponding
drm display mode as preferred mode. Select first sub mode of
that timing as preferred mode if dynamic clock or dynamic fps
is enabled.

Change-Id: I688b3bc07f79f4d014b8a7797204d3d6a873222d
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-05-14 21:03:44 -07:00
Narendra Muppalla
218244e58b disp: msm: update rm topology mapping tables
This change updates resource topology mapping tables and includes
logic to compare compression types for dsc vs vdc.

Change-Id: I1735edeb07aec8ed0065f84ac0824c58158412f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-05-04 22:47:11 -07:00
qctecmdr
9794834cc5 Merge "disp: msm: dsi: avoid seamless request for cwb transitions" 2020-04-23 09:09:01 -07:00
Rajeev Nandan
4f53bc1569 disp: msm: dsi: fix physical size truncation of large panel
Panel's physical width/height larger than 255mm is getting
truncated due to type conversion into smaller type.

Change-Id: I826fb2db542146c07d8379951563430b7da8288c
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:09 -07:00
Krishna Manikandan
eaa0b9cc15 disp: msm: dsi: avoid seamless request for cwb transitions
There are some scenarios where a dfps request
during cwb session will result in cwb
encoder not getting disabled once the cwb
session is over. Add support to fail the
commit if any VRR or dynamic clock change
request is received during CWB transitions
to handle this.

Change-Id: Id3f192f79eac4ad0d7301bd34f7151fec243d685
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-19 14:13:35 -07:00
Rajkumar Subbiah
56e041919c disp: msm: dsi: add widebus support for DSI
From Lahaina onwards, for compressed DSI output, widebus should be enabled.
In widebus mode, 6 bytes of data are transmitted per pclk.
For uncompressed output, widebus must be disabled to transmit 3 bytes
of uncompressed data per pclk.

Change-Id: I7fc0bdb2e1678152d57b4cbb8295063a2ba8ae73
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-04-09 14:15:13 -04:00
qctecmdr
34b32d77f8 Merge "disp: msm: dsi: disallow backlight update during panel mode switch" 2020-03-20 20:33:23 -07:00
Lei Chen
3842597275 disp: msm: dsi: disallow backlight update during panel mode switch
DSI controller and clock will be disabled/enabled during panel mode
switch, so disallow backlight update during panel mode switch to
avoiding DSI exception.

Change-Id: I37e2f3c9aa929555593ffb53950521150ee7698f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-03-17 19:34:51 -07:00
Lei Chen
fda33778de disp: msm: dsi: reject POMS commit with active changed
Reject composition if panel mode switch is requested
during power on/off commits.

Change-Id: I3a5b28fd9f5bd927537824033a1c8dc838366d5b
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-03-17 19:31:35 -07:00
Prabhanjan Kandula
45af4566d9 disp: msm: dsi: add support for spr enable from panel config
This change parses SPR enable entry from panel device tree and
populates SPR specific information in panel data structure.
Valid entry of SPR pack type is treated as panel requirement
to enable SPR for specified pack type from source end. This change
also populate connector capabilities blob with SPR pack type.

Change-Id: I9d9ab8a990476fba281e12890bf3f7b17a174d79
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2020-03-16 22:04:40 -07:00
Abhinav Kumar
e3f23771ba disp: msm: add support for variable compression ratios
Currently the compression ratio is hard-coded to either 2:1 or
3:1 in several places. This is not sufficient for new compression
algorithms as they can support higher compression ratios.

Add support for calculating the compression ratios from the source
and target bpp thereby eliminating hard-coding.

Change-Id: I6383f3d0c781193d0a9ed74df5a95d8e856edb3d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-01-29 13:46:57 -08:00
Abhinav Kumar
c4f5050e13 disp: msm: add VDC topology related changes
Add support to configure the DPU pipeline to support VDC-m
topologies.

Change-Id: Ib8ce9a0eaeaa838759fb09cb2ee164d4765e4989
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-01-29 13:45:35 -08:00
Narendra Muppalla
d1d9ae8b19 Disp: Snapshot change for lahaina display driver
This snapshot change adds downstream support
for drm 5.x+(msm_lahaina branch) linux kernel.

Change-Id: Ia691c95da155a00e449c91a2f1a5b20a8e71aed4
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2019-11-24 12:30:51 -08:00
qctecmdr
3fcfb0fdbb Merge "disp: msm: dsi: reject seamless commit with active changed" 2019-10-29 07:27:03 -07:00
qctecmdr
ee16fbb03f Merge "disp: msm: sde: update avr mode config during commit prepare" 2019-10-24 21:31:57 -07:00
Jayaprakash
4f3de7c548 disp: msm: dsi: reject seamless commit with active changed
Reject composition if any seamless transition such as
VRR, dynclk is requested during power on/off commits.

Change-Id: I731bfc06b3bd1e7ae920c12cbc68f95f5cc01687
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-24 12:37:45 +05:30
Vara Reddy
45ad6294fe drm/msm/dsi: fix panel physical dimensions updated to connector
Change overrides the panel physical dimensions with correct
value upto a precision of millimeter, which was getting
truncated to centimeter as drm structures maintain it in
centimeters.

Change-Id: I035357596ed42154b657b791846aee6f940f2e53
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-10-18 13:49:41 -07:00
Jayaprakash
aad3dd4525 disp: msm: sde: update avr mode config during commit prepare
Add changes to support avr mode config update during
prepare commit which happens before gpu fence wait
for the input buffers.

Change-Id: Ib2cb5b7e1f10501914c003f6cf066b85048f79d4
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-18 12:53:56 +05:30
Jayaprakash
985ffddc71 disp: msm: sde: add one-shot qsync mode support
Add support to enable one-shot mode during qsync
update. This feature ensures the frame drops can be
reduced due to delayed software flush for the
current commit. Also, add changes to disable the qsync
feature post commit.

Change-Id: Icb158853f52284bcf8fa641e5f62200c5460b660
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-18 12:53:17 +05:30
Lei Chen
4e679c086d disp: msm: dsi: Enable ESD check after POMS done
ESD check is disabled while switching panel operating mode.
This change enables ESD check after panel operating
mode switch is done.

Change-Id: I421d70d9be4c14107a7b51470801157d28874ffb
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2019-09-04 15:18:27 +08:00
qctecmdr
541da47199 Merge "drm/msm: perform mode fixup against current state" 2019-07-27 09:33:20 -07:00
qctecmdr
a6bfb7fc1e Merge "disp: msm: dsi: adding prefix for logs" 2019-07-23 01:20:03 -07:00
qctecmdr
04dcddd7c0 Merge "disp: msm: dsi: update default physical panel width and height" 2019-07-22 21:20:22 -07:00
Satya Rama Aditya Pinapala
6c483e3b23 disp: msm: dsi: adding prefix for logs
Adding debug, info and error prefix for log messages
in dsi files. To enable debug logs
run "echo 0x1 > /sys/module/drm/parameters/debug"

Change-Id: I438ac16954bd1d39450f8adeb7fb17f9ea6f8140
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-07-22 17:43:35 -07:00
Midas Chien
216abbf9fa drm/msm/sde: fix unpaired sde trace
Unpaired trace "sde_power_resource_enable" caused tracer parse
incorrect trace points and display weird state on Chrome. Make
trace "sde_power_resource_enable" pair to fix it.

Bug: 122510119
Test: Checked sde trace can be displayed correctly on Chrome
Change-Id: I938b5648a09e00eaea59070af31a2e6469763087
Signed-off-by: Midas Chien <midaschieh@google.com>
(cherry picked from commit 3a335059bf7a200977e8f4e0a4aa5c6ceca3863a)
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-07-18 10:36:25 -07:00
Vara Reddy
4920154558 disp: msm: dsi: update default physical panel width and height
Change updates connector edid node with proper panel physical
dimensions based on panel device tree file.

Change-Id: I36db9c3e5b5aee926a0d029ae742166fc8c7591c
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-07-17 17:22:20 -07:00
qctecmdr
3e7ef1e1d0 Merge "disp: msm: dsi: Remove drm_panel tracking from sde_connector" 2019-07-13 00:16:26 -07:00
Yuan Zhao
cc9aa48df6 disp: msm: dsi: Remove drm_panel tracking from sde_connector
The drm_panel defined in sde_connector was not used, so
removed it.

Change-Id: I70a94f11ebd60362d25e37a256f46d3d4942089d
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-07-11 20:11:26 +08:00
Adrian Salido
2cd1775195 drm/msm: perform mode fixup against current state
Current mode fixup validates mode against both state mode and crtc mode
which causes mismatch between validation and drm_mode_equal check.
Perform validation against the same mode (crtc->state->mode) to avoid
mismatch and reflect proper state.

Change-Id: If5647f2df0275cc14dd8d761d16e58fd0aa775f7
Signed-off-by: Adrian Salido <salidoa@google.com>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-07-03 13:06:44 -07:00
Nilaan Gunabalachandran
d92000cdd4 disp: msm: add resource caps structure and api changes
Create a data structure to maintain available hardware resources
and track capabilities. This data structure is used to send
the current available resources and caps information to
connector ops get_mode_info, get_modes and validate_mode to
process the display mode.

Change-Id: If38fc628ee5ab4729821f88c0050ab45375187b8
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-07-02 17:34:49 -04:00
Yujun Zhang
39bc44163c disp: msm: dsi: unify dynamic clk support for command mode
Currently the dynamic bit clock switch trigger for command mode
is supported via sysfs node. This might lead to unnecessary
race conditions, when dsi driver is enabling the dsi bit clock
as part of commit and at the same time if bit rate change via
sysfs happens. So make the trigger happens via kernel mode set
call as done for video mode.

Change-Id: I17acb408d2b6dbd6fa41994e56262e31e43d088b
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
2019-06-05 16:06:36 +08:00