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>
Currently, HDMI driver has HPD (Hot Plug Detect) work to handle HPD
interrupts and power off work to handle the Tx power off. Power off
work waits for HPD work to finish if in progress. In case of suspend,
this can lead to a dead lock or power off work might starve for long
time HPD work may take some time to finish resulting in suspend or next
resume to timeout.
Power off work was added to unblock the user thread as it used to take
a long time waiting for audio engine to finish. That part of the code
has been moved to HPD work. Now power off can be synchronous with the
call as now it doesn't account for the delay. This removes the dependency
on other work.
Also, use a separate mutex for power on/off. The existing mutex is being
used in large number of places which are not related. During suspend/resume
use of mutex in places like sysfs read/write might result in longer hold of
the mutex resulting in power off delay which eventually may timeout the
suspend or resume.
Change-Id: Ie1e461f6cb7f90d440bfd203b935cd7dea069b5e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add dsi phy related supporting functions to configure
timing registers of both data and clock lanes of phy
interface.
Change-Id: I185c26ff2b9f11d9b30f4fee42bc730b69098f0f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Add N and CTS values needed for audio clock regeneration when using 594MHz
pixel clock. These values are recommended by HDMI 2.0 specification.
Change-Id: I3866492b1f767ef22ab91acc763589d692bc6aa7
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Add the support for atomic commet wfd use case, where
the output buffer is specific in the atomic commit
structure.
Change-Id: I261392df132d4321daccb05d6ba7f5d9ea622236
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
[cip@codeaurora.org: Moved new file locations,
updated sync.h/sw_sync.h include]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Store UBWC plane information in UBWC buffer format
instead of MDP buffer format. This cleans up logic
for input data check and simplifies the MDP plane
configuration.
Change-Id: I0a72238d0110fe88aec394f8f6248ba46fab92b7
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Commit call should move unassigned pipes to cleanup list before
calling kickoff because it supports "validate + commit"
functionality.
Change-Id: Ia4d690a451b2ba770f285918d46d9118fcaeacce
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
There are different programming interfaces in different hardware
revisions. This change abstracts the writeback block, so that
the client does not need to deal with the differences.
Change-Id: I3f49ee1f2e003655dbef0d3281d9c9ad95cdb327
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
Histogram LUT (PA LUTv) can be enabled by the 32/64 bit user-space
clients. 32 bit user-space client will take the compat ioctl path.
This change adds support for 32 bit clients for Hist LUT feature in
MDSS driver.
Change-Id: Ibbe3d37fdebba9aa46845660e62cf4d812af5866
Signed-off-by: Benet Clark <benetc@codeaurora.org>
In order to provide more reusable code, and prevent unnecessary
debugging removing union as memory saving is insignificant.
Change-Id: I5da68c64c0bf09157738fbec1feb6adde5af42a2
[veeras@codeaurora.org: Resolve merge conflict in msm_mdp_ext.h by
retaining the version in this file]
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Source surface post processing(sspp) pipes support post processing
features in thulium. If user-space client is 32 bit and kernel is 64
bit compat ioctl path will be taken. Change updates the driver in
compat path to support 32 bit clients for sspp features.
Change-Id: Iaa07f40520f115348ac3af4c9eeb5690ed78e2dd
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Handles messaging with a connected HDCP 2.2 capable receiver, in order to
send and receive HDCP 2.2 authentication messages. This includes sending
HDCP Tx messages to the receiver, polling the receiver for expected
messages, and monitoring the receiver status. The receiver authentication
status is used by the HDMI Tx driver to determine whether HDCP 2.2 content
can be sent to the connected receiver.
Change-Id: I12ae6427e8b61259989a670bf9856464a3109774
Signed-off-by: Alhad Purnapatre <alhadp@codeaurora.org>
[cip@codeaurora.org: Moved mdss_hdmi_hdcp2p2.c file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Atomic commit IOCTL adds validate and commit layer support
for framebuffer driver clients. Clients sends the validate
request with layer list for each display to put layers
in validate list. Once layers are validated; clients sends
the commit request for all validated layers. Validate
request may fail while commit must not fail because clients have
no fallback mechanism for commit failure.
If clients calls the atomic commit without validate request
then commit will validate all the layers before kickoff. In
such situation; commit may fail due to validate failure.
Change-Id: I9e9b27d1021292c8cafc624d40e7417a2028116a
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
[cip@codeaurora.org: Moved mdss_mdp_layer.c file location,
updated sync.h/sw_sync.h include]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
When using yuv420 as output pixel format, extpclk must run at half the
frequency since the bits per pixel of yuv420 is half of rgb888
Change-Id: I6c8271a42a3f259da20b268a0e67f34f5f23eb6e
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
EDID (Extended Display Identification Data) may contain some
resolutions in DTDs (Detailed Timing Descriptors) which are not
in the supported resolutions list. In such cases, every time
when the HDMI cable is connected, parse all the resolution data
from DTD and populate the resolution list with the newly found
resolution. This way any resolution found in DTD can be supported
subjected to hardware limitations.
Change-Id: Ib2223e34820a70da0b03b8ac39b170cf6b3e65b5
[veeras@codeaurora.org: Resolved merge conflict in msm_hdmi_modes.h
by retaining the version of this commit]
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The dirty flag for ARGC should be set after the parameters have been
cached correctly; however, the goto to avoid legacy code jumps over
the dirty flag assignment. Adding the dirty flag assignment back to
thulium architecture.
Change-Id: Ic64818d3844cb6a0e2ff3d3a1bf28c752f26da02
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Picture adjustment (PA) feature can be enabled by the 32/64
bit user-space clients. 32 bit user-space client will take the compat
ioctl path. Change adds support for 32 bit clients for PA feature in
DSPP.
Change-Id: Idbef740f10df0dd3e32003bfd441ff436ee072fa
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Gamut feature can be enabled by the 32/64 bit user-space clients.
32 bit user-space client will take the compat ioctl path.
Change adds support for 32 bit clients for gamut feature.
Change-Id: Iee9a7cbbaab23023df87a16aca0b05d65f56a2f4
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Polynomial color correction(PCC) feature can be enabled by the 32/64
bit user-space clients. 32 bit user-space client will take the compat
ioctl path. Change adds support for 32 bit clients for PCC feature.
Change-Id: Ibd0249423146b1ecd797454a8bfdd52208f44e06
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Gamma correction feature can be enabled by the 32/64 bit user-space
clients. 32 bit user-space client will take the compat ioctl path.
Change adds support for 32 bit clients for gamma correction feature.
Change-Id: I8c0899d3c57adfd0cfb3e50ab8bb138e2b75a343
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Provide complete resolution details in a sysfs node "res_info"
limited to PAGE_SIZE. Different modules can query for multiple
resolution details based on the resolution ids received from
EDID of the TV.
In case resolution details exceed PAGE_SIZE, reuse res_info to
get remaining timing details by provide page details.
Change-Id: I3e8e8d4de29f78d22273b3fb8ff6a059a8cb19e1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
HDMI has a large number of resolutions supported and currently
for all supported resolutions, related modules maintain static
tables which are populated at boot time. This results in huge
static memory usage. Also, it limits the system to support only
the define resolutions.
Remove static table which stores all the resolution details.
Get individual resolution details on need basis. Also, remove
the dependency to support only the defined resolution. HDMI driver
can support any non standard resolution within the allowed range.
Change-Id: I0972bc3a0ab96051ea642d685d10c4e5535b7051
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add support for enabling scrambler on hosts that support scrambling.
Scrambling is a new freature added in HDMI 2.0 specification to reduce
EMI interference at higher clock frequencies. Scrambling is enabled for
HDMI modes that have pixel clock greater than 340MHz. For lower pixel
clock frequencies, scrambling is enabled if sink supports scrambling at
lower frequencies.
Change-Id: I3aa224a32e768e2754a9e056a58ca90808a26ec6
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Post processing structures have been upgraded for thulium. Changes have
to be made on the compat ioctl path to ensure that 32 bit userspace
driver clients are able to configure the PP features when kernel is in
64 bit mode. This change updates the compat ioctl path for post
processing features.
Change-Id: Id3e1d4f2055638bc553082a1f477b5ef3ef41c80
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
From thulium chipset onwards post processing driver has moved to
new framework and config payload based interface. To maintain backward
compatibility existing members of the pp structures have been left
untouched. For IGC feature driver was checking legacy fields for
thulium chipset. This change fixes the issue of incorrect field check.
Change-Id: If27d702d9fa189192ad32e2d8b081dc9e99e577d
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
config payload in pgc(programmable gamma correction) was assigned
to wrong structure type. When driver client requests for reading
pgc lut(look up table) driver sanity checks fail due to incorrect
type assignment. This change fixes the pgc lut read failure.
Change-Id: Ie3dd5bb52f2eceae4ab86a8da723afbc9a29f042
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Histogram LUT (PA LUTV) is supported on source side VIG pipes in MDP.
Clients of MDP driver can enable the feature using overlay ioctl
interface. This change adds support for clients of the driver to
enable the feature.
Change-Id: I888af7d83b3de459353d7865122c40f39e937eac
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Histogram support is added back on source surface processing pipes
on thulium. This change adds the support for driver side support
to enable histogram on VIG pipes.
Change-Id: I7d480a22de3bbbc11ebcd85b7e725f0404077350
Signed-off-by: Ping Li <pingli@codeaurora.org>
Some of the PP(post processing) features in MDP might be upgraded when
new revision hardware is released. Clients of driver were relying on
MDP revision to decide which version of the PP feature is supported.
With MDP revision approach the client of driver needs to maintain a
mapping between MDP revision and PP feature version. This change
exposes ioctl to driver clients to query PP driver version of feature
instead of maintaining mapping.
Change-Id: I73f465400112445070c75f65f6ffd87c03eef2fb
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
MDP v(1.7) supports fixed SMP. mdss_mdp_smp_calc_num_blocks API
should not calculate any SMP blocks for this MDP version. Fix the
API call to avoid smp block calculation when fixed SMP is enabled.
Change-Id: I017ba2d2097471c98d6c4f9a0ec306309bcd7af6
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The histogram collection on SSPP side are not correctly
implemented, this patch help fix the existing issues with
histogram collection.
Change-Id: Ie7c9846b744371575ff7485d831ef05364dc5509
Signed-off-by: Ping Li <pingli@codeaurora.org>