Commit graph

719753 commits

Author SHA1 Message Date
Robert Chiras 5848ea824d MLK-18120: arch: arm: imx6qp: Fix ldb clocks
Remove the ldb clocks from the ldb node. Those clocks were added
upstream and they are needed for the DRM imx-ldb driver. Since we are
using the fbdev ldb driver for imx6qp, those clocks are not compatible
with our fbdev driver.

Fixes: 78241a88958a ("ARM: dts: add dts file for imx6qp")

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras 75cab86a0d MLK-17589: gpu/imx: Fix DCSS+DSI suspend/resume
Since the DCSS is not fully powered off when a suspend/blank occurs, the
next time we resume/unblank, the DCSS->DSI pipeline cannot be fully
re-initialized. In order to fix this issue, we should also not
completely power off the DSI too. Just configure it to stop
transmitting, by powering off the PHY.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras cbf1eac95d MLK-18193: arm64: dts: fsl-imx8mq: Fix DCSS clocks for panel use-case
The clocks for DCSS were incorrectly assigned in the rm67191 dts file,
so fix them.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras f44eb80730 MLK-18178: phy: mixel-mipi: Update the PRG register settings
Update the register settings for PRG values to be more accurate,
depending on the timing used.
Also, update the init function to make sure the PHY is powered OFF in
this stage, and the power_on function to correctly power ON the PHY
according to the specification: assert PD_PLL, wait for LOCK, assert
PD_DPHY.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras 8305c62b48 MLK-18177-2: drm/bridge: nwl-dsi: Change init sequence for panel
Currently, the DSI panel init sequence is made in the prepare function,
right after the reset pin is asserted. This implies that at this moment,
the DSI host needs to be enabled. If the DSI host is enabled during
panel prepare, there will be DSI signal on the DSI lanes during the
panel reset, which is wrong.

In order to fix this, the init sequence was moved from prepare to
enable, while the reset sequence is made in prepare. Also, the DSI host
intialization has to be updated in such a way that the host won't send
DSI signals on the lanes between the prepare and enable of the panel.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras dc0e8e5957 MLK-18177-1: drm/panel: Move the DSI init into enable stage
Currently, the DSI panel init sequence is made in the prepare function,
right after the reset pin is asserted. This implies that at this moment,
the DSI host needs to be enabled. If the DSI host is enabled during
panel prepare, there will be DSI signal on the DSI lanes during the
panel reset, which is wrong.

In order to not to have any signal on the DSI data lanes during reset,
the reset sequence must be separated from the init sequence, so move the
init into enable function and leave the reset into the prepare function.

Also:
- removed the calls to panel_disable and panel_unprepare from
  panel_remove, since the panel should be already disabled when this call
  is made
- fixed the call ordering to panel_disable and panel_unprepare from
  rad_panel_shutdown function

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Anup Patel 61822724a1 MLK-18113: rpmsg: virtio_rpmsg_bus: fix rpmsg_probe() for virtio-mmio transport
This patch was cherry picked from
https://patchwork.kernel.org/patch/10155143/

When virtio-rpmsg device is provided via virtio-mmio transport, the
dma_alloc_coherent() (called by rpmsg_probe()) fails on ARM/ARM64
systems because "vdev->dev.parent->parent" device is used as parameter
to dma_alloc_coherent().

The "vdev->dev.parent->parent" device represents underlying remoteproc
platform device when virtio-rpmsg device is provided via
virtio-remoteproc
transport. When virtio-rpmsg device is provided via virtio-mmio
transport,
the "vdev->dev.parent->parent" device represents the parent device of
virtio-mmio platform device and dma_alloc_coherent() fails for this
device
because generally there is no corresponding platform device and dma_ops
are not setup for "vdev->dev.parent->parent".

This patch fixes dma_alloc_coherent() usage in rpmsg_probe() by trying
dma_alloc_coherent() with "vdev->dev.parent" device when it fails with
"vdev->dev.parent->parent" device.

