Updating qos remap updates requires reading registers to update values,
this adds additional CPU processing when in reality this update
is only needed once.
Bug: 142504774
Change-Id: Iec8d4dfd858b0602db7d2275b6b716dbcffe0d2f
(cherry picked from commit dbd1cfbc21db4b9bd4f1a4fc234cedc314fa1265)
Signed-off-by: Adrian Salido <salidoa@google.com>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This change introduces pre-downscaling values to the path where
these values are not provided by userspace. Currently, pre-downscaling
is only allowed by a factor of 2.2 in the x direction. With this
change pre-downscaling will support >2.2 up to 4 in the x direction.
Change-Id: I04d1b07243a5973e9338ea2a212280985b31b6a3
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Current computation of line time does not include compression ratio
from either DSC or VDC. This change stores source bpp and target bpp in
sde_crtc during sde encoder mode set to be used while calculating line
time.
Change-Id: Ib1e045dce17fcf006447d4562b402cc3f214ed8c
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Some of the features in the DPU hardware needs planes to be staged but
it should not be blended in the layer mixer. Change adds support for drm
driver client to set the blend type on the plane and updates driver code
to skip staging the plane.
Change-Id: I1e8c7f6ce5617820ea8b24419e0d4d27b481819b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Demura block of dpu will use the register dma path for programming.
Change updates the register dma frame-work to allow programming of the
demura block.
Change-Id: Ie5a64df1b2fffcb84d9554e5211249892ed2d96d
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Based on the hardware catalog if dpu supports demura, driver will
install the drm properties specific to the feature. Change added support
for creating demura properties and exposing via drm frame-work.
Change-Id: I58f5b12ca660d826e6e0b7e1f212bdf3c5e41905
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
This change addresses out of range and null checks in
sde driver.
Change-Id: I905d795edf6715aa990dd7bbaf061734e95ddea6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Add framebuffer destroy immediately following plane cleanup
during secure display transition. Set state's fb to NULL
after destroying to avoid attempting to destroy fb again
during plane state destroy. Previously, framebuffer destroy
is happening after the context is detached while plane states
are being destroyed.
Change-Id: I273ce5b85c30962ea7e0a738a366487c9c85d4df
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Add support to stage layer with zorder 0 as base
layer and stage borderfill only during null commit.
Change-Id: I54356c1b7834227cc3da00c211e71ac5816ce51a
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
In dual display continuous splash case, there are certain
scenarios where pipe being used in secondary display at boot up
is allocated by primary crtc. Add check to return failure
in such cases.
Change-Id: I9047b6e7f91e59a9daff5089abb41017c068b449
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Separate the horizontal and vertical max downscale checks
as pre-downscale introduced different limits on different
axes. Also cleanup the variable names for max downscale
limit when pre-downscale is not enabled.
Change-Id: If01aac1844d0bd5133502a50dbc38197e11da5d5
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
The original change avoids unnecessary reprogramming
of plane vbif registers, but still copies values into
a local struct before exiting based on boolean. This
can be taken care of by 01e1d4136cc1 ("drm/msm:
minimize qos remap updates") instead.
This reverts commit 0c7159de4f.
Change-Id: Idd9b066db9ebad092aa1a6dd2cf47050b0babd0c
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Support different safe, danger and creq qos lut
configuration based on display fps. It also removes
the fill level calculations from sspp and wb block
because mdss hw supports simple configuration.
Change-Id: I203e4300c9eab27d3632c890bedd6383cca0e5a8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Legacy HW that does not support pre-downscale capability will
incorrectly fail certain scaling checks. Fix those checks to
fully support HW without pre-downscaler.
Change-Id: I8f645bbff959e176c1d4d05a30a580113e320d4b
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
The pre-downscale capability is checked in multiple places
within sde_plane.c file. Add a helper function to check this
capability flag instead of manually checking this bit.
Change-Id: I21f818a9d81dd63e5eb3da248532904cfa55c838
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
During plane setup, when a master plane ID is provided it means we
are initializing a slave plane for HW shared by the given master ID.
When master plane ID is 0 it means this is the master. This change
refactors the code to make this clear.
Change-Id: Ia2e3430e6f9f7e105eaf26f121753b676110abe5
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
De-couple the horizontal and vertical pre-downscale checks since
this block can be used in cases where only X-axis downscaling
is needed.
Change-Id: I2e7d30863baed98e9f7fa0a328837691f0bc75a5
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This change enables display drivers code compilation
for lahaina target and current location of header files
is replacing the header files in usr/include/drm directory
before installing display specific header files. This change
ensures both the drm and msm_drv header files are exported
to user mode clients.
Change-Id: If6fc347598b902e670b7206dbcb82fe0740b3984
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Don't expose the prefill requirements for inline rotation.
These values are not used within the driver, so move these
settings to user-space.
Change-Id: Ie1038c5804047fafe0ee3129b993d83d4d31b386
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Add support for enabling pre-downscale block to increase the
maximum downscale capability for true inline rotation use cases.
Change-Id: Ifa544bb0ae69439abef4bd427134290090fe7230
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
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>
Previously when updating a plane's dirty features, if the
dirty all flag was set, the optimization was to break early.
This optimization left out color property updates for that plane.
This fix removes the mutex locks in the msm_prop function so
the break optimization is no longer needed. Function callers will
now need to acquire the lock and unlock the property lock when done.
Now the plane will iterate through all dirty properties.
Change-Id: I3114ac44d62ac0f0633897d757b6fd9a5b1f5d2e
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
During the validation of inline-rotator downscale ratio,
in the plane atomic_check phase, the client_type is
derived from the crtc->state. This leads to wrong
client_type as in check phase, it has to be derived
from the new crtc state. Fix it to derive from
new crtc, which would in turn be used to get the
correct inline-rotator downscale ratio.
Change-Id: I109fc6fd81182b1cda1c4feefbf421d3fab433c7
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Reduce event logs to verbose only because they do not need
to be logged every frame.
Change-Id: I753154dc4b13cfce1382615b02e8fc7e489a5993
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Cache vbif QoS parameters to avoid unnecessary reprogramming
of plane vbif registers. This will reduce frame time and
frame drop count.
Change-Id: I20ed97bbac54fa9b11a8784d7a4004f1ccc00632
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
CRTC client type is wrongly identified as RT_CLIENT
for WB as the API considers only RT and RT_RSC. Resolve
it by adding a new API to check for RT CTRC.
Change-Id: I1f216f60a18215426e594d0f8b09852af376799d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
SDE fence driver avoids duplicate fence creation if
fence timeline is not increased. This may lead to issue
if client closes the fence with failure ATOMIC_COMMIT.
SDE fence driver provides the closed fd node to subsequent
valid commit and leads to invalid state. This patch avoids
duplicate fence creation from crtc and connector object
instead of sde_fence.
Change-Id: Ic7b43762f0ad251fb20e42edb5f4d5f401790e14
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Currently the display driver does not consider the write back
client while deriving client type for QOS settings.
Add new API to consider the write back and other non
real time clients also for picking up the proper QOS settings.
This patch also fixes the QOS setting mismatch with QSEEDLITE
hardware.
Change-Id: I5db3d21921b8930bb6399ea355d3ce2b60e51430
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
In plane atomic_check function, the error code
from one of the checks is overwritten by the
return-value of subsequent check. This leads to
wrong return-value propagation resulting in
undefined behavior. Fix it to return the appropriate
error code on any failure.
Change-Id: I53b427d1b69c3ebfaa6709814bd9095676ff942d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add null check for plane state pointer before
dereferencing it.
Change-Id: Ic66efd11a70162ffe65c2137a5f19688314c45a5
Signed-off-by: Prashant Singh <prasin@codeaurora.org>
During idle power collapse use case, add VIG and DMA color processing
features to dirty list to make sure the color processing features are
reprogrammed after device resumes from idle power collapse.
Change-Id: Ia4f011827b6973f81ea96052068ba16a1a1c3326
Signed-off-by: Ping Li <pingli@codeaurora.org>
This change populates values for per_pipe_bw_high
from the device tree. This value is exposed to userspace
as the bandwidth per pipe available in the no VFE
scenario.
Change-Id: I61346ee55dfd4b6b0736ecf0b96e061f4f3934c3
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Fix possible out-of-bound access and NULL pointer
dereference in SDE and PLL driver.
Change-Id: Ic5c34b3b4c3e983413a0351c38206cf3f3ab3b1f
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.
Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.
Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>