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>
Laurentiu Palcu [Mon, 12 Feb 2018 11:01:54 +0000 (13:01 +0200)]
MLK-17634-13: drm: imx: dcss: remove the dcss-tables header
The tables header is no longer necessary as dcss.fw file will be used
from now on to store LUT and CSC tables.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 12 Feb 2018 08:23:48 +0000 (10:23 +0200)]
MLK-17634-12: drm: imx: hdp: Send HDR metadata to the sink
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>
Laurentiu Palcu [Wed, 7 Feb 2018 14:51:34 +0000 (16:51 +0200)]
MLK-17634-11: drm: imx: dcss: make DCSS use VIDEO2_PLL2 clock
This clock is needed by HDR10 so this patch makes DCSS use VIDEO2_PLL2
for the rest of the resolutions as well.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 22 Jan 2018 07:50:23 +0000 (09:50 +0200)]
MLK-17634-8: drm: imx: dcss: read HDR10 LUTs/CSCs from FW file
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Sat, 27 Jan 2018 14:05:25 +0000 (16:05 +0200)]
MLK-17634-7: drm: imx: dcss: remove unused dcss_hdr10_priv structure member
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 19 Jan 2018 13:15:58 +0000 (15:15 +0200)]
MLK-17634-6: drm: imx: dcss: add P010 drm format
This is 10-bit per channel YUV420 semi-planar.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 19 Jan 2018 13:04:37 +0000 (15:04 +0200)]
MLK-17634-5: drm: imx: dcss: overlay planes support HDR
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Thu, 25 Jan 2018 09:27:46 +0000 (11:27 +0200)]
MLK-17634-4: drm: move hdr_panel_metadata to drm_hdmi_info
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 12 Feb 2018 08:09:57 +0000 (10:09 +0200)]
MLK-17634-3: drm: edid: fix hdr infoframe creation routine
The frame->type was overwritten, instead of setting the frame->metadata_type
field.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 9 Feb 2018 08:07:35 +0000 (10:07 +0200)]
MLK-17634-2: drm: edid: add support for HLG EOTF
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Uma Shankar [Fri, 19 Jan 2018 12:42:00 +0000 (14:42 +0200)]
drm: Enable HDR infoframe support
Enable Dynamic Range and Mastering Infoframe for HDR
content, which is defined in CEA 861.3 spec.
The metadata will be computed based on blending
policy in userspace compositors and passed as a connector
property blob to driver. The same will be sent as infoframe
to panel which support HDR.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Mon, 22 Jan 2018 08:06:43 +0000 (10:06 +0200)]
drm: Parse Colorimetry data block from EDID
EA 861.3 spec adds colorimetry data block for HDMI.
Parsing the block to get the colorimetry data from
panel.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Wed, 31 May 2017 10:10:55 +0000 (15:40 +0530)]
drm: Implement HDR source metadata set and get property handling
HDR source metadata set and get property implemented in this
patch. The blob data is received from userspace and saved in
connector state, the same is returned as blob in get property
call to userspace.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Wed, 31 May 2017 10:10:54 +0000 (15:40 +0530)]
drm: Add HDR capabilty field to plane structure
Hardware may have HDR capability on certain plane
engines. Enabling the same in drm plane structure
so that this can be communicated to user space.
Each drm driver should set this flag to true for planes
which support HDR.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Fri, 19 Jan 2018 10:54:25 +0000 (12:54 +0200)]
drm: Parse HDR metadata info from EDID
HDR metadata block is introduced in CEA-861.3 spec.
Parsing the same to get the panel's HDR metadata.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Wed, 31 May 2017 10:10:50 +0000 (15:40 +0530)]
drm: Add CEA extended tag blocks and HDR bitfield macros
Add bit field and macro for extended tag in CEA block. Also,
declare macros for HDR metadata block.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Uma Shankar [Wed, 31 May 2017 10:10:49 +0000 (15:40 +0530)]
drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Laurentiu Palcu [Fri, 19 Jan 2018 07:02:23 +0000 (09:02 +0200)]
MLK-17634-1: drm: imx: dcss: send vblank event from ISR
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Shengjiu Wang [Mon, 26 Feb 2018 07:12:32 +0000 (15:12 +0800)]
MLK-17620-1: hdp: register generic hdmi codec driver
Register generic hdmi codec driver, and move audio related
code to an independent file.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
Laurentiu Palcu [Fri, 23 Feb 2018 10:39:22 +0000 (12:39 +0200)]
MLK-17459-4: drm: imx: dcss: fix weston
This patch fixes an issue introduced by the cropping patches which made
weston look bad. That's because use_dtrc flag was enabled if modifiers
were present. However, graphics plane can have modifiers too. This patch
adds an extra check.
Also, remove an unnecessary debug message.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Wed, 21 Feb 2018 08:00:55 +0000 (10:00 +0200)]
MLK-17459-3: drm: imx: dcss: fixes for compressed format cropping
Cropping of compressed formats seems problematic and we cannot up-align
in this case. For compressed formats we need to down-align both the
width and height.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Mon, 19 Feb 2018 13:58:21 +0000 (15:58 +0200)]
MLK-17459-2: drm: imx: dcss: add cropping functionality and fix odd resolutions
This patch fixes playback for movies with unaligned widths/heights and
adds cropping functionality for tiled formats. Untiled formats will not
have this feature as cropping is a DTRC function.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Tue, 23 Jan 2018 07:56:18 +0000 (09:56 +0200)]
MLK-17459-1: drm: imx: dcss: change ctxld irq handling
To remove any possible latencies introduced by scheduling the bottom
half interrupt handler, do everything in the top half handler and get
rid of the IRQ worker thread handler. Also, that needs all mutexes
changed to spinlocks since mutexes can sleep.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Fancy Fang [Mon, 5 Feb 2018 01:49:02 +0000 (09:49 +0800)]
MLK-17523 drm/imx: dcss: do
dec400d shadow trigger only for primary plane
Since only primary plane has
DEC400D attached to it, the
shadow register trigger for
DEC400D is only necessary to
be done for primary plane update.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Fri, 2 Feb 2018 08:40:24 +0000 (16:40 +0800)]
MLK-17514: drm/imx: dcss: directly bypass
dec400d when no modifier present
When no modifier present, the 'fb->modifier[0]' may contain
undefined value. So it cannot be used to decide whether the
DEC400D should be set to bypass or not in this case.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Sandor Yu [Wed, 31 Jan 2018 09:31:33 +0000 (17:31 +0800)]
MLK-17480: hdp: Change dp_vic to int variable
Change dp_vic to int variable.
sync data type with the return variable of function imx_get_vic_index.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
(cherry picked from commit
bb5bdf30ec7fc61c918e0a956d761e17d79f96ab)
Sandor Yu [Fri, 2 Feb 2018 08:18:52 +0000 (16:18 +0800)]
MLK-17489-4: hdmi arc: Create new imx-arc.c file
Move hdmi arc functions to imx-arc.c from phy configuration file.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 2 Feb 2018 07:41:14 +0000 (15:41 +0800)]
MLK-17489-3: hdp: use the drm debug log
Use drm debug log function.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 30 Jan 2018 08:04:58 +0000 (16:04 +0800)]
MLK-17489-2: imx hdp: merge CDN api 1.0.36 code
Merge Cadence HDMI API 1.0.36 code.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Tue, 30 Jan 2018 08:03:55 +0000 (16:03 +0800)]
MLK-17489-1: hdp api: merge CDN api V1.0.36 code
Merge Cadence HDMI API V1.0.36 code.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Fancy Fang [Thu, 1 Feb 2018 15:21:58 +0000 (23:21 +0800)]
MLK-17492 drm/imx:
dec400d: set read config to '0x0' when bypass
dec400d
When the
DEC400D is set to bypass mode from decompressed mode,
the read config should be set to disable compression along with
the control register. Otherwise, the
DEC400D cannot really leave
the decompressed mode. And the value '0x0' is suitable to be set
to read config register in this case.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Thu, 1 Feb 2018 11:22:07 +0000 (19:22 +0800)]
MLK-17490-2 drm/imx:
dec400d: fix wrong path to define 'dcss_dec400d_write()'
The macro 'USE_CTXLD' usage in function 'dcss_dec400d_write()'
is opposite to the real defintion path.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Thu, 1 Feb 2018 11:19:34 +0000 (19:19 +0800)]
MLK-17490-1 drm/imx:
dec400d: fix incorrect register base passed to context loader
The register base of
DEC400D which is passed to context loader
should be the physical address but not the ioremaped virtual
address.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Wed, 31 Jan 2018 11:52:40 +0000 (19:52 +0800)]
MLK-17473-7 drm/imx:
dec400d: avoid shadow trigger when bypass
dec400d
Do not really do shadow regiters trigger in'dcss_dec400d_shadow_trig()'
when
dec400d is bypassed, since in 'dcss_dec400d_bypass()', the shadow
registers have already been triggerd.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Laurentiu Palcu [Tue, 23 Jan 2018 07:49:31 +0000 (09:49 +0200)]
MGS-3632-2: drm: imx: dcss: adjust DPR MAX_BYTES_PREQ depending on resolution
Current setting uses a 256 bytes/request for anything less than 1080p.
This works when DTRC is not involved. However, with DTRC, the
MAX_BYTES_PREQ needs to be fine tuned a little.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Laurentiu Palcu [Fri, 26 Jan 2018 08:31:50 +0000 (10:31 +0200)]
MGS-3632-1: drm: imx: dcss: adjust ratio when WR_SCL kicks in
Using WRSCL for downscaling ratios between 3 and 5 can lead to more
DDR bandwidth beeing used (~400MB/s).
Hence, use WR_SCL only for downscaling ratios from 5 to 7.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Fancy Fang [Tue, 30 Jan 2018 07:36:50 +0000 (15:36 +0800)]
MLK-17473-6 drm/imx: dcss: remove 'allow_fb_modifiers' assignment
Since the 'allow_fb_modifiers' has been assigned to be true in
imx drm core driver in bind(), it is not necessary to set this
flag again here.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Thu, 25 Jan 2018 10:43:24 +0000 (18:43 +0800)]
MLK-17473-5 drm/imx: core: allow fb modifiers for DCSS
Set the 'allow_fb_modifiers' flag to be true when DCSS
exists to make the format modifiers blob data can be
created correctly during the plane initialization.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Tue, 23 Jan 2018 14:17:23 +0000 (22:17 +0800)]
MLK-17473-4 drm/imx: dcss: handle tiled and compressed layout for primary plane
Add handling code to support tiled and compressed pixel source
layout. The tiled only layout will bypass
DEC400D and be resolved
by DPR, since
DEC400D is only responsible for decompression.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Mon, 22 Jan 2018 08:44:45 +0000 (16:44 +0800)]
MLK-17473-3 drm/imx: dcss: remove 'dcss_plane_mod_supported()'
The 'dcss_plane_mod_supported()' function is duplicated with
another function 'dcss_plane_format_mod_supported()'. So remove
it and use 'dcss_plane_format_mod_supported()' to replace its
calling.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Thu, 18 Jan 2018 06:30:51 +0000 (14:30 +0800)]
MLK-17473-2 drm/imx: dcss: add modifiers support for primary plane
Add four possible modifiers 'linear', 'tiled', 'super tiled'
and 'compressed super tiled' for the primary plane which can
be de-compressed by
DEC400D and de-tiled by DPR. And also
change the 'dcss_plane_format_mod_supported()' to handle these
modifiers.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Wed, 17 Jan 2018 09:00:23 +0000 (17:00 +0800)]
MLK-17473-1 drm/fourcc: add modifier for vivante compressed tiled layout
Add a new fb modifier for Vivante compressed and tiled
pixle layout which can be decompressed by
DEC400D module
in DCSS.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Sandor Yu [Fri, 22 Dec 2017 10:10:31 +0000 (18:10 +0800)]
MLK-17289-5: hdmi cec: change cec driver architecture
Change hdmi cec driver architecture.
Embedded cec function to hdmi driver.
Rewrite cec_read and cec_write fucntion
to support both imx8qm and imx8mq cec.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Also include MLK-17289-6: hdp drm: Add cec register/unregister function
Add cec register/unregister function in hdp drm driver.
Add is_cec variable to check cec function setting in dtb.
Squashed MLK-17289-5 and MLK-17289-6 from imx_4.9.y because they only
build together.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Sandor Yu [Fri, 22 Dec 2017 10:08:24 +0000 (18:08 +0800)]
MLK-17289-4: hdp api: Add hdmi cec base address
Add hdmi cec base address.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 22 Dec 2017 10:07:53 +0000 (18:07 +0800)]
MLK-17289-3: hdmi fb: change mem variable type
Change mem variable type.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 22 Dec 2017 10:06:43 +0000 (18:06 +0800)]
MLK-17289-2: hdp drm: Add mem variable
Add mem variable in struct imx_hdp,
and move regs_base and ss_base to struct mem.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Fri, 22 Dec 2017 10:04:58 +0000 (18:04 +0800)]
MLK-17289-1: hdp: change struct mem variable type to pointer
Change struct mem variable type to pointer in struct state.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 29 Jan 2018 08:43:16 +0000 (16:43 +0800)]
MLK-17468-2: hdp: Enable imx8qm hdmi/dp 4kp30 support
Add link rate select function.
Change max support pixel clock rate to 297MHz(4kp30).
Because edid read function is not enabled.
For such TV that max support 1080p60 or 720p60,
the followed cmdline mode should be added to kernel boot args:
video=HDMI-A-1:1920x1080-32@60 or
video=HDMI-A-1:1280x720-32@60
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Mon, 29 Jan 2018 08:41:21 +0000 (16:41 +0800)]
MLK-17468-1: dptx: remove CDN_API_Get_PIXEL_FREQ_KHZ_ClosetVal
Remove CDN_API_Get_PIXEL_FREQ_KHZ_ClosetVal function,
replace with vic_table.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Thu, 25 Jan 2018 08:27:54 +0000 (16:27 +0800)]
MLK-17461-3: hdp: Remove pixel clock root setting
HDMI pixel clock reparent function have implemented in dts,
remove clock root set function from hdp driver.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Sandor Yu [Wed, 24 Jan 2018 11:23:04 +0000 (19:23 +0800)]
MLK-17456-2: hdmi: Remove debug log
Remove debug log
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Sandor Yu [Wed, 24 Jan 2018 11:18:16 +0000 (19:18 +0800)]
MLK-17456-1: hdp: Enable EDID read function for imx8mq hdmi
-Enable EDID read function for imx8mq hdmi.
-Add video mode check.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Laurentiu Palcu [Fri, 19 Jan 2018 07:49:07 +0000 (09:49 +0200)]
MLK-17401: drm: imx: dcss: fix scaling issue
Under certain circumstances (corner cases) the scaling fractions were
not set properly. This patch fixes this.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>