Commit Graph

87 次程式碼提交

作者 SHA1 備註 提交日期
Satya Rama Aditya Pinapala
f44bfc5e19 disp: msm: sde: update backlight register call
Change uses devm_backlight_device_register to register for backlight device
as backlight_device_register is deprecated as of 5.10. Change also removes
failure if cooling device is not present to avoid connector_init failures.

Change-Id: Icc834fa39ec0de221cc48e280637e6cbbf3451b4
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-01-21 17:53:32 -08:00
Linux Build Service Account
bcce6e27b2 Merge "disp: msm: use connector properties to expose and set panel mode" into display-kernel.lnx.5.10 2021-01-13 14:23:32 -08: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
Nilaan Gunabalachandran
e37d7dd1b6 disp: msm: sde: store drm panel in sde connector
Drm panel pointer is no longer available in the drm connector.
This change stores the drm panel in the sde connector.

Change-Id: Ia7ed35d1f0914c45e34f15b02c8a3d8c32292ee6
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-01-11 12:12:08 -05: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
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
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
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
Veera Sundaram Sankaran
1fce17fe87 disp: msm: sde: avoid backlight updates on enable/disable of TVM
Avoid setting backlight to max/0 during bridge enable/disable
for trusted-vm as the transition between the VMs are expected
to be seamless without any implicit changes to backlight.

Change-Id: Ib828113e49af1be4effea2b71b3106e3cbf401c2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-03 17:56:19 -08:00
Jeykumar Sankaran
08c40fb26e disp: msm: sde: allow backlight device registration for trusted vm
Trusted VM can support dynamic backlight updates through DCS
commands. Allow SDE to register for the backlight device
only if the panel supports DCS backlight update mode.

Note that thermal driver is disabled in trusted vm. So we are
still avoiding registering with msm thermal  driver. The
backlight updates are only supported through backlight driver
provided sysfs nodes.

Change-Id: I9cd41d473445387c8bc9048d7e565d49124a36b7
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-11-03 17:56:02 -08:00
qctecmdr
81b698b276 Merge "disp: msm: sde: support qsync and vrr in same atomic commit" 2020-10-16 00:13:41 -07:00
Yashwanth
30b1dd339b disp: msm: sde: support qsync and vrr in same atomic commit
This change adds support to program both qsync and variable
refresh rate in the same atomic commit. During vrr
usecase, if qsync is enabled, avr ctrl gets programmed
during prepare phase as well as after configuring timing
engine. This change also handles such scenarios to prevent
double programming of avr ctrl.

Change-Id: I19461423b0ae08c8204b5edeb98e3d73ce16a21b
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-10-15 16:03:46 +05:30
Ritesh Kumar
4a82bfb9c7 Revert "disp: msm: dsi: Panic on getting continuous ESD check failures"
This reverts commit 93fa9bdf60.

Change-Id: Ia29c690202d53207377fad9117199d9c024a33cf
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-10-08 21:50:15 -07:00
qctecmdr
90c3cec488 Merge "disp: msm: dsi: Panic on getting continuous ESD check failures" 2020-09-29 09:59:58 -07:00
Jeykumar Sankaran
a521764b53 disp: msm: sde: populate connector modes during init
When continuous splash is enabled, KMS populates the modes of
a connector during splash config. With TUI VM enabled, this path
will also be exercised by trusted vm for splash handoff, where for
a given display we try to use the same HW blocks configured by
the primary VM.

Since the trusted VM invokes the path under connection_mutex lock,
calling fill_modes will lead to a deadlock. So, move the connector
mode population during init for DSI displays, since the modes are
available for the connector during initialization.

