Fix memory out of bounds access.
Change arry type for functopn avi info frame,
Align the arry type and its length.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 2fc41a88c9da514ae3f377e7cb73f4df886f038e)
The iMX8QM HDMI voltage swing needs to be increased for HDMI compliance.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit 5ba997eef35fc74653c29bb99dbe4d97292dc6e4)
The HDMI/DP firmware verison will now be displayed.
Moved firmware handling to common file for HDMI and DisplayPort.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
The HDMI sink may support different color depths for RGB and/or YUV
colorspaces. Currently, for mscale, 10-bit YUV420 is used only for
2160p@60. For the rest of modes 8-bit RGB is used.
This patch will add a mode_fixup() hook in the hdp_ops struct, allowing
each platform to perform a better handling of the various color depths
and colorspaces.
With the current patch, the RGB output will always be preferred to YUV
colorspaces, given the same color depth, since YUV colorspaces perform
UV subsampling, producing less quality. Also, whenever possible, better
color depth will be preferred (12-bit, 10-bit and, lastly, 8-bit).
The chosen colorspace and color depth will always be based on EDID's
Capability Map Data Block and YUV420 Video Data Block, as well as on
HDMI controller's known clock constraints.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
VIC code check is introduced in 4.14.y,
if a mode is found in HDMI 1.4b 4K modes.
HDMI driver should send its VIC in vendor infoframes.
Add vendor infoframe setting.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
When switching from a 10-bit to an 8-bit color depth, the PHY pixel engine
simply stops functioning correctly 90% of the time. This results in the
HDMI sink not detecting any signal.
This patch will reset the PHY pixel engine after the pipe clocks are ON,
in the bridge enable callback. This will make the pixel engine work
correctly when BPC changes. Resetting the pixel engine before all the pipe
clocks are on, produces no results.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit 72246ac9ccfa2074f4f575292af10d19a58c95c4)
4K@50 does not currently work. This patch will enable the scambler for
VIC96@50Hz.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit 0f13947a2fb72673b19c9f154eb202a9be916c4f)
Refer to HDMI 1.4 section 6.5.3, non-zero CD data GCP should send in
deep color mode.
Now, when HDMI work in 24bpp, it will send non-zero CD(0x4 for 24bit)
data GCP to protocol analyzer.
It means current HDMI source is working in “24bit deep color mode”.
But HDMI 1.4 CTS 7-19 required DUT should in “No Deep Color support”.
Protocol analyzer expect received zero CD GCP or no GCP.
Disable GCP when bpp is 24 to pass CTS 7-19.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
On mscale, 4K@60 uses YUV420. However, the following commit:
8eeed3553bd1: MLK-18690-1: hdmi: Rewrite hdmi avi infoframe function
moved to using the kernel built-in infoframe creation routine, instead
of Cadence's one, but skipped handling the various colorspace formats.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
For entry id of video is 0, audio is 1, if entry id of meta data is
1, then it conflict with audio.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Currently, the colorimetry was hardcoded to NONE. However, a sink may support
different types of colorimetry. This patch will allow for the colorimetry to be
set according to what the sink supports.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
Since DCSS was moved to use VIDEO2_PLL clock, HDMI phy clock is not used
anymore. Hence, this delay here is not necessary. It's been added inside
DCSS driver.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
If the HDR metadata proprety is set, then the metadata will be sent
to the sink at the next mode set.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Add api function return check to hdmi api call.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit cba6f4fc6f382731fabf938fb9e03db1c17b1666)
Conflicts:
drivers/gpu/drm/imx/hdp/imx-hdmi.c
-Add iMX8MQ HDMI function support in iMX8 HDMI DRM driver.
-EDID read function supported for iMX8MQ.
-Move iMX8QM clock management functions and pixel link
setting functions to iMX8QM SOC specific struct.
-replace printk with pr_info, dev_warn and dev_err.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Add hdmi/dp drm architecture driver.
HDMI and DP driver can work in imx8qm ARM2 board.
The driver support basic hotplug function.
Default working mode is 1080p60.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>