Unmult feature is currently using offsets from previous targets.
This leads to unexpected alpha transparency errors on screen.
This change updates the new offsets based on hw version and
retains the original offsets for backward compatibility.
Change-Id: Icdba050371a583f1a20b91a451be3324de12c2cf
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
When all instances of driver fd's are closed by user-space client, drm driver
will be closed. When last close of driver is called, custom reset properties
api will be called where driver should cache the properties that it wants to
clear. Current behavior of color processing driver is to clear hardware
configuration instead of caching which can cause crashes if clocks are off.
Change updates the driver to cache the pending disable and update hardware
during display commit.
Change-Id: I9703f860ed0ae3c859d6fc3995b58be13203f259
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Expose the number of RC hardware blocks to handle multi-display
use cases where RC feature needs to be enabled only if there
are sufficent RC hardware blocks available.
Change-Id: I37fe3ee4ac72894d9d51e832551d3fc19c0354b8
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Currently mode fixup function is called multiple times
in the same commit. This causes invalid combination of
DSI mode flags to be set when there is an RFI change
with proch compensation feature enabled.
This change modifies the mode switch condition for DMS
to compare internal dsi mode and flags and fixes the
dynamic clock change detection by using a single variable.
Change-Id: Iaf9c8ca7c6a27f26aefead399bc93fbbb02b404b
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Currently when RFI is used on a video mode panel the horizontal or
vertical front porch values can be adjusted to maintain a constant FPS.
When this feature is enabled, driver is not propagating the new
htotal or vtotal values to usermode for accurate BW and MDP clock
calculation, which may lead to underrun in some usecase.
This change publishes beforehand all the RFI related timing
such as compensation type, hfp or vfp and clock values for
each mode for accurate BW and clock calculation.
Change-Id: Ib89c5e318fe978b0ae2215dedc430e057a9a81b9
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
The brightness value from backlight device is OS brightness, not panel
backlight value. This change corrects the brightness bound check to
check against the OS brightness max value instead of panel backlight max
value. This change also move the bound check in dsi display to make sure
the max backlight value send to panel is within the expected range.
Change-Id: Ic9e3ba69700ae4c0e950cb665837a1f0a1317b26
Signed-off-by: Ping Li <pingli@codeaurora.org>
This change updates rsvp_cur pointer to latest to avoid use
after free issues. rsvp_cur pointer can be freed in few cases due
to the unlock, wait and lock of rm_lock present in
_sde_rm_poll_get_rsvp_nxt_locked.
Change-Id: I389048188e8a615edc3e75dd1102d4ca8c74af65
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
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>
For batched commands, prepare resources at the start of the command packet and not for the
command with LAST_COMMAND flag set.
Change-Id: Ibbb0d1d1acd4ddeebd07bf9dd6ea1a949edd8d02
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Demura memory region parsing incorrectly uses the display number
as an extraction index, causing failures in dual panel cases.
Update Demura memory region parsing to always use index 0 during
extraction as each defined region is designed to only declare
a single memory address.
Change-Id: I270f392b636148acd9b891bffcc3cf3d032eab70
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
Currently edid cache is cleared only in the mst attention callback
flow i.e. if a monitor is plugged in/out of a mst dongle. If mst
dongle is plugged out directly, the edid cache is not cleared.
This change clears the edid cache also during the
connect/disconnect callback.
Change-Id: Icc4b4ca6a59f1ee32f7fe062831a3a19f4ab9f00
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
Delayed work items may touch HW registers. If these work items
run while HW is not owned by this VM it will lead to invalid
access. This happens in video mode as HAL does not disable idle
power-collapse in this mode. It can also happen with ESD status
if lastclose or TUI transition failure occurs.
Although there is a contract with user mode to turn off certain
features, kernel cannot rely on it to always do the right thing.
Prevent potential crashes from certain corner cases by
cancelling all delayed work items when the HW ownership is
transferred.
Change-Id: I08da17f2ce72bf2fddf71924c3e8edd2e2715be8
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Add pr_fmt definition in SDE VM modules for simplifying
searching for DRM driver logs.
Change-Id: I3f83b52dec6479dd89306aed7d84e73928f4e9ef
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
In current implementation, register dump memory is allocated
separately for each range and block. When register dumps are
added to minidump, this will generate multiple minidump bin files
after a crash. Changes are made to allocate all the required
register dump memory once. When register dumps are added to
minidump, this will generate only one minidump bin file.
Use kvzalloc and kvfree to allocate and free this memory as
the memory needed to allocate is around 126 KB. Update the
allocation of debug buses also to kvzalloc and kvfree.
Change-Id: Ia5cca47b085bcca57ce09981a55cc1bfbeeae77e
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
Add changes to modify the phys_enc->in_clone_mode variable
post wb_reset_state since this is a shared variable used
during atomic_check and atomic_commit. In current issue case,
wb_atomic_check has set in_clone_mode to true in commit N,
and in commit N-1 CWB is being disabled and re-sets the
in_clone_mode variable to false causing pp_done timeouts in
primary in commit N.
Change-Id: I8159bbdb5622a351d76bdc4dba75d48df20f4365
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This reverts commit 0623a02a84. It leads to
panic during smmu faults because we do not have any recovery. Reverting
this will give the control to the client to dump if necessary.
Change-Id: I85982e129cabc73b041e25c35e965117d60f3bfa
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This change updates the supported format lists for wb connector.
Change-Id: Idf7e004780e963ef5937049dc1ddedae344697a0
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
In PM resume with CWB concurrency usecase, crtc pointer in
conn->state is NULL since drm_mode_config_reset operation is
performed on pm_resume. This change relies on conn_mask in
new_crtc_state for primary connector retrieval and also adds
get_num_lm_from_mode callback to DSI for LM count retrieval
from dsi panel topology. Existing get_mode_info api cannot
retrieve the topology info because mode->priv_info is NULL.
This occurs as WB encoder is added in the drm encoder_list
before primary encoder, introduced as part of commit d28ebf05f4
("disp: msm: sde: populate WB display encoder list before dsi").
Change-Id: I55358fd88ab778bd81475cf3628be13335de1cb5
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This change adds dynamic memory allocation/free for struct
dsi_display_mode_priv_info variable as it is only temporary
variable to find mode and also reduces stack consumption in
dsi_display_find_mode function.
Change-Id: I2116757f11614f9e8406ddfdb08b5a4b6292cfea
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
When calculating the maximum bpp that can be supported for the
link configuration and mode, currently the driver is not
accounting for the FEC overhead. When FEC is enabled, the
link bandwidth available for the video stream is reduced and
therefore it needs to be included in the calculation.
Change-Id: I41a664d739f369b17cff2ced7f88f5e90ee196f4
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
FEC is a link specific configuration and should be configured before
the MST streams are enabled. Currently, the driver is configuring FEC
for each stream and in a case where the first stream is compressed and
the second stream is uncompressed, it enables FEC before the first
stream is enabled but ends up disabling FEC when the second stream is
enabled.
This change splits FEC/DSC configuration into separate functions and
skips FEC configuration for the second stream.
Change-Id: Ic1bab321dc77da7ec5c0253c93bb69735a217fd6
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
Event logs are restricted to be logged only with IN_LOG option during
a SDE_DBG_DUMP() call. Extend the logging support to IN_LOG_LIMITED
option. The option is set to IN_MEM by default and can be changed
through debugfs.
Change-Id: I8245cebe3ad71c026fbc51b39edf39ec06b7d0e6
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The DMA buffers used by the display module are cached buffers. While
mapping to the CPU, pgprot_writecombine should only be used for uncached
buffers. The change fixes this mismatch during virtual address mapping.
Change-Id: I2f54375b4eb4071d9bbcae44449bb6c99feb24a6
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Some panels may require that the DSI link returns to the low-power
stop state (LP11) after transmission of every line. If a panel
requires that the DSI link returns to LP11, apply the LP11
insertion between lines feature.
This change adds support to
- Disable the command mdp burst mode
- Enable mdp idle ctrl
- Program the No. of dsi pclk cycles of idle time to
insert between command mode mdp packets. The idle time
must be long enough to cover the time link takes to
switch between HS to LP11 mode.
Change-Id: Ie718d334f05ce6c1ecd1a05b379bbbe18dec6330
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
During idle power collapse, dim layer dirty flags are
stored in sde_crtc_state which might be invalid if state
swap occurs. This change adds revalidate mask in sde_crtc
structure to revalidate after coming out of idle power
collapse.
Change-Id: Ie2f34a794896a3f8e729ef7d1f3ae35340123257
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This change avoids upstream drm issuing drm_atomic_commit in
drm_fb_release which is leading to artifacts on screen or
atomic_check failures due to atomically unstaging each fb
from plane_state and committing remaining planes on hardware.
a) This patch moves the state operations for setting crtc to
connector state to a helper api.
b) This patch clears any dim_layers present in the crtc_state
as part of null commit.
c) This patch removes any framebuffers attached to a drm_file
in msm_preclose whose refcount is not managed by composer kill
inadvertently and issues null flush to hardware in such cases.
d) This patch handles msm_preclose as part of msm_release
operation since legacy feature is not supported
for msm_driver.
Change-Id: Ib2068d74d4b23b73b7c84544858c9f6bb6adfa67
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>