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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>