Change-Id: I12f920f4af84b7bccc97a5f5edb5117ada49b960
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-09-24 11:24:03 -07:00
Lipsa Rout
93fa9bdf60 disp: msm: dsi: Panic on getting continuous ESD check failures
During stability stress testing, there are many instances where
the panel is unreachable which results in the ESD check mechanism
failing continuously with PANEL_DEAD events. There are two possible
reasons. Either the device is bad or DSI controller is hung. As of
today, logs/xlog is flooded and info on root cause is missed in the
logs. To catch the root cause for such issues, this patch induces
forced crash when there are five consecutive ESD check failures.

Change-Id: Id0a5762ac977f8a209af651f65cbe9da199cb8d0
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-09-24 22:51:39 +05:30
Dhaval Patel
9ce6a2fbb3 disp: msm: sde: trigger esd recovery before event notification
ESD recovery schedules KICKOFF event on event_thread,
switches the vsync source to wd_timer and waits for
pending frame. This work is triggered from workthread
and it must be finished before panel dead event
notification to avoid race condition with power off
sequence. This change also cancels the delayed work
after encoder is disabled.

Change-Id: Iadc5753238a54e6dad3ff57a9b8ae3bd9644c0dc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-09-22 16:53:49 -07: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
qctecmdr
57807a5d97 Merge "disp: msm: dp: use base connector properties for mst connectors" 2020-08-20 23:40:52 -07:00
Rajkumar Subbiah
9522cd1382 disp: msm: dp: use base connector properties for mst connectors
When DRM property objects are created, the DRM framework attaches a
dellocator which can eventually free the object when the last reference
is removed from it. The framework can only do this before the driver is
registered. If a property is created after the registration then the
framework is unable to attach a deallocator causing a memory leak during
tear down.

The current DP driver creates a new colorspace property whenever a
new dp connector is initialized. It creates a base connector at probe
time prior to registration. But then it also creates new connectors,
post registration, whenever a new MST dongle is attached to the
topology, causing memory leaks.

This change limits the property creation to the base connector and
attaches the same object to MST connectors to avoid memory leak.

Change-Id: Ib97dc7aac260b4f3f96c1097f58bd276c68501f8
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2020-08-17 21:20:04 -04:00
Jeykumar Sankaran
a962ce3f02 disp: msm: sde: expose helper api at VM layer
Add helper API's at VM layer to avoid repeated
VM structure dereferencing in rest of SDE files.

Change-Id: I31ee506adbd12c5452bef15da7c468c87b2c9f96
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-08-14 16:21:14 -07:00
qctecmdr
5cd8505102 Merge "disp: remove kernel mapping of writeback framebuffer" 2020-07-24 02:22:42 -07:00
Jeykumar Sankaran
f86e722e56 disp: msm: sde: control backlight update for trusted UI
Install backlight property only for primary VM and avoid
backlight updates when HW is not owned by the VM.

Change-Id: I35f26d5c41ea57c7271382a1fe571e65ee4520c1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-21 13:29:28 -07:00
Satya Rama Aditya Pinapala
333ce300ee Revert "disp: msm: sde: control backlight update for trusted UI"
This reverts commit 7bb6e30418.

Change-Id: I615129778556434f2e9a4bd1224b07df7b09ec02
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-07-20 13:14:45 -07:00
Jeykumar Sankaran
7bb6e30418 disp: msm: sde: control backlight update for trusted UI
Install backlight property only for primary VM and avoid
backlight updates when HW is not owned by the VM.

Change-Id: Ief831661e2b9419a0b9d392742bf96300ecc0d48
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-16 09:22:51 -07:00
qctecmdr
06b7a6feeb Merge "disp: msm: sde: Register display brightness cooling device" 2020-07-13 08:57:51 -07:00
Narendra Muppalla
472784dfdd disp: remove kernel mapping of writeback framebuffer
This change removes the fb_kmap debugfs node along with kernel
mapping of writeback framebuffer. It also replaces dma_buf_kmap
calls with dma_buf_vmap.

Change-Id: I2fbee7fa5922071f6805d8e6df540ce87056bc0b
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-07 14:22:14 -07:00
Yuan Zhao
5bba78331d disp: msm: debugfs interface for sde connector to do DSI read
This change implements a new feature to read the cmds response
of the panel from sde connector interface. Sde connector opens
debugfs interface for all the connectors those have support for
cmd receive operation.