Fixes: b5ab5e24e9 ("remoteproc: maintain a generic child device for

Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 11bf7f9003 MLK-16750-5: arm: imx7d: support using psci to handle power stuff
Support using PSCI to handle Power stuff on imx7d.
i.MX7 LPSR mode not implemented now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Clement Faure ad035b4011 MLK-18036-2 Delete *optee.dts files
A specific node for OCRAM mapping in optee as been added in
the device tree. These dedicated optee device trees can be
removed.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Clement Faure cb3433dbab MLK-18036-1 Add "fsl,optee-lpm-sram" node for optee os power management.
This node will be used by the OCRAM driver in optee to:
* Get the OCRAM start address for power management in optee.
* Add an entry that will overwrite ocrams nodes and dynamically reduce
the OCRAM available for mmio-sram in Linux.

That way we do not touch the legacy Linux boot and remove the dedicated
optee device tree.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Cedric Neveux e7ede8cec7 MLK-16912 PL310: unlock ways during initialization
This change affects all i.MX 6 with PL310 L2 Cache controller.
When Linux runs in Non-secure World the PL310 has already
been initialized by the ARM secure World running OP-TEE os.
However, in order to have a proper Linux Initialization all the
L2 cache ways have been locked by the secure world.

This patch unlock all the ways during pl310 initialization.

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong c0b00c2ff1 MGS-3856-2 [#imx-1018] disable openvg2d for arm64 build
MX8 chips does not have GC355. So no need to build the drivers

Signed-off-by : Xianzhong Li <xianzhong.li@nxp.com>
Reviewed-by : Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu d3e30ed3c7 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)
2018-10-29 11:10:38 +08:00
Laurentiu Palcu a4e796b88a 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)
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 75d6256ef9 MLK-18163-1: drm: edid: fix HDMI2.0 deep color depth parsing
The drm_parse_ycbcr420_deep_color_info() is called only for HDMI 2.0,
however the DC masks were incorrectly set. These were set according
to HDMI 1.4 specification.

This patch will set the deep color depth masks to the HDMI 2.x specs
(see Table 10-6 in HDMI 2.x specs for field descriptions).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit e3a1cac6fdd88f4391180d89d5881748214a1b4f)
2018-10-29 11:10:38 +08:00
Laurentiu Palcu ecde7e1640 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)
2018-10-29 11:10:38 +08:00
Leonard Crestez b511f42def MLK-18117 soc: imx: Fix ldo-bypass not working for new bindings
With new bindings the PU regulator is fetched much later, after
imx_gpc_probe is complete. So hack the imx_pgc_power_domain_probe
function to check for fsl,ldo-bypass at this point.

