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>
Laurentiu Palcu [Sun, 25 Mar 2018 13:41:52 +0000 (08:41 -0500)]
MLK-17703-10: drm: imx: dcss: remove unused variable warning
dcss_crtc variable was not used anymore and generated a compilation
warning. Remove it.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 22:36:33 +0000 (17:36 -0500)]
MLK-17703-9: drm: imx: dcss: align input and output pipe gamut and nonlinearity
For better results, output and input pipe gamut and nonlinearity should
match.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 22:34:55 +0000 (17:34 -0500)]
MLK-17703-8: drm: imx: dcss: default output pipe gamut to REC709
In case we don't get any information about colorimetry from HDMI sink,
set default gamut to REC709.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 13:25:05 +0000 (08:25 -0500)]
MLK-17703-7: drm: imx: dcss: configure output pipe according to what sink supports
Output pipe tables' configuration was hardcoded. This patch will allow the output
pipe to be configured according to what the sink supports.
Also, since there's no way to pass gamut and nonlinearity settings from userspace,
configure the input pipe as REC2020/REC2084.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 13:23:11 +0000 (08:23 -0500)]
MLK-17703-6: drm: imx: dcss: fix output colorimetry in crtc
The detection of the supported output colorimetry was wrong. This patch will
fix that and, also, get rid of the REC2100HLG EOTF setting for now. It produces
bad colors.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 12:48:13 +0000 (07:48 -0500)]
MLK-17703-5: drm: imx: dcss: ignore the 8 bit for input pipe
Since the input of HDR10 is always 10-bit, ignore 8-bit flags when
setting up the output pipe.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 23 Mar 2018 12:46:48 +0000 (07:46 -0500)]
MLK-17703-4: drm: imx: dcss: return the hdr10 table at once
Don't go through the rest of the list if we found our table. Just return it
immediately.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Thu, 22 Mar 2018 23:10:28 +0000 (18:10 -0500)]
MLK-17703-3: drm: imx: hdp: send the right colorimetry to the sink
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>
Laurentiu Palcu [Thu, 22 Mar 2018 22:08:10 +0000 (17:08 -0500)]
MLK-17703-2: drm: change HDR metadata infoframe structure
According to ANSI-CTA-861-G specification:
* EOTF is 8 bit, not 16;
* metadata type is 8 bit, not 16;
* There's no "Minimum Content Light Level"
This patch will change the HDR metadata structures to reflect that. Also, this
will fix problems seen on some TVs that were rejecting HDR metadata because
it's size was too big (more than 26 bytes).
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
Sandor Yu [Wed, 14 Mar 2018 02:45:10 +0000 (10:45 +0800)]
MLK-17796: hdp: Remove duplicate define variable cur_mode
variable cur_mode have define in struct of imx_hdp.video.
so remove it in stuct imx_hdp.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Fri, 9 Mar 2018 12:12:58 +0000 (14:12 +0200)]
MLK-17648-2: drm: imx: dcss: Load the HDR10 from header file
This commit allows one to select if a firmware file is used, for loading
the HDR10 tables, or a header. By default, this will be header file.
This is until a proper way of passing the file from bootloader is found.
Also, fix a minor bug which made parsing the tables over the actual data
limit.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Thu, 8 Mar 2018 09:47:05 +0000 (11:47 +0200)]
MLK-17647: drm: imx: dcss: fix the flip_done timed out problem
The commit:
44c45128 - MLK-17634-1: drm: imx: dcss: send vblank event from ISR
made some changes related to vblank handling. However, it looks like
they were not robust enough and, sometimes, the flip events are not
sent. This happens only when playing videos over Weston.
This patch, effectively, reverts those changes.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Sandor Yu [Thu, 8 Mar 2018 08:14:36 +0000 (16:14 +0800)]
MLK-17692-4: imx hdp: Add pixel clock return check
Return 0 if pixel clock isn't supported by hdmi phy.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 6 Mar 2018 09:17:35 +0000 (17:17 +0800)]
MLK-17692-3: imx hdp: Remove CDN vic table
Remove CDN vic table and replace with drm_display_mode.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 6 Mar 2018 09:01:18 +0000 (17:01 +0800)]
MLK-17692-1: fbdev: Remove imx8 hdmi fb driver
imx8 hdmi fb driver is not maintain.
imx8 hdmi function have implemented with DRM framework
in driver/gpu/drm/imx folder.
So remove hdmi fb driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Shengjiu Wang [Wed, 7 Mar 2018 10:27:48 +0000 (18:27 +0800)]
MLK-17569-2: hdp: add channel/speaker allocation for 4 channel
According to CEA-861-E section 6.6.2, add channel/speaker
allocation configuration for 4 channel.
0x0: FL, FR
0x3: FL, FR, LFE, FC
0x1F:FL, FR, LFE, FC, RL, RR, FLC, FRC
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Shengjiu Wang [Wed, 7 Mar 2018 10:23:23 +0000 (18:23 +0800)]
MLK-17569-1: hdp: fix channel swapping issue for hdmi audio
There is channel swapping issue for 4 channel and 8 channel audio.
After dump the register, found that SMPL2PKT_CNFG is not set
correctly, the reason is that F_NUM_OF_I2S_PORTS should be
F_NUM_OF_I2S_PORTS_S.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Laurentiu Palcu [Tue, 6 Mar 2018 11:56:55 +0000 (13:56 +0200)]
MLK-17645: drm: imx: dcss: fix DTRC start issue
The following commit:
af01350 - MLK-17634-18: drm: imx: dcss: optimize context loading and DDR
bus load
introduced a regression. During my attempts to fix various green screen
issues, I modified the DTRC start routine by enabling the other register
bank, not the current one.
Unfortunately, this was committed by mistake...
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 2 Mar 2018 08:56:15 +0000 (10:56 +0200)]
MLK-17655: drm: imx: hdp: send HDR metadata when property is set
HDR metadata infoframe was sent only when doing a mode set. However,
kmssink is using the same device as Weston and mode setting messes up
with Weston's plane state.
This patch allows for the HDR metadata to be sent out to the sink when
the property is set. Hence, no need for a mode set.
Also, the older functionality allowed only for 4K@60 to be used for HDR.
However, HDR is not about resolution. This patch will also allow to go
to HDR mode in other resolutions as well.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 6 Mar 2018 09:18:54 +0000 (11:18 +0200)]
MLK-17671-2: drm: imx: hdp: mscale: remove delay at the end of mode setting
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>
Laurentiu Palcu [Tue, 6 Mar 2018 09:08:49 +0000 (11:08 +0200)]
MLK-17671-1: drm: imx: dcss: add a delay after changing the pixel clock
DCSS needs some time to stabilize after switching to a new pixel clock.
All interrupts will delayed till the clock stabilizes and we'll end up
getting warnings about VBLANK interrupt taking more than 50ms to arrive.
This patch adds a 500ms delay after switching to a new clock. This will
allow DCSS to stabilize before enabling CRTC and DTG channels.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Robert Chiras [Tue, 6 Mar 2018 09:56:56 +0000 (11:56 +0200)]
MLK-17689-1: drm:imx: dcss: Fix DCSS clock selection for MIPI
Fix the clock source selection for MIPI use-case.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Shengjiu Wang [Thu, 1 Mar 2018 03:34:24 +0000 (11:34 +0800)]
MLK-17639-1: hdp: enable HDMI ARC with common API
Define __ARC_CONFIG__ to enable HDMI ARC
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Laurentiu Palcu [Thu, 1 Mar 2018 08:36:51 +0000 (10:36 +0200)]
MLK-17626: drm: imx: dcss: fix "ctxld error" messages
The problem arised because of a combination of 2 commits:
Commit 1:
"
2a70f32 - MLK-17232-2: drm: imx: dcss: ignore SB_PEND_DISP_ACTIVE
interrupt"
disabled the SB_PEND_DISP_ACTIVE interrupt because of a problem in SOC.
However, it did not remove the flag from CTXLD_IRQ_ERROR macro.
Commit 2:
"
f0e3911 - MLK-17459-1: drm: imx: dcss: change ctxld irq handling"
moved the bottom half interrupt handling to top half. By doing that, the
top half did not exit immediately if IRQ_COMPLETION condition was met
and continued evaluating if any interrupts in CTXLD_IRQ_ERROR flags
were triggered.
This patch removes SB_PEND_DISP_ACTIVE interrupt flag from
CTXLD_IRQ_ERROR macro.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 27 Feb 2018 11:11:19 +0000 (13:11 +0200)]
MLK-17634-19: drm: imx: dcss: set crtc output pipe to P010 only if sink suports YUV420
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 26 Feb 2018 14:16:19 +0000 (16:16 +0200)]
MLK-17634-18: drm: imx: dcss: optimize context loading and DDR bus load
This will lower the amount of ctxld entries sent, if configuration has
not changed much. Also, disable channel 0 if alpha is 0 and global alpha
is used. This will lower the DDR load, depending on graphics channel
resolution.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Thu, 22 Feb 2018 08:42:59 +0000 (10:42 +0200)]
MLK-17634-17: drm: imx: dcss: make P010 tiled formats work
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 20 Feb 2018 13:06:49 +0000 (15:06 +0200)]
MLK-17634-16: drm: imx: dcss: make 10-bit formats work with HDR
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 19 Feb 2018 14:01:14 +0000 (16:01 +0200)]
MLK-17634-15: drm: imx: dcss: handle P010 format
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 14 Feb 2018 12:06:41 +0000 (14:06 +0200)]
MLK-17634-14: drm: imx: dcss: Add basic HDR10 support
This patch adds basic HDR10 support. However, full support depends on
subsequent patches.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>