Merge CDN_1_0_38 release to HDP API.
v1_0_38 release notes:
DP: Added functionality for setting own PHY register values related to
voltage swing and pre-emphasis.
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
vpu_set_power for QXP in probe function
Decrease encoder wait time from 1s to 10ms and remove vpu_set_power for
QXP in probe function
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
Replace wait_event_interruptible_timeout()/wake_up_interruptible_all() with wait_event_timeout()/wake_up_all()
So one complete decode process will be guranteed to avoid potential assert be triggered.
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 64634b90c6f6b15a97b9cae91b0e6099970cee55)
Fix some decoder and encoder code bugs as follows:
- change vpu_stop_streaming to prevent deleting repeated entry
- reduce wait time for encoder from 5s to 1s
- change vpu_suspend to correct the calling of vpu_set_power() function
- change vpu_next_free_instance() to depart QM from QXP
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 77a85c0fdeecac5042147d4e842e6a60240a745e)
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)
Fixes commit 6b97462b64 ("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>
Refine dma-buf metadata setting to support framebuffer compression
Change-Id: Ia0ab9224d789c4b620e33a6f1c28483025a136ce
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
While investigating MLK-18894 ran a large number of suspend iterations
on imx6qp-sdb with rc2 kernel. After ~6 hours it hung while suspending
devices and sysrq-T showed the following trace for rtcwake:
The gckHARDWARE_SetPowerManagementState function seems hung waiting for
gckHARDWARE_QueryIdle. Inside the gckHARDWARE_QueryIdle there is a check
which looks like this:
rtcwake D 0 7090 561 0x00000001
[<809d5fc8>] (__schedule) from [<809d6380>] (schedule+0x48/0xb0)
[<809d6380>] (schedule) from [<809d9d3c>] (schedule_hrtimeout_range_clock+0xc8/0x13c)
[<809d9d3c>] (schedule_hrtimeout_range_clock) from [<809d9df0>] (schedule_hrtimeout+0x20/0x28)
[<809d9df0>] (schedule_hrtimeout) from [<807168c4>] (gckOS_Delay.part.3+0x64/0x6c)
[<807168c4>] (gckOS_Delay.part.3) from [<8071813c>] (gckOS_Delay+0x18/0x20)
[<8071813c>] (gckOS_Delay) from [<8073f08c>] (gckHARDWARE_SetPowerManagementState+0x838/0xb70)
[<8073f08c>] (gckHARDWARE_SetPowerManagementState) from [<8071df18>] (gpu_suspend+0x74/0xe4)
[<8071df18>] (gpu_suspend) from [<804fb9e8>] (dpm_run_callback+0x3c/0xdc)
/* Test if address is inside the last WAIT/LINK sequence. */
if ((address >= Hardware->lastWaitLink)
&& (address <= Hardware->lastWaitLink + 16)
Stepping through using the debugger (screenshot attached) this function
seems to return non-idle with both address lastWaitLink and being equal
to 0xFFFFFFF0. As far as I can tell the intention seems to be that the
check should pass but 0xFFFFFFF0 + 16 overflows back to zero so the
second part of the check fails because 0xFFFFFFF0 is not less than or
equal to 0.
Adding some prints to GPU code it seems that it's normal for these
values to be >0xFFFFe000. When they (randomly) hit 0xFFFFFFF0 exactly
the idle check will incorrectly fail and suspend will hang.
Actually, it is wrong when address reach to Hardware->lastWaitLink + 16,
because the address shall be either Hardware->lastWaitLink(wait command)
or Hardware->lastWaitLink + 8 (link command).
Fix the end address offset with 8 or 16 (extra 8 bytes for L2 flush).
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
support for encoder
- Add level and profile for h264 encoder, level is mapped like level 5.1
to uLevel 51 for firmware except 1b to uLevel 14
- Add check for the function enc_mem_alloc() to ensure buffers are
allocated once to prevent memory leak
- modify streamoff() streamon() update_yuv_addr() and report_stream_done()
function to enable loop for encoder
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
Commit 7103962dbc would return success even though we
don't have a OPP array (i.e., i.MX6). This patch completes that
in de-register part.
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Add delay time and retry to make sure the Power state was changed.
Signed-off-by Yong Gan <yong.gan@ncp.com>
(cherry picked from commit 59a836f35807f5c09c98cf3be318ac49526bcf69)
Add support for i.MX8QM B0 vpu decoder and encoder and it is compatiable
with i.MX8QXP B0 VPU.
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit f2d7823da29c55644299eea84a2e866ea188c698)
Modify the action for disable recoder
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 64302c586a541f8effc1e16427f50ec490918a9d)
Added a flagbits in soc_platform to workaround Soc platform. Add a
check for memory address beyond 4G for 850d mscale.
Date: 10th Aug, 2018
Signed-off-by: Ella Feng <ella.feng@nxp.com>
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>
6sx gpu need reserve command to flush cache before power-off,
there is no way to perform force sync in power broadcast mode.
command buffer will be exhausted with repeat suspend/resume,
need pull up power to flush command buffer before suspend.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
On 8QP we don't have the OVERDRIVE governor, only NOMINAL and
UNDERDRIVE. We set the current initial governor to OVERDRIVE, but also
display incorrect governor names relative to the clocks assigned in OPP
tuples. This patch address this situation by determining which governor
should be used at start-up and fixes displaying the governors
available for use.
This patch also sets the initial clock rate, in case the assigned-clock
rates for the cores are different than the ones found in the
operating-points (OPP). While this shouldn't be a real use-case this
allows testing different OPP tuples to mimic a OPP array for 8QP.
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
- Add sync frame flags
- modify width & height value when get format after set format for capture
- modify poll function
- decrease MIN_BUFFER_COUNT count to 3
- change file license
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 378f251af9ccd6b94b48ff88582b9044c9ac367d)
Add support for VC1 by adding start code and adjust transfer format for
H263
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
(cherry picked from commit 5bf003ce4fda812286eb9dc2f365e2608bfd5bad)
fix memory overwrite since out of range in last page,
remove dma_sync_single_for_device to avoid over-touch.
this fix QM gpu crash with test_buffers stress case.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Refine source contained in CONFIG_DEVICE_THERMAL_XXX to adjust clock dynamically
g1 and g2 clock will be adjusted independently
Default, the macro not enabled
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 0f335c55d074831a2cee56bf247774b76f2d6fdf)
Handle g1 and g2 power independently:
Add instance context to record which core(g1 or g2) is used
Check and power off unused core in ioctl operation
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 7eba7e6bb7fef9180a18c4860230addd1c24f0c7)
Disable irq during poweron stage to avoid unexpected irq triggered
One mutex is added accordingly to handle the operation
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 7c938b8e956b1b4e3b2cc5b21aa378c27e0eee8f)
not a problem without operating-points in gpu device entry,
need disable error message for frequency scaling failure.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
only add the padding pages for user pageable memory,
Revert "MGS-4022 [#imx-1070] fix kernel panic with opencl test_buffers"
This reverts commit 9253786bcfd2fa17132c5057a18eb75b10ea3336.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Set default colorspace value in v4l2_ioctl_try_fmt()
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 52221438736a3ede393ba1682eadc292d3a73977)
fix read buffer fence node for hw copy,
add cpu cache line check for write buffer,
invalidate cache after pipeline complete,
flush head and tail pages for user memory.
fix 630a849f3a4087a98b0425c261f474d178150307
"MGS-3255-39 [#ccc] fix opencl cache issue"
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
the user memory will add the padding pages to meet hardware alignment,
need set non-contiguous flag to avoid contigous mapping in GPU MMU.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Add self-defined EOS tag for some formats, includes: Mpeg2 and Mjpeg
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 6550b3dca4eaf6c42c38234a6e8bbf09072d9f54)
Rename fence interfaces to dma_fence to match with the upstream
commit, f54d186700 ("dma-buf: Rename struct fence to dma_fence"),
changes.
Fix compile issue sync_timeline_create is not defined.
Change-Id: I0f89a089f11131070f96a5ddc922938f4b28615f
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
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>
version upgrade from 6.2.4.p1.150331 to 6.2.4.p2.163672
fixed gpu kernel panic for CONFIG_ARM64_SW_TTBR0_PAN,
support frequency query for gpu shader and core.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Add _IOC_NR for all ioctl command to avoid overflow.
Signed-off-by: xiahong.bao <xiahong.bao@nxp.com>
(cherry picked from commit 9c362b56617119cb1807845ecee18fb06d2113d3)
Implement different sync method, replace previous signal with ioctl
Related functions were added
(cherry-pick from : adc4bc267e5c3a33ca802de83e2693638a7be8e8)
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
For 4.14 kernel, it turns out that the vdoa driver cannot use
module_init(), otherwise, the driver's probe function cannot be
called. Using subsys_initcall() makes the probe function be
successfully called, just like the ipu_common driver. Note that
the mxc_ipu.o object consists of the ipu_common driver and the
vdoa driver.
Signed-off-by: Liu Ying <victor.liu@nxp.com>