This issue only actually affects imx6qp because on other SOCs with a
vddpu regulator is it disabled on boot and settings are copied from
vddsoc on first enable, see commit 64dd7300a334 ("MLK-11407-3:
regulator: anatop: force vddpu to use same voltage level as vddsoc")

On imx6qp however disabling the PU regulator is not allowed because of
hardware errata.

Fixes: 94e8d6daea9a ("MLK-11407-1 soc: imx: gpc: enable PU bypass")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez aff47ee4d4 MLK15034-4: ARM: cpuidle imx7d: Declare longer exit_latency/target_residency
Low power idle exit latency is much longer than declared, in the
milisecond range.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez 9e16e95fbe MLK15034-3: ARM: cpuidle imx7d: Use a single counter for lpi flow
The current code for deciding which CPU runs the complete lpi flow is
too complicated. Since all enter/exit code now runs under the same lock
we can just use a single non-atomic counter of cpus inside lpi.

Another variable is used to make num_online_cpus() available to ASM code
but idle code can treat it as a constant.

Unlike on imx_4.9.y num_online_cpus is fetched every time idle is
entered becuase hotplug notifiers are gone.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez 2563a079ca MLK15034-2: ARM: cpuidle imx7d: Check IPIs manually before LPI
The GPC will wake us on peripheral interrupts but not IPIs. So check
them manually by reading the GIC's GICD_SPENDSGIR* registers and
aborting idle if something is pending.

We do this only for the last cpu and after taking the required locks.
We know that at this stage the other cpu is in WFI itself or waiting for
the imx_pen_lock and can't trigger any additional IPIs. This means that
the check is not racy.

This fixes occasional lost IPIs causing tasks to get stuck in the
TASK_WAKING 'W' state for long periods. This eventually manifested as
rcu stalls.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez 5e6c2c193b MLK15034-1: ARM: cpuidle imx7d: Extend imx_pen lock to cover entire flow
This makes the code much easier to reason about. In particular it o
makes sure the imx7d cpuidle driver respects the requirements for
cpu_cluster_pm_enter/exit:

* cpu_cluster_pm_enter must be called after cpu_pm_enter has been called
on all cpus in the power domain, and before cpu_pm_exit has been called
on any cpu in the power domain.
* cpu_cluster_pm_exit must be called after cpu_pm_enter has been called
on all cpus in the power domain, and before cpu_pm_exit has been called
on any cpu in the power domain.

This fixes interrupts sometimes getting "stuck" because of improper
save/restore of GIC DIST registers.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez ce0c59b33d MLK-14874 ARM: imx7d: Ensure ARM clock only disabled if cpus in same state
GPC will stop ARM clock if both CPUs are in idle and CPU_CLK_ON_LPM is
set in GPC_LPCR_A7_BSC. Make sure that doesn't happen when cpu1 enters
state2 and cpu0 enters state0 because the default arm WFI state is not
marked with CPUIDLE_FLAG_TIMER_STOP and it can result in arch_sys_timer
being stopped unexpectedly.

It is possible to reproduce incorrect behavior by explicitly disabling
other idle states for cpu0/cpu1 and timing how much sleep calls take on
cpu0. Ocassionaly something like "sleep 1" will take 3-4 seconds to
complete.

Make sure that both CPUs are in the same idle state before entering
WAIT.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang b50110b2a3 MLK-12349 ARM: imx: skip RBC workaround for standby mode on i.MX7D
For standby mode, RBC workaround is NOT necessary as ARM platform
is NOT powered down;

Correct GIC register offset(0x1000) for disabling distributor.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 3887e0bb16 MLK-12262-6 ARM: imx: enable memory power down for i.MX7D TO1.1
Enable memory power down for i.MX7D TO1.1 to save power, TO1.0
has issue of entering DSM by mistake, so it is disabled as a
solution, now that this issue is fixed on TO1.1, enable it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang dc092cfa0e MLK-12262-5 ARM: imx: add RBC workaround for i.MX7D DSM
Same as low power idle, during GPC shutting down ARM core,
interrupts must be hold until the process done, apply RBC
workaround and disable GIC during GPC powering down ARM
core.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 5a03f84782 MLK-12262-3 ARM: imx: reduce DDR3 normal frequency to 400MHz for i.MX7D TO1.1
i.MX7D TO1.1 only supports DDR3 running at max frequency of 400MHz,
update busfreq driver accordingly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 6a2fbff6f8 MLK-12262-1 ARM: imx: enable ddr auto self-refresh for i.MX7D
Enable DDR auto self-refresh for i.MX7D, when doing DDR
frequency scale or suspend/resume, DDR self-refresh will
be disabled, this is incorrect for saving power, enable it
for all these scenarios.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang e0e1cc1033 MLK-12262-4 ARM: imx: fix low power idle issue on i.MX7D TO1.1
For low power idle with ARM power gated, per hardware requirement,
there must be no interrupt coming during the power down
process of ARM core, so RBC counter is enabled to hold interrupts
and GIC must be disabled at the moment;

The hardware design team recommends ~240us is required during ARM
core power down, so we update the RBC counter value to 8(~240us);

Update GPC SCU and CPU power up/down timing according to design
team's recommendation.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang b28b9759c8 MLK-12136-1 ARM: imx: adjust slot control to meet design requirement on i.MX7D
Design team recommend to put SCU/C0/C1 in same power up slot
to avoid reset timing issue of debug mode, adjust the power
up slot and timing per their requirement.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 487ae28051 MLK-12093-2 ARM: imx: correct coding error
Correct coding error and use macro define instead
of register value.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 5e453a241d MLK-12088 ARM: imx: low power idle support for imx7d single core (HAX)
When only single core online for i.MX7D, the secondary core wfi
flag should be set to make sure low power idle can be entered when
last core enters wfi. Otherwise, DDR/CCM/ANATOP will NOT enter
low power mode as the secondary core wfi flag is always clear;

Make sure the last power up slot do the ack for single core case.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Since upstream removed cpu hotplug notifiers skip this part.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 374c9810b0 MLK-12203-2 ARM: imx: adjust loop number to delay ~20us for i.MX7D low power idle
ARM does NOT execute one instruction every cycle, the bus bandwidth,
cache status etc. would impacts the instruction execution time, so we
can NOT just calculate the delay time by ARM frequency, this patch
adjusts loop number to get a ~20us delay, measured via GPIO pin.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 2320a8615f MLK-12093-1 ARM: imx: adjust latency value of low power idle on imx7d
Per design team's suggestion, when enter/exit DDR PADs low power
mode, ~10us delay is necessary to make sure signal stable enough
for DDR operation, so add ~20us delay(10us margin) and adjust
latency value of low power idle.

Optimize enter/exit self-refresh flow of DDRC according to
design team's suggestion.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Han Xu 6d71738bdc MLK-18107: mtd: fsl-quadspi: add dedicate AHB read LUT
To fix the i.MX6SX probe second chip error issue, add a dedicate AHB
read lut entry, The patch also remove the read length parameter for lut
preparation, which can be ignored.

For the MICRON DDR read, constrain the dummy to up to 8 clock cycles.

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong e781c63f8b MGS-3848-5 [#imx-854] OCL1.2: test_image_streams failures
there are 2 test failed on 8QXP FB. CL151757 fixed bug #20196,
for image objects using host ptr, set the cacheable flag correctly.

merged CL151774 fix build error cause by CL151757.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong c3a1c034be MGS-3848-4 [#imx-854] correct hw-event synchronization between pm and other threads
When pm is running power ON to OFF (not broadcast), gckCOMMAND_Stall is called for synchronization.
But it does not blocks more events.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong 9fd30183c0 MGS-3848-3 [#imx-854] correct command commit synchronization between pm and other threads
When power ON to other mode with broadcast (SUSPEND_BROADCAST,
IDLE_BROADCAST, OFF_BROADCAST), command->powerSemaphore is acquired after check idle.
code sequence:
    check commit atom
    check idle
    >>> at this point, other thread may have new commits at this
    >>> point.
    Acquire command->powerSemaphore
    ... do clock off

This can cause unexpected interrupts after clock OFF or power
OFF.

To fix: try to acquire powerSemaphore before check commit atom,
abort when failure, because command commit is in progress.

fix bug #19216, #19230.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong d7cdf20603 MGS-3848-2 [#imx-854] fix events stuck issue when clock off
When pm (SetPowerManagementState) is running power ON to
SUSPEND_BROADCAST, it only checks wait-link FE, but not Async FE. Clock
can be off when read AsyncFE Acknowledge register and other.

	pm thread:
	    ...
	    check commit atom ok
	    >> check idle OK
	    (former stopIsr before cl144673 is here)
	    set GPU clock off
	    ...

	isr:
	    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_Address));
	    gckEVENT_Interrupt
	    >>> here, at this point, all interrupt comes, check idle in
	    >>> pm thread can pass.
	    gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address));
	    gckFE_UpdateAvaiable -> ReadRegister(GCREG_FE_ASYNC_STATUS_Address)