Sde connector init module creates rx_cmd debugfs file at
/<debugfs-root>/dri/0/DSI-1/ for DSI-1 connector.
Format for DSI command transfer:
echo "command bytes" > /<debugfs-root/dri/0/DSI-1/rx_cmd
byte-0: the length of received buffer
byte-1: data-type
byte-2: last command. always 0x01
byte-3: channel number
byte-4: flags. MIPI_DSI_MSG_*, must be set to 0xa
byte-5: 0x00
byte-6 and byte-7: command payload length
byte-8 to byte-[8+payload length]: command payload
Example:
echo "0x01 0x06 0x01 0x00 0x0a 0x00 0x00 0x01 0x0a" > rx_cmd
The command receive operations are allowed only if controller
(ex. DSI controller) is in active state.
Read the value of panel response:
cat /<debugfs-root>/dri/0/DSI-1/rx_cmd
returns the value of this command.
nothing - failure, xx xx - success.

Change-Id: I912b65d606e248c7a886d219f4363bf7766ee7b6
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-07-01 00:55:51 -07:00
Satya Rama Aditya Pinapala
182d88e3b9 disp: msm: handle panel detection after a pp done timeout
The change allows for multiple TE checks during a pp done timeout.
With this change, when a timeout occurs the panel status is checked
using the default ESD check status method followed by multiple TE checks.

Change-Id: If813964bab55c5e8113721060aa5b279f30fa5e0
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-06-29 15:52:01 -07:00
Jeykumar Sankaran
b87b13690b disp: msm: specify default value for msm enum property
Allow caller to specify the default value of the enum
property while installing with msm prop layer. It is
not always the case that the default value to be the
first entry.

Change-Id: Ie0bb1ad7479e3e07810b3d817fdf618b1935858c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-06-17 15:36:33 -07:00
Ram Chandrasekar
53654b534a disp: msm: sde: Register display brightness cooling device
Register for getting a blocking notified call when the display cooling
device mitigates. Update the current brightness to the thermally allowed
level.

Change-Id: I20945a20751646e6d9bbf8bb7e7039c6ce43c306
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2020-06-16 13:45:39 -07:00
Abhijit Kulkarni
ccb6ded3b9 disp: msm: sde: fix hdr meta data property handling
Allow clients to reset the hdr meta data property even when
connector does not support hdr. This is required for shell stop
case cleanup when dp connector might be in disconnected state.

Change-Id: Ie0db61530216f1fab6c952933425259d32cfc834
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-06-03 16:06:37 -07:00
Abhijit Kulkarni
89151186f3 disp: msm: sde: switch esd detection to panel read
This changes the method of esd detection at tx timeout
from TE to panel status read for panels having status
read as default method.
When ESD is triggered, even if spurious TE interrupt fires
after resetting the panel gpio, driver correctly follows
the recovery after esd failure.

Change-Id: Ib33537319f128c038f5774829dfd09bab9664fea
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-05-06 13:23:04 -07:00
Amine Najahi
e7a890df11 disp: msm: sde: add 4LM topology variants in resource manager
Add 4LM topology variants in resource manager and in drm
connector topology name property.

Change-Id: I13e6eaafe60037b48d2c9d356f668b69720cbf48
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-05-05 23:04:15 -04: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
Gopikrishnaiah Anandan
718e224640 disp: msm: Install demura properties on connector
If DPU hardware supports demura feature, install the connector
properties related to demura feature.

