As per current implementation, every successful OVERLAY_SET IOCTL should
return destination format for that request. Now there is a driver based
optimization where if back to back OVERLAY_SET IOCTLs request same
configurations then driver avoids extra register writes. However this
optimization doesn't return correct destination format which violates the
IOCTL spec and may result in inefficiencies. Fix this by returning correct
destination format for this optimization.
Change-Id: I792e2f44f17bceb1efc7b1d389db84478581c474
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Current rotator driver allows more sessions than actual number of rotator
hardware. This requires virtualization when number of active sessions are
greater than number of rotators. In the current implementation,
synchronization bug is getting exposed if one rotator has two or more
sessions, all these sessions are actively using shared rotator in
interleave fashion and one of the session is using optimized path where
back to back configuration is same. This leads to unexpected results and
device hang. Fix this by maintaining proper ownership and hand-off when
one session is finished using given rotator and other one picks up.
Change-Id: I1f2e7376a01f248d11253bf5b6153ab236f07b19
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Separate the per pipe mdp clock calculation from
the bandwidth calculation within the function
that computes the pipe performance.
Change-Id: I40cb9c786bf32523cbc5982a494e439f586cc43f
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Prior to parsing mdp ctl info we need to parse wfd mode.
When wfd mode is shared we create a virtual ctl within
mdss_mdp_ctl_addr_setup. The default value for wfd is shared;
So we are always creating virtual ctl. If wfd is in fact
not shared the value was updated afterwards and the virtual
ctl never is used.
Change-Id: Ie24f224c9ea9bed1704e8688e97bf61c022ae9fa
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Starting in MDPv1.7, configuration of the panic signal
is per pipe. This needs some specific luts to be
programmed on each pipe. Adding support to configure
these luts, which are enabled and tuned through
device tree.
Change-Id: I8af08e8458f8136e9767ccfea27489ce2976a437
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
QFPROM offsets have changed on targets with
new HDMI core. Check for the version and
update the offsets respectively.
Change-Id: Ie017571c9291a060c5911b4ba3bc5399d2317c01
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
This change adds support to set the qos lut
for each real time and non real time rotator
read clients.
Qos lut is configurable through dtsi, so it
can be adjusted per chipset.
Change-Id: I423265032c4a618039cdcfdad0a1f963f45ae5c6
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Get the panel backlight info from the correct bl_mfd.
Change-Id: Icc4568eb4ae9f4091f7ccf5f60e97bfd7f745420
Signed-off-by: Ping Li <pingli@codeaurora.org>
Previously, any backlight change to panel will trigger assertive
display (AD) feature to conduct screen refresh calls. This will
trigger unnecessary screen refresh if AD is enabled together with
CABL feature. This change modifies the backlight notification
mechanism to notify AD only when the Android brightness level
is changed.
Change-Id: I5647269b9651d3a17d896e4047f01b7a244581a4
Signed-off-by: Ping Li <pingli@codeaurora.org>
When the VIG source side pipes are reconfigured from YUV to RGB data,
the sharpening/smoothing QSEED block is sometimes still enabled, but
it is only allowed for YUV data. This change adds a specific check if
the source format is YUV before proceeding with sharpening/smoothing
enable.
Change-Id: I5ba39f6910bb41eaed898726c9c1419699371784
Signed-off-by: Benet Clark <benetc@codeaurora.org>
During the pipe setup function, we copy any PP related parameters from
userspace to the pipe cache. We currently do not clear the cache
beforehand. In cases where the pipe is being reconfigured, stale, invalid
values might still be present in the cache since the last time the pipe
was configured. These values need to be cleared before accepting a new
config.
Change-Id: I0d9a51052bb738f599f386d39cb9de5509aae7ac
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Writeback uses rotation smmu on thulium target for buffer
mapping. Selecting wrong context bank is leading to
writeback failure on this target. This change fixes the
context bank selection for writeback use cases.
Change-Id: I23369bb43cc3fd05457fb003ee58bba21eeaa192
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Initialize the return value before using or returning to user space
to avoid returning uninitialised values to user space.
Change-Id: Iac43744830d725cf69120603befc3e4dd758d031
Signed-off-by: Ping Li <pingli@codeaurora.org>
When there is no data available for pixel extensions from user end,
calculate software pixel extensions with zero initial phase.
Change-Id: I8876b27e4265b39374d5520684028aaaf005d7e8
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
mmagic ahb clock vote is handled through bus driver
on thulium target. Any module which uses AHB clock
has to add its vote on mmagic ahb clock. This
change adds this vote for MDP, DSI, SMMU and
HDMI modules.
Change-Id: Ibd8d7e7396f26dc13a0b7700c01c3d3dba839ae4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Invalid input/output format error checks in rotator module
is causing rotation request failure or wrong error message
print. This change fixes such invalid checks in rotator
module.
Change-Id: I0f5f19b65c6017dd16deaa09715d29335e551b01
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
MDP, DSI, HDMI and PLL modules turn on mdp gdsc independently.
It is illegal to turn on mdp gdsc without turning on mmagic
gdsc on thulium target. This change adds mmagic vote
for these modules.
Change-Id: I765fcc42477b9e46d0da48cb0cf5b298f58b7815
[veeras@codeaurora.org: As part of 3.18 upgrade,
remove msmthulium-mdss-pll.dtsi, msmthulium-mdss.dtsi changes
from this gerit]
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Fix NV12 UBWC buffer support by setting YUV format
bit in format register and correct plane address.
Change-Id: I013e0855ae6c2f990d0d5d6386b9949f475c0ad1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This reverts commit 37eb5c3f566e8fe554815b45e58b1992730f3e38.
Storing UBWC planes in UBWC buffer format configures the
wrong stride for meta planes and bitstream planes. It also
tries to set the buffer address on each data_check call. This
sets invalid Y bitstream address.
Change-Id: I8e91f25a22ed9db278d7a334c4732d709566a32a
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
CEA-861-F specification defines new video formats which are supported in
the hdmi 2.0 specification.
Change-Id: I5bf017835ea7c5e472e91c0d663f6f0083a87854
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
During split display case, the 2nd dsi ctrl's phy/pll registers are
programmed at same time as 1st ctrl programmed since both controller
share pll0. Therefore they have to be reset at same time also.
Change-Id: Ifb2007c4efd619cd5f08a0fc64fd66f22d62efcd
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
DTD (Detailed Timing Descriptor) provides full resolution timing
details. Currently we compare these details with our resolution
data base to find a match. This is not needed as DTD has complete
details. Once parsing of resolution is done, just add this as a
new resolution.
Change-Id: I0d6c101c96a6bc8c0ff8fe63c17bf233d52dad7f
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Do not set invalid or unknown resolution received through
continuous splash screen, set the default resolution instead.
Change-Id: I61358edaf3039d99acd77f4ae0edf3c9e24721f5
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Current frame-buffer driver gets shutdown call back and it turns the
display off. Once shutdown call-back is received, any subsequent
frame-buffer opens are rejected and an error log is generated. Now
user-land display clients are not aware of shutdown and they keep
opening the frame-buffer devices repeatedly ignoring the failures and
notifications sent by the driver. Due to this, excessive logging is
observed which in turn leads to watch-dog bite and a crash. Prevent
this by generating error log only once and keep sending sysfs
notification for every rejected frame-buffer open.
Change-Id: I9df6cb708a2d6c986a31324540a3d040dffbcdfc
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Using fb mmap, we can get a buffer from ion handle,
or from a fixed adress physical continuous memory.
Earlier if mmap is called more than once then ion
handle won't be NULL and fb would allocate using
physical continuous memory. Fix this to ensure the
type of fb allocation is correct by storing fb map
type.
Conflicts:
drivers/video/msm/mdss/mdss_fb.h
Change-Id: I2b47b08b7fcb06f8220fcfe8852f5c2e37ade628
Signed-off-by: Mao Flynn <Flynn@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
The dma pipe selection is done by client. Earlier,
the driver was trying to allocate a free dma pipe and check
if the allocated pipe matching with the selection. Instead,
it is now assigning the pipe directly.
Change-Id: Ie3f239a02b0da1e598efe755329c1e5d9746166f
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
MDSS module needs turn on mmagic AXI clock on thulium target
when it tries to fetch data or write data to output buffers.
This change adds that support.
Change-Id: I3e84046274d377c30028608217247bdfb32bc341
[veeras@codeaurora.org: As part of 3.18 upgrade,
remove msmthulium-mdss.dtsi changes from this commit]
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
SMMUv2 clients needs to enable the mmagic gdsc before
creating mapping or attaching context bank. It can disable
the GDSC when context banks are detached. Display module
enables mmagic gdsc before creating secure & unsecure
context bank mapping for MDP and rotation clients during
probe. This GDSC is also turned on and off when clients
tries to attach context banks and detach respectively.
Change-Id: Iee3c93d440388693d83cc57ca001408d95c9654b
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
User-land program can configure idle_time as zero when they want to
disable idle_time notifications. In the current implementation, driver
does not modify current idle timer if idle_time is zero but it may still
send the notification if the previous timer expires. Prevent this
notification if idle_time is set as zero.
Change-Id: Ib35b71a1f6c7f13f3efc28cf48a8c6bd6aaa0fa2
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Reset HDCP engine during HDCP reauthentication. This will
prevent HDCP engine from going into a bad state of
continuous authentication failures.
Change-Id: I727857c23673c55d77144d63fc4de2c89d6ec5a6
Signed-off-by: Casey Piper <cpiper@codeaurora.org>
Width and height are not properly calculated when decimation
is involved. When there is scaling on a pipe, the required number
of pixels are wrongly programmed resulting in pipe hangs and
leading to TLB SYNC issues. This change handles proper
calculation of decimated width and height.
Change-Id: Iadc4b201b32dda3dba6afe23070f349677be417c
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
These delays are corresponding to the h/w documentation update.
Change-Id: I8d782e470960e6b8eb4f7428aedf4702544890d3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This error indicates that the new refresh rate was not dynamically
changed. The error has to be handled.
Change-Id: I0e1f0490d2207d7214cfd67dcb80a0db383e496e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Make sure the LAB/IBB regulators are available
before start using them. In addition, fix the
regulator_disable error return path.
CRs-Fixed: 778471
Change-Id: I0a8c3b1f7f13c2699ad58b9c8302c992d076b89d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
The frame done notification is required even for kickoff without
output buffer. This happens for pan-display path, where a kickoff
can be triggered without output buffer queueing first. By notifying
the frame done event, it allows the client to release retire fence
properly.
Change-Id: Ia29acf58819641e84a58061f9c06ee74cf1bec06
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Starting new atomic commit IOCTL implementation, driver expects user-land
to send each input layers's destination x in full panel co-ordinate system
unlike previously this was required only when source-split feature was
enabled. As an example, in dual-dsi configuration where each panel is of
1280 width then any layer going to only right panel needs to have their
dst_x at-least 1280. Now internally driver manipulates this if source-split
is enabled or not. However current implementation sends back this modified
dst_x backs to user-land which in turn comes to driver in subsequent IOCTL
calls and leads to unexpected behaviour. Fix this by sending original dst_x
back to user-land program.
Change-Id: I962cfa15e4dc7e905e42330f808edb31d33ffdf2
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Set iommu domain attributes for mdp and rot clients
after domain is attached. This will disable the "coherent
table walk" feature based on SMMUv2 recommendation.
Change-Id: I43af775dcd5bf242c90da4d70e2ad917a11f022f
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
The rotator buffer validation was in the kernel work
queue thread. If the validation fails, there is no way
to notify this failure. This change moves the validation
in the user thread, which allows user to handle the failure
more gracefully.
Change-Id: I21a18de7d96e705fc36339658a27299e9fc607b6
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
This is to expose rotator device capabilities (number of
write-back blocks, downscale support) through sysfs node.
Change-Id: I6b62c7293f6e69ee5945fed0b9275d07a477cfba
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Read HW revision before configuring the PHY when
continuous splash is not enabled and fix the thulium
target phy configuration.
Change-Id: Iadaef93b6d31adee4c54f0b75f7343bd01223dfe
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Num of bus path configuraiton represents the RT and
NRT paths. Fix the realtime paths calculation.
Change-Id: I5b3657d51e60bcfeb51cbbc220e121a2a4dc4d84
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
During validate, prevent asymmetrical downscale factor work
from being accepted.
Change-Id: Idc2989cbd5ced5cdb93e74e22446d3519f4c0813
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Client may use null commit to clean-up h/w resources. This is
to enable null commit for wifi display atomic commit use case.
Change-Id: Id1048049c0b747833a2b871bd9becf1ff04e44c1
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Earlier, rotation operation was handled as part of overlay API.
This creates a dedicated rotation device driver, which makes
rotation operation separate from frame buffer device.
Change-Id: I1cf99be03606fd43f97db386a6a55c01f1a058d4
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
[cip@codeaurora.org: Moved new file locations,
updated sync.h/sw_sync.h includes]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
The HDCP 2.2 feature was being initialized only if QFPROM keys are present.
This is not required for HDCP 2.2, only for 1.4. Instead, added gating for
initialization of HDCP 2.2 feature by the version of HDMI Tx controller.
HDMI Tx controller version 4.0.0 and above supports HDCP 2.2 auth.
Change-Id: I7f2fae06ed09f3fde638faa416c926a038edbd76
Signed-off-by: Alhad Purnapatre <alhadp@codeaurora.org>
Too much downscaling or upscaling results in bandwidth issues
due to hardware limitation. Fix return error code for such cases.
Change-Id: I4bf405bc278ebd6fdadb2f81faa68b7fec67e517
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>