If gcmkONERROR(ReadRegister(AQ_INTR_ACKNOWLEDGE_EX_Address))
fail of clock off, then gckHARDWARE_Interrupt fails. In isrRoutine, it
won't wake up threadRoutine. Then it's stuck!
ReadRegister(GCREG_FE_ASYNC_STATUS_Address) failure can cause
unexpected behavior, too.

Former stopIsr (free_irq, before cl144673) can remove isr before
GPU clock off. So the issue is hidden.

To fix:
1. We should return success when either FE or AsyncFE reports
correct interrupts, so that isr can wake up threadRoutine for either FE.
That means, only need return ERROR when both FEs reports ERROR.
2. Add check for status of
ReadRegister(GCREG_FE_ASYNC_STATUS_Address).

Fix bug #19216, #19230.

merged BUG#19216 BUG#19230 CL152073 add missing part for CL151955

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong a26f62a861 MGS-3848-1 [#imx-854] refinements for pm and isr
1. slightly increate performance for interrupt handler
2. refine powerMutex lock
3. remove obsolete power management mode
4. code refinement  preparing fix for bug #19216, #19230

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Chenyan Feng 479f9f17b7 MGS-3832 [#imx-921] Fix the cl_convolution of ACL which cause MMU exception
Dump the error info only when there is an error. If the gcdALLOC_ON_FAULT is not enabled, still need to check
the HW status to decide whether to dump the exception info or not

Signed-off-by: Ella Feng <ella.feng@nxp.com>
Reviewed-by: Xianzhong Li <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Yuchou Gan 707c117916 MGS-3846 [#imx-1015] fix coverity high impact issue
Using uninitialized value minf when calling snprintf.
Initilize it to fix.

Date: 25th Apr, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
2018-10-29 11:10:38 +08:00
Cosmin-Gabriel Samoila 9a0b6b2bad ASoC: wm8962: remove unused variable
codec_clk is now part of private_data.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez 91c18a66bc MLK-18121: ARM: dts: imx6qdl: Fix gpu power-domains ref
Upstream refactored GPC power domains to have a nested pgc node, this
means that the pu power domain needs to be referenced differently.

This fixes warnings like these:

OF: /soc/gpu@00130000: could not get #power-domain-cells for
/soc/aips-bus@02000000/gpc@020dc000

This warning probably also means that GPU power management is not done
correctly.

Old bindings are still used on imx6s*

Fixes: 0a9a9a732f88 ("MGS-3705-1 gpu: dts: enable gpu devices for imx6")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu f314226dd9 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>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu b70e11b705 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>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu ef14707fc3 MLK-18116: drm: imx: dcss: fix crtc enumeration problem
The following commit:

44b460cfe5 ("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>
2018-10-29 11:10:38 +08:00
Xianzhong 2cdb6c33e2 MGS-3705-2 gpu: add 6.2.4.p1 driver for 4.14 kernel
integrate 6.2.4.p1 driver and enable gpu build config,
fix 4.14 linux kernel build break in gpu-viv driver.

source branch: gpu-viv6/fsl_6.2.4.p1
source commit: 8aa3fcbcad9f51441b768bb41ce5c2686f7f143f

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Xianzhong fdee3d5400 MGS-3705-1 gpu: dts: enable gpu devices for imx6
set GPU baseAddress with 256M on IMX6Q and iMX6QP,
add reserved cma in DTB to support different size,
the default cma size is 320M on all imx6 boards.

integrated patches from imx_4.9.y:
1.MGS-955 GPU:Integrate GPU module
 commit: 73183c14a20d4f1d02317f80db3d90b3be1546fc
2.MGS-1211 gpu: add GPU for 6sl,6sx,6dl
 commit: 80a8994c47cbb97fb31ef0efab92ddb29002448e
3.MGS-1087 gpu: Move the GPU reserved memory to DTS file
 commit: ea0111da6892b52c790da607a3d91140d1ebf936
4.MGS-2540 [#ccc] Need set baseAddress with RAM start address on IMX6Q
 commit: de838d99d9264884cbaaa601ab323a70b62634d9

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras 53b73e139c MLK-18106: drm/bridge: Fix nwl-dsi bridge handling
Since the drm_bridge_attach function now supports chained bridges, there
is no need for nwl_dsi_add_bridge and nwl_dsi_del_bridge functions, so
remove them.
Now, we can pass the existent bridge to drm_bridge_attach.

This fixes a bug created during kernel 4.14 rebase process.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras 03c3482b55 MLK-18106: drm/imx: Fix nwl_dsi-imx bridge handling
The nwl_dsi-imx which is the platform driver for the NortWest Logic DSI
host controller found on IMX platforms handles the DSI host as a bridge.
Since the drm_bridge_attach function now supports chained bridges, there
is no need for nwl_dsi_add_bridge and nwl_dsi_del_bridge functions.
Just pass the existent bridge to drm_bridge_attach.

This fixes a bug created during kernel 4.14 rebase process.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00