Change-Id: Ieaddfc695e9f57e3c45e2bc0bd2c2e103f895ba8
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2020-03-30 17:41:51 -07:00
qctecmdr
845000ba36 Merge "disp: msm: sde: setting async cmd wait flag only for DSI" 2020-03-29 10:01:25 -07:00
qctecmdr
34b32d77f8 Merge "disp: msm: dsi: disallow backlight update during panel mode switch" 2020-03-20 20:33:23 -07:00
Satya Rama Aditya Pinapala
196502bc12 disp: msm: sde: setting async cmd wait flag only for DSI
Asynchronous command transfer wait during pre kickoff
is only applicable for DSI. The change ensures that
the flag is set only for DSI connector, otherwise it can
result in memory scribbling for other connectors.

Change-Id: I623f15cf13fcd3ae72f584d5ef8883570a848c93
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-03-18 15:08:02 -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
Dhaval Patel
9652f27293 disp: msm: avoid esd check during pm_suspend state
Avoid esd check during pm_suspend state because core
clock enable will fail. This change adds additional
check and also adds the clock enable failure check.

Change-Id: Ie8bfa4f74d323ff15a07fb037675f07ab942f016
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-03-17 19:31:26 -07:00
Tatenda Chipeperekwa
5977818ac3 disp: msm: dp: use updated colorimetry and DSC definitions
Update colorimetry definition usage and how we access DSC information
as per changes in the upstream DRM framework code.

Change-Id: I28482380124734680e46904b8d536ebadba8cc60
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-12 18:06:52 -07:00
Tatenda Chipeperekwa
310e888d0f Revert "Revert "disp: msm: sde: remove colorspace property from connector""
This reverts commit 7470449242.
This is required to satisfy cross component dependencies with
kernel-5.4.

Change-Id: Idba2983923a8605ec0a05408da48f7549730035d
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-04 17:49:00 -08:00
Tatenda Chipeperekwa
43599c49a3 Revert "disp: msm: dp: use updated colorimetry and DSC definitions"
This reverts commit 982574f095.
This is required to satisfy cross component dependencies with
kernel-5.4.

Change-Id: I979e0371973376c46f2a11659348df726be2679d
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-04 17:48:27 -08:00
Tatenda Chipeperekwa
982574f095 disp: msm: dp: use updated colorimetry and DSC definitions
Update colorimetry definition usage and how we access DSC information
as per changes in the upstream DRM framework code.

Change-Id: Ie52aed2df2f6c3f2df1e4129f342a85256f8fae4
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-03-03 10:35:12 -08:00
qctecmdr
f1c8d9f378 Merge "Revert "disp: msm: sde: remove colorspace property from connector"" 2020-03-03 09:08:48 -08:00
Tatenda Chipeperekwa
7470449242 Revert "disp: msm: sde: remove colorspace property from connector"
This reverts commit 483c9fdff4c611f250574fe6909cd8e5336808f5. It
is no longer needed on kernel-5.4 as all the upstream changes are
now available.

Change-Id: I11b0317c0e05ea2fe03fb1af734a79a1174b1922
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-20 19:41:31 -08:00
Abhinav Kumar
2e1c9a0751 disp: msm: remove drm_connector usage for colorspace
Move away from using the supported colorspaces in drm_connector
and replace it with sde_connector to satisfy GKI requirement.

Change-Id: I947c91ea6672e242e572151f72cf0db2e71990cb
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 14:32:02 -08:00
Abhinav Kumar
f1959d903b disp: msm: replace usage of drm_connector with sde_connector for hdr10
Since the HDR static metadata block parsing has been moved to
the sde edid parser, replace the usage of drm_connector with
sde_connector for hdr10 so that the modifications to drm_connector
can be removed.

Change-Id: I4526cda426c46708d3689eb8b993b7a4f50d32ae
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 14:31:42 -08:00
Abhinav Kumar
849041b3fe disp: msm: replace usage of drm_connector with sde_connector for hdr10+
Since the VSVDB parsing has been moved to the sde edid parser, replace
the usage of drm_connector with sde_connector for hdr10+ so that the
modifications to drm_connector can be removed.

Change-Id: I7d69aa533e71fa45bfc578db24c17bb23e499c4a
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 13:47:39 -08:00