Model and configure MDSS Display Port PLL for SDM660 target.
Add changes to define and register DP VCO, divider and mux clocks
as per common clock infrastructure.
Change-Id: Ice83e21323087e81e2f30998260be85120e41fa8
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Fix the HBR2 pattern generation by ensuring that the pattern
selection bit is not overwritten by a subsequent register write
that updates the scrambler reset count.
CRs-Fixed: 1108048
Change-Id: I2d2dcc79de82756eab015a343c24411a735947c9
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
For some use cases like running compliance test, it might
be necessary to disable hdcp. Add a sysfs node to allow
user to take action to enable/disable hdcp for such use
cases.
Change-Id: I8b9ae6d6d4e750be97fece172f635847ad2e05e4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
On receiving audio test request from sink, parse audio parameters
and send notifications to audio modules to start audio transmission.
CRs-Fixed: 1109812
Change-Id: Id17d82c5b9e1c4bf453f1f1421d2025b32aa410a
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Allow each display client to issue multiple requests for audio only,
video only or both to address different use cases for the display
clients.
CRs-Fixed: 1109812
Change-Id: I38518cebb37da0a48ffd817af9246a7c9682b494
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Fix the electrical compliance test sequence by bypassing
the link training whenever there is a request for a new
PHY test pattern. Link training triggers the sending of
training patterns which might differ from the requested
PHY test pattern. Furthermore, handle the state DP
transitions for power on/off since there is no userspace
interaction for the electrical compliance tests.
CRs-Fixed: 1108048
Change-Id: I9169b7645f7e039c8582993bf88976ff24eb6eca
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Sink reports the maximum link rate that it supports as part of the
DPCD information. When calculating the link clock rate, ensure that
the calculated rate is always capped at the maximum rate supported
by the sink.
CRs-Fixed: 1109812
Change-Id: I563f3406606128b1bba705e6db33aa8ede8dbb7d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
A sink uses the HPD IRQ signal to notify the source of for any
link maintenance, link tests and HDCP related messages. Current
implementation tears down the entire display pipeline when this
signal is received. This may not be necessary as it would be
needed to keep the DP interface enabled while any kind of link
maintenance is performed. Fix this and ensure that when handling
of the HPD IRQ is complete, re-establish the display pipeline.
CRs-Fixed: 1109812
Change-Id: Id93c3b147dd206e9718f49e2a053e3ee18162130
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Display Port (DP) controller has the ability to calculate CRC values
for every frame. In addition, most DP sinks also have the capability
to calculate per frame CRC values. Add support to enable/disable
calculation of per-frame CRC values for both the DP controller and
the DP sink. Add support to read the computed CRC values via a new
sysfs node. See below for usage instructions:
To enable/disable per frame CRC calculation:
* echo "ctl_cr_en=[0/1]" > /sys/class/graphics/<fbi>/frame_crc
* echo "sink_cr_en=[0/1]" > /sys/class/graphics/<fbi>/frame_crc
To read computed CRC values:
* cat /sys/class/graphics/<fbi>/frame_crc
CRs-Fixed: 1109812
Change-Id: I41271db64463b26cbbd9baba43d098bc30da33bf
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Add node named 'config' to let the user modules know
about the supported DisplayPort configurations. On
every cable connection, user modules can read this sysfs
node to configure accordingly. This sysfs node can also
be used to force a test pattern on the DP interface using
the following syntax:
echo "bpp=<bpp> pattern_type=<pattern>" > /sys/class/graphics/<fbi>/config
where
* bpp = [0/18/24/30]
* pattern_type = [0/1/2/3]
CRs-Fixed: 1109812
Change-Id: Ia2890e8c8e6214d4a1532f081d7c906484c99a03
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Add support for parsing parameters in the automated CTS mode when
the test type is set to TEST_VIDEO_PATTERN. The parameters parsed
are the color bit depth, colorimetry and the test pattern type.
Configure the source accordingly and transmit the requested
video pattern.
CRs-Fixed: 1109812
Change-Id: I552a50e86dc299b4cf7955992ad82dee19f35cbc
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Add a new API to override the EDID configuration. This will
allow clients to specify a particular resolution to be used
for subsequent connections.
CRs-Fixed: 1109812
Change-Id: Ie08ed509dd563bf265b32a2bfece86352b4e2b68
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Resolutions listed in the Detailed Timing Descriptor (DTD) have
detailed information about all the timings. Current implementation
attempts to match the parsed resolution with the resolution database
based on just the Video Information Code (VIC). This can potentially
overlook mismatches in certain parameters such as refresh rates and
can cause unintended results. Fix this by always adding the resolutions
parsed from the DTDs to the reserved timing list.
CRs-Fixed: 1109812
Change-Id: I8b926f08ce9b44c4a16a32fed26fedd351d77ae8
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Current implementation of the EDID parser always ensures that
VGA resolution (640x480) is added to the list of supported modes.
However, this should really be done by the client of the parser
based on their policies. This will avoid usecases where the EDID
parser would report the VGA resolution as supported even if it
was not listed in the sink's EDID.
CRs-Fixed: 1109812
Change-Id: Ic98314493029586d06a26a2c3a12b275ddaa8a8f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Populate the required parameters for 640x480p59.94 resolution and
add this to the resolution database.
CRs-Fixed: 1109812
Change-Id: Ic600d81e81d695288abd7638112e2541df5b1197
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Add support to program the vertical sync (VSYNC) and
horizontal sync (HSYNC) polarity based on the sink's EDID.
This enables transmission of these parameters as part of
the Main Stream Attributes.
CRs-Fixed: 1109812
Change-Id: I10a91dd778e51abc8da4d4a8280a57b927cce590
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Current implementation utilizes a simple event queue to handle
some of the tasks when setting up or tearing down a display port
session. This is currently achieved using a workqueue and assumes
that there can be at most one unhandled event outstanding. This
may not be valid and can result certain events being skipped.
Refactor this by handling the events in a new event thread.
CRs-Fixed: 1109812
Change-Id: I2041fd2bbeadbfc7726a6c504ec3e373f34d2aea
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
EDID parser assigns temporary Video Identification Codes (VIC) for
all non-standard resolutions when parsing a sink's EDID. These
VICs can be reused for a subsequent connection for different
resolutions. In the current implementation of the Display Port (DP)
driver, a resolution change is detected whenever a new VIC is used.
However, when switching between two non-standard resolutions spanning
connections to two different sinks, it is possible to have the same
VIC assigned for the two resolutions. This can result in abnormal
behavior. Fix this by resetting the video identification code and panel
information to reset value every time we get an HPD for disconnect.
CRs-Fixed: 1099532
Change-Id: I4bb5a6b4329f67368ebbdc7fe8d92c2ea4605082
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Fix the return value for hpd sysfs write function
to avoid wrong data to propagate to the caller.
Change-Id: Ic2282496598ecba8511f3a0a826e152451394edb
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Program the correct number of channels for header byte 3 in
audio stream to avoid issues related to audio channels.
Change-Id: I1de32403efc42d8fde8ac2096ae021e795707aae
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
During authentication, HDCP may poll hardware for status.
HDCP may be turned off by other thread abruptly depending
on the use-case. Do not poll hardware in case HDCP has been
turned off. Also, wait for authenticating thread to finish
in hdcp off thread to avoid any race condition.
Change-Id: If2e4940310035f08d2077def4fa62620bef19942
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Enable/disable encryption API can be called by multiple
threads. Protect this API with a mutex to avoid any
possible memory violation due to invalid calls to the API.
Change-Id: I190cdf24880645ac20ec17934d76498d71b2802a
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Transmit the link pattern first, update the drive settings
and then update the sink about the pattern and drive settings
using aux channel to avoid possible link training failures
with some sinks.
Change-Id: Ia8eccee99f58da94d3f1013f075c07400bde15f9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Interrupts from sinks (cp_irq) may come asynchronously at different
states for HDCP authentications. In case HDCP has failed and an
interrupt is received from sink, do not process it to avoid getting
unnecessary failures.
Change-Id: I00b0d45fdbdc3d43ac49908db66573d6d4b58283
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
PMI GPIO1 is used to enable and disable WLED for msm8998 QVR,
we should also invert the gpio level according to HW design.
CRs-Fixed: 1101647
Change-Id: If29e41d12a697d7fd6671f1134a1e798c80c3523
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
If read function is waiting for interrupt and after that
NFCC goes to recovery, MW will call ioctl (0) and ioctl (1),
In ioctl (0) call we are disabling interrupt so read function
was waiting for interrupt and ioctl call has disabled interrupt,
now there is no possibility interrupt will be enabled again
because only read function enables the interrupt.
Enabled interrupt in ioctl (1) so that we can receive data
after reset/recovery.
Change-Id: I1677a50129534b1eaa4b8c20820a15db299cd9c1
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Some platforms don't configure qcom,secondary-pon-reset like 8998.
So set boot_reason when "qcom,system-reset" node exists to avoid
setting a wrong value to boot_reason.
CRs-Fixed: 1102732
Change-Id: I9e9ff2f2d0ffac6baa5d0663664001eb30638e87
Signed-off-by: Mao Jinlong <c_jmao@codeaurora.org>
Add IPA stats support on AP+STA mode for V2 driver
when CNE queries. Also add metering funtionality
on WIFI interface to stop the data transfer
when quota reached on WIFI-case.
Change-Id: I51a771423e6a35ea0453b978be484d0464bddf14
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
nt36850 wqhd command panel will be used for sdm660 QRD,
so enable it for sdm660 QRD.
CRs-Fixed: 1107352
Change-Id: Ia7a691949bfef8777f78e846b6fb92e01658441f
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
Add TLB dump entries to setup memory space for the cpuss dump
driver to dump TLB entries.
Change-Id: I7514969c1540d18d2102088b43d959adec68152f
Signed-off-by: Runmin Wang <runminw@codeaurora.org>