Laurentiu Palcu [Fri, 12 Oct 2018 07:24:16 +0000 (10:24 +0300)]
MLK-19906: drm/imx/dcss: lower CTXLD trigger threshold
After PM_QoS was removed by this commit:
f889273 - MLK-19460-2: drm: imx: dcss: remove PM_QoS
interrupt latency increased. Hence, any video playback using tiled
compressed formats will be affected because DTRC uses CTXLD to switch
its register banks. If CTXLD is not armed, at the right time, the DB
trigger moment will be missed. This leads to DTRC not switch to the other
register bank and scaler will be starved, leading to a channel freeze.
This patch will lower the CTXLD trigger time to 90% of frame trace
allowing some more time between arming the context loader and DB trigger
time, in case the latency is too big.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 9 Oct 2018 05:50:42 +0000 (08:50 +0300)]
MLK-19845: drm/imx/dcss: fix suspend/resume issue
While running suspend/resume tests it may happen to go to suspend while
CTXLD still has entries to be commited. Currently, when this happens,
the scaler freezes.
This patch will fire up context loader just before going to suspend,
thus commiting everything to DCSS before cutting off the clocks.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 5 Oct 2018 13:06:35 +0000 (16:06 +0300)]
MLK-19673-2: drm/imx/dcss: protect against concurent commits
The current DCSS driver uses the generic drm_atomic_helper_commit().
But, this helper offers no protection against concurent commits by
userspace apps that may not wait for flip_done events.
This patch customizes the atomic_commit() callback by reusing the
drm_atomic_helper_commit() helper and adding a spinlock that will not
allow for another commit to go through if one is already pending.
Since we'll be calling the dcss_drm_atomic_commit_tail() ourselves,
there's no need for drm_mode_config_helper_funcs anymore. So, remove it.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 5 Oct 2018 12:35:54 +0000 (15:35 +0300)]
MLK-19673-1: drm/imx/core: add a workqueue and a commit object
This change adds a workqueue and a commit object that can be used by the
drivers to protect pending commits (non-blocking ones) from concurent
commits using legacy API (for example).
A non-blocking commit will defer the work to a workqueue and it may wait
for fences to be cleared. Waiting for fences to be cleared is
interruptible. Hence, if a SETPLANE IOCTL is performed (to disable a
plane), it may preempt the current commit and will mess up the atomic
states. When the legacy calls finish, the non-blocking commit worker
will resume, but the crtc and/or FBs of some planes are already NULL.
Hence, the non-blocking commit will crash in
drm_atomic_helper_commit_planes() with NULL pointer dereference.
This particular patch does not affect existing drivers in any way.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Ying Liu <victor.liu@nxp.com>
CC: Fancy Fang <chen.fang@nxp.com>
Oliver Brown [Wed, 3 Oct 2018 19:30:53 +0000 (14:30 -0500)]
MLK-19807 drm: imx: dp: Fix NULL pointer dereference if EDID read fails
Added a check to see if the EDID read fails before copying the EDID.
Added a check to see if buf parameter is NULL.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Wed, 26 Sep 2018 23:29:27 +0000 (18:29 -0500)]
MLK-19746-1 drm: imx: hdp: Add basic DPCD support for DisplayPort
Adding support to use the DRM helper for DPCD query
removed some warnings from checkpatch.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Wed, 26 Sep 2018 22:40:01 +0000 (17:40 -0500)]
MLK-19745 drm: imx: hdp: Add PHY clock shutdown/startup for DP mode change
The PHY specification recommends stopping/starting the PHY clocks during a
video mode change.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Sandor Yu [Thu, 27 Sep 2018 06:28:58 +0000 (14:28 +0800)]
MLK-18895: hdmi: Reset HDMI PHY when enable/disable HDCP function
Some HDMI Sink may failed to work when running HDCP enable/disable
stress test. HDMI sink may not support change HDCP state on the fly.
So reset HDMI PHY and controller to resolve the issue.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Tue, 18 Sep 2018 07:05:35 +0000 (10:05 +0300)]
MLK-19265: drm: imx: dcss: ignore invisible planes
Right now, an error is returned in the atomic_check callback if a plane
is not visible. However, this can lead to warnings when removing
framebuffers after connector is removed. That's because display's width
and height becomes 0 and, technically, the plane becomes invisible. Any
attempt to remove a plane will also perform an atomic_commit() on the
remaining, still active, planes. Since they are invisible, the following
warning will be shown:
[ 161.623590] atomic remove_fb failed with -22
[ 161.628099] ------------[ cut here ]------------
[ 161.632727] WARNING: CPU: 0 PID: 95 at /usr/src/kernel/drivers/gpu/drm/drm_framebuffer.c:924 drm_framebuffer_remove+0x3b8/0x3e0
[ 161.644200] Modules linked in: 8021q garp stp mrp qca6174(O) crc32_ce crct10dif_ce galcore(O) ipv6
[ 161.653175] CPU: 0 PID: 95 Comm: kworker/0:1 Tainted: G O 4.14.62-imx_4.14.y+gef7acf9 #1
[ 161.662391] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 161.667443] Workqueue: events drm_mode_rmfb_work_fn
[ 161.672319] task:
ffff8000b8973600 task.stack:
ffff000009ee0000
[ 161.678237] PC is at drm_framebuffer_remove+0x3b8/0x3e0
[ 161.683460] LR is at drm_framebuffer_remove+0x3b8/0x3e0
[ 161.688683] pc : [<
ffff00000867f5d0>] lr : [<
ffff00000867f5d0>] pstate:
40000145
[ 161.696075] sp :
ffff000009ee3d10
[ 161.699388] x29:
ffff000009ee3d10 x28:
0000000000000000
[ 161.704701] x27:
0000000000000000 x26:
ffff8000b8fda000
[ 161.710013] x25:
ffff0000080e8c60 x24:
ffff00001999bc90
[ 161.715324] x23:
00000000ffffffea x22:
ffff8000bdf63580
[ 161.720636] x21:
ffff8000b45d6280 x20:
ffff8000b5fd2800
[ 161.725947] x19:
ffff00001999bc90 x18:
0000000000000010
[ 161.731258] x17:
0000ffff9d121910 x16:
ffff000008231398
[ 161.736570] x15:
ffffffffffffffff x14:
ffff0000895c144f
[ 161.741881] x13:
ffff0000095c145d x12:
ffff000009429df8
[ 161.747193] x11:
ffff000008616e40 x10:
ffff000009ee3a20
[ 161.752504] x9 :
0000000000000006 x8 :
6961662062665f65
[ 161.757816] x7 :
766f6d6572206369 x6 :
00000000000002ba
[ 161.763127] x5 :
0000000000000000 x4 :
0000000000000000
[ 161.768438] x3 :
0000000000000000 x2 :
ffff8000bdf5fef0
[ 161.773749] x1 :
ffff8000b8973600 x0 :
0000000000000020
[ 161.779061] Call trace:
[ 161.781507] Exception stack(0xffff000009ee3bd0 to 0xffff000009ee3d10)
[ 161.787946] 3bc0:
0000000000000020 ffff8000b8973600
[ 161.795774] 3be0:
ffff8000bdf5fef0 0000000000000000 0000000000000000 0000000000000000
[ 161.803601] 3c00:
00000000000002ba 766f6d6572206369 6961662062665f65 0000000000000006
[ 161.811430] 3c20:
ffff000009ee3a20 ffff000008616e40 ffff000009429df8 ffff0000095c145d
[ 161.819258] 3c40:
ffff0000895c144f ffffffffffffffff ffff000008231398 0000ffff9d121910
[ 161.827086] 3c60:
0000000000000010 ffff00001999bc90 ffff8000b5fd2800 ffff8000b45d6280
[ 161.834914] 3c80:
ffff8000bdf63580 00000000ffffffea ffff00001999bc90 ffff0000080e8c60
[ 161.842743] 3ca0:
ffff8000b8fda000 0000000000000000 0000000000000000 ffff000009ee3d10
[ 161.850571] 3cc0:
ffff00000867f5d0 ffff000009ee3d10 ffff00000867f5d0 0000000040000145
[ 161.858399] 3ce0:
0000000000000000 ffff8000b8973600 ffffffffffffffff ffff00000867cfb4
[ 161.866226] 3d00:
ffff000009ee3d10 ffff00000867f5d0
[ 161.871103] [<
ffff00000867f5d0>] drm_framebuffer_remove+0x3b8/0x3e0
[ 161.877369] [<
ffff00000867f638>] drm_mode_rmfb_work_fn+0x40/0x58
[ 161.883375] [<
ffff0000080e8aec>] process_one_work+0x1d4/0x348
[ 161.889120] [<
ffff0000080e8ea4>] worker_thread+0x244/0x470
[ 161.894606] [<
ffff0000080eefac>] kthread+0x12c/0x130
[ 161.899571] [<
ffff000008084ed8>] ret_from_fork+0x10/0x18
[ 161.904880] ---[ end trace
489a96a125920066 ]---
To avoid this, we simply return 0 in the atomic_check() callback and do
not perform any update on the plane in the atomic_update().
Since the plane is invisible, it's perfectly fine.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Oliver Brown [Fri, 31 Aug 2018 15:24:10 +0000 (10:24 -0500)]
MLK-19420-3 drm: imx: dcss: Add video pll 2 support
Moving video pll2 control to the display driver to allow more flexibility
for setting rates.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Thu, 13 Sep 2018 21:27:27 +0000 (16:27 -0500)]
MLK-19577: dp: Correct vsync and hsync polarity
The hsync and vsync polarity is inverted for display port.
Removes test code that was forcing the vsync and hsync polarity
incorrectly.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Laurentiu Palcu [Fri, 14 Sep 2018 05:33:01 +0000 (08:33 +0300)]
MLK-18848-3: drm: imx: dcss: split vblank irq enable routine
Currently, when enabling/disabling vblank interrupt, we also
enable/disable the CTXLD kick interrupt. Most of the time this is fine,
because when vblank gets disabled user-space does not submit any buffers
and CTXLD kick interrupt is not needed.
There is one case when we actually need to be able to have the CTXLD
kick interrupt enabled: when disabling CRTC. Vblank interrupt, in this
case, is disabled before the crtc_atomic_disable routine is called.
However, we still need CTXLD to push the changes to SUBSAM and DTG.
This patch will create a routine just for enabling/disabling CTXLD kick
interrupt and move the code from vblank routine to the new one.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Oliver Brown [Thu, 13 Sep 2018 02:26:39 +0000 (21:26 -0500)]
MLK-19560: drm: imx: hdp: Display Port PHY reference needs to be enabled
The pixel_clock_set_rate function must be called before enabling the pixel clock.
This will enable the PHY reference clock for DisplayPort mode.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Laurentiu Palcu [Tue, 11 Sep 2018 12:21:43 +0000 (15:21 +0300)]
MLK-19470: drm: imx: dcss: enable CTXLD only if not already in use
Currently, it may happen to enable CTXLD if it's already in use. This
can lead to unpredictable behavior (green screen can be one).
This patch will check if CTXLD is already in use, before enabling it
again.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 7 Sep 2018 07:14:57 +0000 (10:14 +0300)]
MLK-19500: drm: imx: dcss: fix tracing function
kzalloc with GFP_KERNEL argument, may sleep. dcss_trace_write() is
called also from interrupt context and sleeping is not acceptable.
This patch will make kzalloc() call atomic.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 4 Sep 2018 10:57:10 +0000 (13:57 +0300)]
MLK-18848-2: drm: imx: dcss: swap vblank and ctxld_kick interrupts
During boot time, the interrupt latency can reach 20ms due to UART
holding the interrupts disabled. If, during this time, VBLANK (LINE_0)
and CTXLD_KICK (LINE_1) are triggered, the handlers will be called in
the order of the irq_steer lines (vblank handler first and ctxld_kick
second). This may lead to "vblank wait timed out" warning messages from
DRM core, because the 50ms wait time is exceeded. Especially when
display is lower than 30fps.
Swapping the interrupt lines will have the ctxld_kick interrupt handler
always be called first, kicking the context loader ON before VBLANK
notification is sent to userspace.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 31 Aug 2018 14:00:01 +0000 (17:00 +0300)]
MLK-18848-1: drm: imx: dcss: do not turn off DTG LINE0/1 interrupts
DTG registers are double bufferred. Hence, enabling LINE0/1 interrupts
in DTG in frame 0 will actually activate them in frame 1. Hence, the
LINE0/1 interrupts (vblank and ctxld kick) will be missed in frame 0.
This patch will permanently activate the LINE0/1 interrupts in DTG and
only mask/unmask them at irq_steer controller level (disable_irq/enable_irq).
While at it, do the same change for DPR completion interrupts. Since, these are
only used for tracing purposes, the change is not supposed to affect
driver functionality in any way.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 5 Sep 2018 13:20:10 +0000 (16:20 +0300)]
MLK-19460-2: drm: imx: dcss: remove PM_QoS
This patch removes PM_QoS request from DCSS driver. This will allow the
A-53 cores to go idle even when DCSS is used.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 5 Sep 2018 13:12:41 +0000 (16:12 +0300)]
MLK-19460-1: drm: imx: dcss: lower CTXLD trigger IRQ threshold
Currently, the CTXLD IRQ trigger interrupt is set to 98% of the total
vertical frame lines. This leaves little room for interrupt handling
since the DB trigger point is set to 99%.
This patch moves the CTXLD IRQ trigger to 95%. Hence, if PM_QoS is
disabled, and A-53 cores are allowed to go to idle (hence slightly
bigger interrupt servicing time), we have enough time to handle the
interrupt and arm the CTLXD, before DB trigger point.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Sandor Yu [Tue, 11 Sep 2018 08:11:12 +0000 (16:11 +0800)]
MLK-19542: HDP: Fix iMX8QM 4Kp60 failed work with HDR10 TV
HDP diver force output 10bit YUV420 for HDR10 TV.
But iMX8QM didn't support such function.
So add SOC version check only enable the function for iMX8MQ.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 10 Sep 2018 10:27:43 +0000 (18:27 +0800)]
MLK-19518-2: HDP API: continues running set mode function if ddc failed
Continues running set mode function to support
edid read failed case.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 10 Sep 2018 10:25:09 +0000 (18:25 +0800)]
MLK-19518-1: HDP: Set no_edid flag when edid read failed
Set no_edid flag when edid read failed.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 10 Sep 2018 07:40:57 +0000 (15:40 +0800)]
MLK-19496-3: HDP: max pixel clock support rate 297MHz for no edid case
Generally DDC function is not work with no edid.
Add max pixel clock support rate 297MHz for no edid case.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 10 Sep 2018 01:16:58 +0000 (09:16 +0800)]
MLK-19496-2: HDP: Enable 4Kp60 support for i.MX8QM
Pixel combiner function is ready in patch set for MLK-19413.
Remove variable is_4kp60 from driver.
4Kp60 are supported for all platforms.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 10 Sep 2018 01:13:30 +0000 (09:13 +0800)]
MLK-19496-1: HDP API: skip DDC write for iMX8QM A0 soc version
DDC function is not ready for iMX8QM A0 soc version.
Skip DDC write.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 7 Sep 2018 08:51:21 +0000 (16:51 +0800)]
MLK-19495: hdp: Add vendor infoframe
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>
Sandor Yu [Thu, 30 Aug 2018 06:55:37 +0000 (14:55 +0800)]
MLK-19399: HDP API: Merge CDN_1_0_38 API release
Merge CDN_1_0_38 release to HDP API.
v1_0_38 release notes:
DP: Added functionality for setting own PHY register values related to
voltage swing and pre-emphasis.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Fri, 7 Sep 2018 06:42:38 +0000 (09:42 +0300)]
MLK-19468: drm: imx: dcss: fix blkctl setting for B1 silicon
B1 silicon has a new ID and we need to handle it properly.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Liu Ying [Thu, 30 Aug 2018 08:21:39 +0000 (16:21 +0800)]
MLK-19413-30 drm/imx: hdp: Add dual mode support
This patch adds dual mode support in the i.MX HDP driver.
The single mode and dual mode can be switched dynamically
according to the input video mode(pixel clock rate and
active horizontal display width).
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Laurentiu Palcu [Fri, 31 Aug 2018 10:58:01 +0000 (13:58 +0300)]
MLK-19419: drm: imx: dcss: Add linear modifier support for all formats
Tiled formats are supported only for YUV420 semi-planar formats.
However, the other formats should support at least the LINEAR modifier.
Some userspace app may pass on framebuffers with the linear modifier
attached and, currently, this is rejected for YUV422 and RGB formats.
This patch fixes that.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Reported-by: Jared Hu <jared.hu@nxp.com>
Sandor Yu [Tue, 28 Aug 2018 07:40:03 +0000 (15:40 +0800)]
MLK-19227-5: hdp: Add mutex for register access function
Both CEC and HPD thread will access HDP register read/write
function, add mutex to support mulit-thread access.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit
7e62bd0ad4b5d3187a3d1c0f2258c1d4e3ba66a6)
Sandor Yu [Wed, 15 Aug 2018 09:57:45 +0000 (17:57 +0800)]
MLK-19227-4: HDMI: edid function is not supported by i.MX8QM A0 chip
EDID function is not supported by i.MX8QM A0 SOC chip.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit
6aeff3508919d584c6ce5661b14fadf3187298e7)
Sandor Yu [Wed, 15 Aug 2018 09:19:17 +0000 (17:19 +0800)]
MLK-19227-2: hdmi: Replace is_edid with no_edid
EDID function are default supported for all platform.
Remove is_edid variable.
Add no_edid for specific case.
such as EDID function is not supported
on iMX8QM ARM2 board with DP-HDMI converter.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit
69d015ba610040cc0397b0c1335ef0e941f99d98)
ivan.liu [Thu, 16 Aug 2018 06:54:34 +0000 (14:54 +0800)]
MA-12411 Enable in-fence function for DRM driver on IMX8 platform.
dcss_drm_atomic_commit and dpu_drm_atomic_commit will overide the in-fence.
Remove the common code from the driver to make in-fence can work.
And call pepare_fb() to do the same thing of set dma_buf fence.
The only difference is pepare_fb() won't set dma_buf fence if in-fence exists.
Change-Id: Idbaf3a765321e6d049aa9e39695a450eb0c760f0
Signed-off-by: ivan.liu <xiaowen.liu@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Shengjiu Wang [Wed, 29 Aug 2018 02:04:57 +0000 (10:04 +0800)]
MLK-19328-2: hdp: add channel map for hdmi audio
Add channel map for hdmi audio, originally it is in
audio info frame function, but removed by
commit
6b97462b6407 ("MLK-18690-3: hdp api: Remove
info frame API function")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Wed, 29 Aug 2018 01:57:23 +0000 (09:57 +0800)]
MLK-19328-1: hdp: fix no sound output in second time
Fixes commit
6b97462b6407 ("MLK-18690-3: hdp api: Remove
info frame API function")
The info frame API is removed, so the maximum of state->tmp
is 8.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Liu Ying [Tue, 24 Jul 2018 16:26:24 +0000 (00:26 +0800)]
MLK-18995 drm/imx: hdp: Set pixel link vld and sync ctrl in enc->enable/disable
The pixel link validation and sync ctrl enablement should be the last
step to enable the display pipeline which involves the HDP encoder.
So, let's move the pixel link operations from initialization stage to
enc->enable/disable. Also, the pixel_link_init/deinit hooks are replaced
with pixel_link_validate/invalidate and pixel_link_sync_ctrl_enable/disable,
since the display controller driver has already initialized the pixel link
at the driver probe stage.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit
cb234bc95e870a540e2f3a608f743a7e72a3e754)
Liu Ying [Fri, 20 Jul 2018 08:18:52 +0000 (16:18 +0800)]
MLK-18992-2 drm/imx: hdp: Don't set pixel link MST address
The pixel link MST address is set by the display controller driver,
so let's remove the redundant setting from the hdp driver.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit
f0f0a1970f2b34ad52fa9cfcb1a4de503fb231d6)
Laurentiu Palcu [Fri, 24 Aug 2018 08:17:19 +0000 (11:17 +0300)]
MLK-17795: drm: imx: hdp: Fix 10-bit to 8-bit color depth switch on iMX8MQ
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)
Oliver Brown [Wed, 22 Aug 2018 14:20:14 +0000 (09:20 -0500)]
MLK-19310: drm: imx: hdp: Add support for 4K50
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)
Laurentiu Palcu [Mon, 20 Aug 2018 08:27:29 +0000 (11:27 +0300)]
MLK-19274: drm: imx: dcss: add rotation functionality
This patch will allow userspace to rotate planes by setting the
'rotation' property. Generally, 0 and 180 rotations are allowed for
pretty much all 8-bit xRGB and 2-plane YUV420 formats. 90/270 rotations
can be performed only for non-compressed tiled GPU xRGB formats. Tiled
YUV420 formats do not allow rotations at all because these formats need
DTRC for de-tiling and DTRC has no rotation support.
For more info, consult the DPR Features chapter in the reference manual.
Test example:
modetest -M imx-drm -w 27:rotation:4 -w 32:rotation:33 -w 27:alpha:30 -s
42@31:3840x2160-60@XR24 -P 32@31:3840x2160@NV21
The above will perform:
* 180 degree rotation of primary plane (XR24);
* vertical flip of first overlay plane (rotate-0 | reflect-y);
* set primary plane alpha to 30;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Oliver Brown [Thu, 2 Aug 2018 15:02:18 +0000 (10:02 -0500)]
MLK-19120-1 imx: hdp: Add AVPLL support for DisplayPort on iMX8QM
Add AVPLL support for DisplayPort on iMX8QM.
The AVPLL will be the default pixel clock source for DisplayPort.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 14:18:59 +0000 (09:18 -0500)]
MLK-18904-8: imx: hdp: Adding support for i.MX8M (MCU2) DP PHY to Makefile
Adding API_AFE_mcu2_dp.o to the build.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:59:41 +0000 (08:59 -0500)]
MLK-18904-7: imx: hdp: Changing Reset function
Reset function parameters are changing to support i.MX8M (MCU2).
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:57:16 +0000 (08:57 -0500)]
MLK-18904-6: imx: hdp: Adding support for i.MX8M (MCU2) DP PHY to imx-hdp.c
Adding support for MCU2 DisplayPort to imx-hdp.c.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:55:00 +0000 (08:55 -0500)]
MLK-18904-5: imx: hdp: Adding support for i.MX8M (MCU2) DP PHY to imx-dp.c
Add support for MCU2 DisplayPort to imx-dp.c.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:20:03 +0000 (08:20 -0500)]
MLK-18904-4: imx: hdp: Adding support for i.MX8M (MCU2) DP PHY
Adding DisplayPort support for i.MX8M (MCU2) PHY
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:13:40 +0000 (08:13 -0500)]
MLK-18904-3: imx: hdp: Moving AFE_check_rate_supported, adding support for i.MX8M (MCU2) DP PHY
Moving AFE_check_rate_supported which is used by i.MX8QM and i.MX8M
Adding headers for i.MX8M DP PHY.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 13:07:28 +0000 (08:07 -0500)]
MLK-18904-2: imx: hdp: Moving common functions, making private functions static
Moving AFE_check_rate_supported to API_AFE.c (another commit).
Making private functions static to prevent conflicts with iMX8M (MCU2).
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Mon, 16 Jul 2018 12:58:25 +0000 (07:58 -0500)]
MLK-18904-1: hdp: Add memory region for iMX8M reset control
Add reset memory region to allow reset of the HDMI/DisplayPort PHY.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Laurentiu Palcu [Tue, 24 Jul 2018 13:32:41 +0000 (16:32 +0300)]
MLK-18809: drm: imx: dcss: revert the max upscale ratio to 1:8
The DCSS RM states that the maximum upscale ratio is 1:8. However, DCSS
HW team suggested some time back that upscale ratios of 1:16 could be
achieved with DCSS scaler, though these ratios were not validated.
Unfortunately there are corner cases, when the upscale ratio nears
1:16, that fail. At the recommendation of DCSS designers, we revert the
maximum ratio to 1:8 until further notice.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit
bafb5a9481c289951872923d4bbbbcf24a8910b5)
Laurentiu Palcu [Thu, 19 Jul 2018 11:07:14 +0000 (14:07 +0300)]
MLK-18826: drm: imx: dcss: fix hang when dumping registers
If DCSS is suspended, the clocks are disabled. Dumping the registers,
with the following command:
cat /sys/kernel/debug/imx-dcss/dump_registers
will hang the system, because of DTG.
This patch makes sure clocks are enabled before dumping the registers
and will immediately release them afterwards.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Thu, 19 Jul 2018 08:27:12 +0000 (11:27 +0300)]
MLK-18978: drm: imx: dcss: fix warning message
This patch fixes a warning message that's seen during 4.14 compilation.
CC drivers/gpu/drm/imx/dcss/dcss-plane.o
drivers/gpu/drm/imx/dcss/dcss-plane.c: In function ‘dcss_plane_atomic_set_base’:
drivers/gpu/drm/imx/dcss/dcss-plane.c:347:4: warning: ‘caddr’ may be used uninitialized in this function [-Wmaybe-uninitialized]
dcss_dec400d_addr_set(dcss_plane->dcss, p1_ba, caddr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The warning appeared because of a logic error in code that was
introduced by the following commit:
commit
a46e1cd7df28 ("MGS-3560 [#imx-913] Enable DRM compression for
mscale board")
The above commit moved a piece of code, that was located under
switch-case branch, under a do-while() loop and converted all the
returns to breaks. However, a break makes the code exit the while loop
and will continue executing the code under the case branch. Hence, caddr
may be used whithout being initialized.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Yong Gan <yong.gan@nxp.com>
Laurentiu Palcu [Thu, 19 Jul 2018 07:32:17 +0000 (10:32 +0300)]
MLK-18848: drm: imx: dcss: fix kernel oops
This patch fixes a NULL pointer dereference error that can happen
randomly, in certain conditions. The reason for the oops were assignments
that were done before checking that the actual pointer was valid...
Additionally, add a crtc check when duplicating the state.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Yong Gan [Tue, 3 Jul 2018 22:23:51 +0000 (06:23 +0800)]
MGS-3560 [#imx-913] Enable DRM compression for mscale board
Refine the code for compressed format support.
Date: June 29, 2018
Signed-off-by: Yong Gan <yong.gan@nxp.com>
Sandor Yu [Fri, 13 Jul 2018 07:16:25 +0000 (15:16 +0800)]
MLK-18726-3: drm edid: Add QD980 deivce to edid quirk list
Add QD980 to edid quirk list.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 13 Jul 2018 07:14:06 +0000 (15:14 +0800)]
MLK-18726-2: hdmi audio: HDMI 1.4 CTS 7-31 pass
CT bits in Audio info frame shall always be set to 0.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 2 Jul 2018 07:42:39 +0000 (15:42 +0800)]
MLK-18726-1: hdmi: Disable GCP when bpp is 24 to pass CTS 7-19
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>
Laurentiu Palcu [Thu, 12 Jul 2018 07:29:38 +0000 (10:29 +0300)]
MLK-18873: drm: imx: dcss: request PM QoS only when VBLANK is on
DCSS needs PM QoS in order to keep interrupt latency low. Otherwise,
page flipping will not work smooth enough because CTXLD will not be
triggered in time.
Currently, PM QoS is requested all the time but that does not allow the
CPUs to go idle. Hence, this leads to increased power consumption.
This patch will change how PM QoS is requested by doing it only when
VBLANK is enabled/disabled. The VBLANK interrupt is enabled just before
a commit takes place and disabled after one second after last commit.
This will allow DCSS to function properly and, also, allow CPUs to go
idle whenever there's no buffer submitted.
Exception to this is when DTRC is used (when DCSS is passed tiled
buffers). In this case, PM QoS will always be active, even if no buffer
is submitted, because DTRC banks need to be switched in CTXLD ISR, so
that DCSS does not underrun. DTRC does not have the REPEAT feature, as
the rest of DCSS does.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
ivan.liu [Tue, 20 Mar 2018 17:15:02 +0000 (01:15 +0800)]
MA-11589 drm: Implement HDR source metadata atomic set property.
set_property calls drm_atomic_helper_connector_set_property.
And it will call atomic_set_property which sets metadata.
Change-Id: Ia264cfb34f4744fe3622d2568cdc5f5cee090554
Signed-off-by: ivan.liu <xiaowen.liu@nxp.com>
Laurentiu Palcu [Mon, 2 Jul 2018 10:03:38 +0000 (13:03 +0300)]
MLK-18728: drm: imx: hdp: fix 4K@60 on mscale
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>
Sandor Yu [Tue, 26 Jun 2018 09:34:52 +0000 (17:34 +0800)]
MLK-18690-3: hdp api: Remove info frame API function
Remove info frame function from CDN API.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 26 Jun 2018 08:49:04 +0000 (16:49 +0800)]
MLK-18690-2: hdmi: Add audio info frame
Add audio info frame for hdp hdmi driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 26 Jun 2018 07:07:34 +0000 (15:07 +0800)]
MLK-18690-1: hdmi: Rewrite hdmi avi infoframe function
Remove Cadence AVI infoframe function.
Replace with hdmi avi infoframe api function.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Tue, 10 Jul 2018 10:11:40 +0000 (13:11 +0300)]
MLK-18809: drm: imx: dcss: fix cropping check for linear buffers
Currently, DCSS driver does not support cropping for linear buffers,
only tiled ones. Current checks return an error only if the submitted
buffer has no modifiers present. However, Weston uses modifiers even for
linear buffers and we need to check for that.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 10 Jul 2018 05:24:27 +0000 (08:24 +0300)]
MLK-18844: drm: imx: dcss: lower mode change time
Currently, there's a hardcoded wait time (500ms) after enabling DTG
clocks. This is supposed to avoid VBLANK timeout warning messages.
However, this time is quite big. This patch changes this by lowering this
time as much as possible, with the use of completion events. After
enabling CRTC we just block until the first VBLANK interrupt comes. This
way, we know for sure that we'll never get a VBLANK timeout.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 4 Jul 2018 13:37:08 +0000 (16:37 +0300)]
MLK-18767: drm: imx: dcss: fix vblank timed out warning
The following commit:
f9a03b3 - MLK-17925: drm: imx: dcss: fix tearing
introduced a regression because we does not send VBLANK event if context
loader was not flushed. But this condition is always met immediately
after enabling the CRTC. Hence, when 30FPS modes are selected, it is
possible to exceed the 50ms vblank timeout if the first event is not
sent. That's because 2 x 0.33ms > 50ms. This does not happen for 60fps
modes though.
This patch will force sending the first vblank event even if the context
loader is not completely flushed.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 18 Jun 2018 05:58:01 +0000 (08:58 +0300)]
MLK-18680-4: drm: imx: dcss: activate DPR completion interrupts
This patch activates DPR completion interrupts, just for tracing and
detecting green screen issues.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 25 Jun 2018 11:47:40 +0000 (14:47 +0300)]
MLK-18680-3: drm: imx: dcss: activate DTRC interrupts for debugging
DTRC interrupts will not be used for switching the banks, as the CTXLD
will be used for that, however these are useful for tracing and
debugging green screen issues when DTRC is used.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 25 Jun 2018 10:50:30 +0000 (13:50 +0300)]
MLK-18680-2: drm: imx: dcss: add some traces
This patch will add traces for the following events:
* CTXLD arm, completion and kick;
* VBLANKs;
* atomic flushes;
* plane updates (printing the DPR buffer base address);
These will allow us to measure and analyze where bottlenecks are:
application or driver.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 25 Jun 2018 10:43:05 +0000 (13:43 +0300)]
MLK-18680-1: drm: imx: dcss: low latency tracing mechanism
This patch adds a DCSS tracing mechanism that introduces as low latency
as possible, so that it does not affect timings. Instead of text, 64 bit
tags will be logged, together with the system time in nanoseconds. Based
on these, post-processing can be done on any PC to compute deltas,
delays, missed buffers, etc.
Example usage:
echo 1 > /sys/module/imx_dcss_core/parameters/tracing
gplay-1.0 movie.mpg
echo 0 > /sys/module/imx_dcss_core/parameters/tracing
To dump the trace:
cat /sys/kernel/debug/imx-dcss/dump_trace_log > trace.txt
With the help of a scripting language (awk), the trace can then be
post-processed and analyzed on the PC.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Sandor Yu [Fri, 15 Jun 2018 02:41:47 +0000 (10:41 +0800)]
MLK-18618-2: hdp: Recovery pre video mode after cable plugin
The patch can fix 4Kp60 video mode failed to work afer cable
plugout/in.
DRM driver will not call mode set function if video mode isn't changed.
But for 4Kp60, scrambling and TMDS_Bit_Clock_Ratio should
reconfiguration after cable plugin.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 15 Jun 2018 02:41:05 +0000 (10:41 +0800)]
MLK-18618-1: hdp: Add faile check for get_table_row
Add faile check for get_table_row.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Wed, 13 Jun 2018 07:40:39 +0000 (15:40 +0800)]
MLK-18558-05: hdp: Add pixel clock support range check
Add hdmi pixel clock support range check for imx8m.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Wed, 13 Jun 2018 06:29:15 +0000 (14:29 +0800)]
MLK-18558-04: hdp: Rename hdmi phy config function
Rename imx8qm hdmi phy config function,
add ss28fdsoi postfix.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 11 Jun 2018 06:59:54 +0000 (14:59 +0800)]
MLK-18558-03: hdp: Add hdmi phy config table for imx8m
Add hdmi phy config table for imx8m.
Rebase imx8m hdmi code to CDN_API_1_0_37.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 11 Jun 2018 07:56:48 +0000 (15:56 +0800)]
MLK-18558-02: hdp: move common function to hdp API library.
Move common functions to hdp API library.
Change coding style.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 11 Jun 2018 06:49:42 +0000 (14:49 +0800)]
MLK-18558-01: hdp: Add NXP copyright
Refine comments and coding style.
Add NXP copyright.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 11 Jun 2018 06:32:00 +0000 (14:32 +0800)]
MLK-18556: hdp: Add default video modes
Add default video modes if EDID read failed.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Mon, 4 Jun 2018 11:47:36 +0000 (14:47 +0300)]
MLK-17925: drm: imx: dcss: fix tearing
The video tearing appeared only when the application used 2 buffers.
That's because, sometimes, the context loader could be armed after the
DB event came in the frame trace. That made a buffer submitted in frame
N end up on screen in frame N+2 because the context loader waits for the
next DB event. Since vblank events are sent at the end of the frame, by
the time the buffer lands on screen, the application will reuse it while
it's being displayed, hence the tearing effect.
This patch moves the CTXLD trigger moment all the way to the end of the
frame trace, just before DB event arrives. This will leave the
application plenty of time to submit new buffers.
In the event that the trigger moment is missed (application submits a
buffer right at the end of a frame trace), then we're not signalling the
next VBLANK event to application. This way, application will know that
the buffer is still needed and will not submit a new one.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 13 Jun 2018 06:36:10 +0000 (09:36 +0300)]
MLK-18581: drm: imx: dcss: allow DRM_FORMAT_MOD_LINEAR modifier
Weston will use this modifier when playing linear formats so we need to
handle it correctly.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Shengjiu Wang [Mon, 11 Jun 2018 07:53:32 +0000 (15:53 +0800)]
MLK-18578: hdmi arc: fix noise issue with 96kHz/192kHz.
After enable the boost circuit of tx_ana_ctrl_reg_5, the noise
issue with ARC is gone.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
Shengjiu Wang [Wed, 23 May 2018 08:04:19 +0000 (16:04 +0800)]
MLK-18368-8: imx-hdmi: change the platform device id for hdmi audio tx
platform device id of TX is 1, RX is 2.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Shengjiu Wang [Tue, 22 May 2018 07:33:54 +0000 (15:33 +0800)]
MLK-18368-7: imx-hdmi: change the entry id of meta data
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>
Shengjiu Wang [Tue, 22 May 2018 07:31:07 +0000 (15:31 +0800)]
MLK-18368-3: hdp: add CDN_API_InfoframeRemovePacket function
add function to remove infoframe base on the packet type.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Sandor Yu [Fri, 18 May 2018 07:29:43 +0000 (15:29 +0800)]
MLK-18355-4: imx hdp: Get cec clk div from SW_CLK_H register
Remove get core clock rate code,
get cec clk div from HDMI SW_CLK_H register.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 18 May 2018 07:18:09 +0000 (15:18 +0800)]
MLK-18355-3: HDP API: Add new API function CDN_API_GetClock
Add new API function CDN_API_GetClock.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Thu, 17 May 2018 03:32:51 +0000 (11:32 +0800)]
MLK-18355-1: hdp-cec: Move imx8 hdp cec driver to mxc folder
Move iMX8 HDP CEC driver to MXC folder.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Thu, 12 Apr 2018 03:03:04 +0000 (11:03 +0800)]
MLK-18267-1: hdmi tx: Fix HDP driver error variable
Fix HDP driver configurate error variable.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Oliver Brown [Mon, 7 May 2018 18:30:57 +0000 (13:30 -0500)]
MLK-17893 drm: imx: hdp: Adjust HDMI Vswing
The HDMI voltage swing needs to be increased for HDMI compliance.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Laurentiu Palcu [Wed, 2 May 2018 10:33:37 +0000 (13:33 +0300)]
MLK-18163-3: drm: imx: hdp: properly check DC bit depth
Currently, the code checks if RGB supports 10-bit when it should
actually check that YUV420 supports 10-bit.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit
4064f377b0425fd7ec2c3ed15410ae7fad4077b5)
Laurentiu Palcu [Wed, 2 May 2018 10:29:20 +0000 (13:29 +0300)]
MLK-18163-2: drm: imx: dcss: Fix bit depth checking for YUV420
When YUV420 is used, we need to check that the deep color mode actually
supports the bit depth required. Currently, the code checks the RGB bit
depth.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit
5ac33861906cb7be660cc5c0a0f494194a81275a)
Laurentiu Palcu [Thu, 26 Apr 2018 13:43:07 +0000 (16:43 +0300)]
MLK-18164: drm: imx: dcss: fix max upscale ratio
Currently, the maximum upscale ratio is 1:7. However, DCSS can support
upscale ratios up to 1:16, even though the RM states the maximum upscale
ratio is 1:8.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit
361a057ceec0676be069b2150ee533b7ad11227a)
Laurentiu Palcu [Fri, 20 Apr 2018 11:19:56 +0000 (14:19 +0300)]
MLK-18104: drm: imx: dcss: Fix brightness on some HDMI 1.4 ports
Some HDR TVs have multiple HDMI ports but only one of them is HDMI 2.0
compliant, hence HDR capable. The rest are HDMI 1.4.
The HDMI 1.4 ports' supported colorimetry is only REC.709 and REC.601.
However, the supported EOTF in HDR metadata block can be BT.2084 which
should be matched with REC.2020.
This patch makes sure that BT2084 is used only if colorimetry supports
REC.2020. Otherwise, REC.709 will be used.
Additionally, change a message from info to debug. No need for it to
show up all the time.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 23 Apr 2018 13:06:41 +0000 (16:06 +0300)]
MLK-18115: drm: imx: dcss: fix usage of uninitialized variable
In certain conditions, i.e. YUV mode, pixel_depth variable will be used
uninitialized. This can lead to unpredictable behavior.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 23 Apr 2018 08:17:23 +0000 (11:17 +0300)]
MLK-18116: drm: imx: dcss: fix crtc enumeration problem
The following commit:
44b460cfe554 ("drm: imx: remove struct imx_drm_crtc and
imx_drm_crtc_helper_funcs")
removed some functions from imx-drm-core. As a consequence,
the CRTC ports were not detected properly.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Fancy Fang [Sun, 15 Apr 2018 05:14:34 +0000 (13:14 +0800)]
MLK-18045-3 drm/imx: dcss: bypass
dec400d if 'compressed' is false
When the fb's modifier is 'DRM_FORMAT_MOD_VIVANTE_SUPER_TILED_FC',
the compression state can be changed to non-compress according to
the 'compressed' field value of 'struct dma_metadata' data. At this
moment, the
DEC400D should be bypassed.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Mon, 9 Apr 2018 11:36:16 +0000 (19:36 +0800)]
MLK-18045-2 drm/imx: dcss: import tile status buffer from 'ts_dma_buf'
When the fb's gem_obj associated 'dma_buf' field is set with
valid value, the tile status buffer need to be imported with
the 'ts_dma_buf' which is passed from the 'dma_metadata' to
get the tile status buffer start physical address.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Tue, 17 Apr 2018 02:56:07 +0000 (10:56 +0800)]
MLK-18045-1 drm/imx: dcss: define 'struct dma_metadata' for
dec400d config
Define a new struct 'dma_metadata' to hold the config parameters
for
DEC400D. This struct data should be passed in from the fb's
first gem_obj's 'dma_buf' field.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Dzung Hoang [Wed, 11 Apr 2018 08:37:47 +0000 (11:37 +0300)]
MLK-18000: drm: imx: dcss: compute filter coeff based on scaling ratios
Currently, scaler filter coefficients are hardcoded. However, they need
to be re-computed, based on input/output resolution as well.
Also, in order to use the scaler 7-tap filter, DPR RTRAM rows need to be
changed accordingly.
Signed-off-by: Dzung Hoang <dzung.hoang@nxp.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>