Graf commitů

101 Commity

Autor SHA1 Zpráva Datum
Amine Najahi
c5f2bd7401 disp: msm: sde: add multi-mode RFI support
Currently, RFI feature only supports panel that contains
a single timing node. This limits the feature availability
for panel with multiple modes or with DFPS support.

This change adds support for RFI on panels that contains
multiple timing nodes.

Change-Id: I3a7aadf7b6da3518350b2eb815602b13b5c259f5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 06:32:45 -07:00
Amine Najahi
d4def5bd8c disp: msm: sde: add new interface for RFI feature
Add a new connector range property and a new entry to the panel
capability blob to publish the list of supported RFI frequencies.
In addition, add the required functions to set, validate and update
DSI bit clock rate value to trigger an internal seamless mode switch
and reconfigure DSI clock and PLL.

Change-Id: I7d19cc369f8c5528709f2f20a51ef02180ebdea4
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 06:32:17 -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
qctecmdr
ae6a089b20 Merge "disp: msm: sde: refactor sde_connector_atomic_set_property function" 2021-03-19 20:51:27 -07:00
Amine Najahi
6a1cea8457 disp: msm: sde: refactor sde_connector_atomic_set_property function
Reduce cyclomatic code complexity of sde_connector_atomic_set_property function from 34 to 22
by moving OUT_FP and RELEASE_FENCE property setting code to separate
helper functions.

Change-Id: I8ac171fa5b8631c7133d276dd872a6c79c5e3114
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-17 17:26:33 -04:00
Christopher Braga
c8f9e73f0e disp: msm: dsi: move demura panel ID fetching to DTSI
Previous design had the demura panel ID passed in on the Linux kernel
command line. Update the DSI driver to read this information from the
DTSI instead.

Change-Id: I7697bb34a313f1837b80ba5ff78e720e8131a819
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
2d9a52fe5c Merge "disp: msm: extend the maximum value of backlight scale" 2021-03-15 20:52:16 -07:00
Satya Rama Aditya Pinapala
26b26c8422 disp: msm: sde: reduce log level of thermal backlight device
The change reduces the log level if the thermal backlight device
registration fails. This is not a fatal use case and hence shouldn't
be an error log.

Change-Id: I08d4014a2629c5181bd7219c4836affb81da96ae
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-03-10 14:43:00 -08:00
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
Jayaprakash Madisetty
1b460b9200 disp: msm: sde: install retire fence offset property
Add changes to install retire fence offset property
and this configurable offset property can be used
to create speculative retire fences.

Change-Id: I0b5bf9bab5bfb811ddbc7a3e8813a3e801272d41
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
2021-03-02 12:54:39 +05:30
Xu Yang
34c65a3106 disp: msm: extend the maximum value of backlight scale
The maximum value of backlight scaling property is enlarged
from 65535 to U32_MAX. Change supports DRE feature to
increase backlight level through backlight scaling property.

Change-Id: Ibe929308faf8c6f94bacbec7f58cc4ffe8133a85
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
2021-02-24 15:11:43 +08:00
Samantha Tran
1e4664fcec disp: msm: sde: add support for CWB ROI cropping feature
This change exposes capabilities for CWB ROI to userspace
as well as implements the cropping feature which is now supported.

Change-Id: Idf76727175bf7c183367be715eaa45f3a432640c
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-02-23 17:17:29 -08:00
Satya Rama Aditya Pinapala
6fe6395a75 disp: msm: sde: use backlight_device_register to register for backlight device
Reverting the backlight register call, as devm_backlight_device_register is not
available in the abi whitelist.

Change-Id: Ieb200bd8fb9393397fd3f0e013e3f7573eda8a38
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-01-29 11:56:51 -08:00
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