1
0
Fork 0
Commit Graph

47 Commits (b287e45d990688b71ac4e51ccd4b67a36dea71ff)

Author SHA1 Message Date
Ming Qian b287e45d99 MLK-24477-4:[8QM_MEK/8QXP_MEK]mxc:vpu_malone: report color space by try_fmt
gst will depend on the try_fmt api
if driver don't report the correct color space in try_fmt
gst may return fail

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2020-08-17 11:26:25 +08:00
Ming Qian c9f7364dc4 MLK-24477-3:[8QM_MEK/8QXP_MEK]mxc:vpu_malone: improve get/set color api
use the v4l2 api instead of custom api

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2020-08-12 16:02:21 +08:00
Shijie Qin 11acf33f0c MLK-24404-1 mxc: vpu_malone: correct device power usage_count
If 'pm_runtime_get_sync()' fail, need to reset device power usage_count
to '0'. Otherwise, the usage_count always bigger than '0' and not do
'runtime_suspend()' actually.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-07-15 19:18:59 +08:00
Shijie Qin ab12a0e299 LF-1430-4 mxc: vpu_malone: refine the operation of insert scode
For more readable, use a handler table to insert scode for
each format.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-05-26 18:19:24 +08:00
Ming Qian da37a31d45 LF-1405-2:[8QM_MEK/8QXP_MEK]mxc:vpu_malone: support insmod repeatly
1. the mu won't be really power off,
so we need restore the mu but not initialize it
2. the vpu is shared with vpu windsor,
so we don't do vpu reset when remove module.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-05-25 09:25:49 +08:00
Ming Qian 8ebff584ef LF-1405-1: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: support insmod separately
delay the creation of video device node in order to avoid inmod failure

in probe function, if create video node in a early stage,
the video node may be created before initialize the vpu dev,
and in such case, open video node,
the mu mailbox may be not requested,
then it will led to download firmware fail.

so create the video device node at the end of the probe function.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-05-25 09:25:49 +08:00
Li Yang 7af6a9a777 mxc: vpu_malone: fix build issue as module
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2020-05-15 09:17:39 +08:00
Shijie Qin 2f97227dd6 MA-17115 mxc: vpu_malone: send error event when firmware exception
When firmware exception, send error event instead of eos event,
avoid doubt or might send eos event twice(exception + parsed eos data).

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-05-14 18:37:49 +08:00
Ming Qian abd0e1e449 LF-1225: [8QM_MEK/8QXP_MEK]mxc:vpu_malone:fix hevc incorrect dcp buffer size
There are two dcp buffer case:
1. for some small resolution, the calcuated buffer size is too small.
2. after decode h264, the dcp info will be reported by the second seq hdr,
driver need calcuate the correct dcp buffer size using the second seq hdr.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2020-04-20 13:56:42 +08:00
Shijie Qin c900bb4cd9 LF-1236 mxc: vpu_malone: roundup allocated kfifo size to power-of-two
kfifo memory size must roundup to power-of-two if it is
allocated by driver. Because kfifo elements size will
roundup to power-of-two in kfifo_init(), must guarantee
allocated memory is enough.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-04-18 11:10:56 +08:00
Shijie Qin 50e9ad8724 LF-1220 mxc: vpu_malone: manage mailbox according to runtime PM
Need to call mailbox's request/free channel according to runtime PM.
Ohterwise MUs power always 'on' during runtime suspend.

Remove requesting mu from probe, it will be requested through
pm_runtime_resume indirectly, so there is no need call it
directly.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2020-04-17 09:07:15 +08:00
Shijie Qin 68cf909dc8 LF-1211 mxc: vpu_malone: v4l2_poll directly return if firmware already finished
If firmware already finished, and output / capture already streamoff too,
v4l2_poll directly return. Avoid waiting for timeout and delay close
operation.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-04-10 16:39:28 +08:00
Ming Qian 1c0b4935b9 LF-1091: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: request reasonable buffer size for DCP instead of worst case
firmware have supplied the detailed formula to
calcuate the actually dcp buffer size.
so we can allocate dcp buffer according the resolution

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-04-09 10:31:48 +08:00
Shijie Qin fedb5f3827 LF-1181 mxc: vpu_malone: Not send res_change event until dst done_list is empty
As eos event, when receive res change event from FW,
don't send it to framework until dst done_list is empty.
Avoid to framework ignore a few decoded frames.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-03-26 18:12:18 +08:00
Ming Qian 7c1e5ff049 LF-1180:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:v4l2 buffer of output stream use virtual memory instead of dma
only cpu will access the v4l2 buffer of output stream,
so there is no need for allocate dma for it
use virtual memory can decreate the usage of dma,
and won't bring side effort

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-03-26 13:17:56 +08:00
Ming Qian fa99601894 LF-1077:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:compatible with ffmpeg h264_v4l2m2m decoder
supply a default sizeimage for output

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-03-24 15:41:25 +08:00
Ming Qian 0cd3c661b9 MLK-23220:mxc:vpu_malone:kfifo_alloc failure in VPU driver when memory fragment
Suggest to use vmalloc for fifo entity.
Then use kfifo_init to init the fifo structure.
Then we do not have to require contiguous memory from buddy,
especially in a high pressure of memory resource.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-03-24 15:41:25 +08:00
Ming Qian d556e82dea LF-1090:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:synchronize the allocate and free mbi buffer
If allocate mbi buffer and free mbi buffer is out of sync.
The buffer status may be incorrect, and led to unpredictable result

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-03-09 09:25:10 +08:00
Li Yang 072173c984 LF-994 mxc: vpu_malone vpu_windsor: cope with upstream y2038 changes
Upstream removed 32bit timespec to deal with y2038 issue.
Update MXC drivers to deal with the change.

Signed-off-by: Li Yang <leoyang.li@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-24 17:00:12 +08:00
Ming Qian e883611a57 LF-984:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:report error event when the resolution beyond limit
If the resolution is too bit to support,
driver should report an error event,
so application can do the cancel flow

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:03:18 +08:00
Ming Qian 2342e62536 LF-840-7:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
don't block the abort when wait res change

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:03:17 +08:00
Ming Qian 69dcbb5bd9 LF-840-5:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
1. make sure mu interrupt in the fifo has been handled.
2. make sure event in the fifo has been handled.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:03:00 +08:00
Ming Qian b61e7b6411 LF-840-4:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
don't alloc dma in the message handler.
because it may block the event

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:02:25 +08:00
Ming Qian 84a4ac79d8 LF-840-3:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
don't clear the pic end flag as it should be cleared by firmware.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:02:07 +08:00
Ming Qian 5dfa928ea0 LF-840-2:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
don't lock around cancel_work_sync, otherwise may cause dead lock.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:01:52 +08:00
Ming Qian 2804096a9e LF-840-1:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:abort or stop cmd may timeout after resume from suspend when run multi h264 instance
make the fw_flow_mutex a local mutex instead of a global mutex.
the global may cause dead lock when there are one instance

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2020-02-21 15:01:36 +08:00
Shijie Qin 14aff2955b LF-765-2 [8QM_MEK/8QXP_MEK]mxc: vpu_malone: check buffer status before add buffer to queue
When add buffer to queue which status should be active.
When firmware release one buffer, could re-add it to queue if
its status is active.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Acked-by: ming_qian <ming.qian@nxp.com>
2020-01-14 10:08:39 +08:00
Shijie Qin eb8cfa563e LF-765 [8QM_MEK/8QXP_MEK]mxc:vpu_malone: add FRAME_SKIP status to record skip-frame
Add 'FRAME_SKIP' status to record 'MEDIA_PLAYER_SKIPPED_FRAME_ID'
frame. Instead of use 'FRAME_READY' that will lead to this buffer
no chance to re-add to available buffer queue.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2020-01-09 18:05:32 +08:00
Ming Qian a8512d04d2 LF-711:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:stream may hang due to the event
msg hasn't process in time

firmware write event message to message buffer, and trigger an interrupt,
driver will read the message and store it into a fifo. and call queue_work.
If the work is scheduling but have exited the while loop,
it may cause the event won't be processed until another event received.
So in some case, the stream may hang
as the next event is depends on the driver process the current event.

vpu_windsor may have the same issue.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
2020-01-07 13:48:51 +08:00
Shijie Qin cacbaeca03 LF-629: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: donot set end_flag if scode type is BUFFFLUSH in low-latency mode
In low-latency mode, donot need set end_flag if scode type is
BUFFLUSH_PADDING_TYPE. Otherwise, firmware will ignore frame
threshold then may affect another instance performance.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Acked-by: ming_qian <ming.qian@nxp.com>
2019-12-27 15:48:14 +08:00
ming_qian 23bd461be4 LF-628:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:export frame threshold of frame mode
export frame threshold of frame mode,
and then we can modify the threshold without update firmware.
It can be used for debug

Signed-off-by: ming_qian <ming.qian@nxp.com>
Acked-by: <shijie.qin@nxp.com>
2019-12-27 15:48:01 +08:00
ming_qian 19d577f1f7 LF-561: [8QM_MEK/8QXP_MEK]mxc:vpu_malone:reinit completion before send command
we should reinit the completion before send command
who may trigger the completion,
otherwise it may be reinit after complete in certain timing,
then led to timeout

use private workqueue instead of public workqueue

Signed-off-by: ming_qian <ming.qian@nxp.com>
Acked-by: Shijie Qin <shijie.qin@nxp.com>
2019-12-20 17:04:17 +08:00
Shijie Qin f6cb75f3d9 LF-365 [8QM_MEK/8QXP_MEK]mxc:vpu_malone: need skip tsm when skip not decoded frame
- If frame ID is  MEDIA_PLAYER_SKIPPED_FRAME_ID, need skip this frame,
  also need skip its tsm at the same time.
- Fixed coverity issue: CID 6344236 (#2 of 2): Buffer not null
  terminated (BUFFER_SIZE_WARNING).
- Remove two deaded code about ctx pointer check.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Acked-by: ming_qian <ming.qian@nxp.com>
2019-12-06 10:54:45 +08:00
ming_qian bcaa7c17aa LF-80:[8QM_MEK/8QXP_MEK]mxc:vpu_malone:clear eos flag when output streamoff
if the eos flag is not clear after output streamoff,
it may cause firmware hang with multi instances

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:47 +08:00
ming_qian c521bad20c MLK-22999 mxc: vpu_malone: release debugfs after open to avoid memory leak
VPU decoder driver create some debug fs,
but don't set the release function,
in open function, it will alloc some memory,
it should be freed when release function is called.
otherwise, memory will be leaked.

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:47 +08:00
Shijie Qin 9fde70430f MLK-22991 mxc: vpu_malone vpu_windsor: check is vpu poweroff when suspend
the csr register 'CM0Px_CPUWAIT' will be cleared to '1' after
reset(poweroff then poweron), hence we could check is vpu poweroff
when suspend according to this value.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
Acked-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:46 +08:00
ming_qian 23f0876ea4 MLK-22945 mxc vpu_malone: disable decode ctx before release it.
If close is called without calling streamoff,
the status of decode is enable,
some buffer status may be wrong.
disable before release it will avoid such error.

Signed-off-by: ming_qian <ming.qian@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
Acked-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:45 +08:00
Julien Olivain d1a0de782c MLK-22951 mxc: vpu_malone: add missing semicolon
Add a missing semicolon. This missing semicolon is not breaking the
build in defconfig since the next MODULE_DEVICE_TABLE() expand to an
empty string, so the next semicolon is used. When this macro expands
to a non-empty string, the build breaks. This was found by a
"make allmodconfig" build.

Signed-off-by: Julien Olivain <julien.olivain@nxp.com>
Reviewed-by: Shijie Qin <shijie.qin@nxp.com>
Acked-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:44 +08:00
Shijie Qin 23401f11ca MLK-22913 vpu: windsor malone: fix kernel panic caused by directly read MU
- After switch to use mailbox, shall not read MU register directly
- VPU shall always poweroff when suspend, hence related check
  unnecessary.
- Remain the API to unify code of 4.19 kernel version

[  123.773671] Call trace:
[  123.776123]  vpu_resume+0x90/0x1d8
[  123.779534]  platform_pm_resume+0x24/0x48
[  123.783542]  dpm_run_callback.isra.15+0x38/0xec
[  123.788075]  device_resume+0x74/0x11c
[  123.791740]  dpm_resume+0xdc/0x20c
[  123.795144]  dpm_resume_end+0x14/0x28
[  123.798809]  suspend_devices_and_enter+0x190/0x5a4
[  123.803596]  pm_suspend+0x258/0x320
[  123.807091]  state_store+0x84/0x108
[  123.810581]  kobj_attr_store+0x14/0x24
[  123.814333]  sysfs_kf_write+0x40/0x48
[  123.817993]  kernfs_fop_write+0xe8/0x1e4
[  123.821916]  __vfs_write+0x18/0x3c
[  123.825318]  vfs_write+0xb8/0x1ac
[  123.828634]  ksys_write+0x60/0xd8
[  123.831946]  __arm64_sys_write+0x18/0x20
[  123.835879]  el0_svc_common.constprop.2+0xb0/0x160
[  123.840669]  el0_svc_handler+0x20/0x7c
[  123.844422]  el0_svc+0x8/0x640
[  123.847484] Code: d65f03c0 f940d296 914042d6 910092d6 (b94002d6)
[  123.853581] ---[ end trace d17f2f7d780f8e3f ]---

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Reviewed-by: ming_qian <ming.qian@nxp.com>
2019-11-25 15:47:42 +08:00
Shijie Qin b8ce664bea vpu: windor encoder: malone decoder: fix kernel panic caused by MU_Init
- Remove MU_Init() and other related operations after switch to
  mailbox
- Remain API for unify code between 4.19 and 5.x

[   30.052738] Call trace:
[   30.055182]  MU_Init+0x10/0x80
[   30.058237]  vpu_resume+0x48/0x1e8
[   30.061638]  platform_pm_resume+0x24/0x60
[   30.065653]  dpm_run_callback.isra.16+0x1c/0x70
[   30.070186]  device_resume+0x88/0x148
[   30.073850]  dpm_resume+0xd4/0x1e0
[   30.077253]  dpm_resume_end+0x14/0x28
[   30.080918]  suspend_devices_and_enter+0x14c/0x500
[   30.085706]  pm_suspend+0x1f4/0x260
[   30.089194]  state_store+0x84/0xf0
[   30.092603]  kobj_attr_store+0x14/0x28
[   30.096357]  sysfs_kf_write+0x48/0x58
[   30.100016]  kernfs_fop_write+0xe0/0x1f8
[   30.103940]  __vfs_write+0x18/0x40
[   30.107339]  vfs_write+0x19c/0x1f0
[   30.110738]  ksys_write+0x64/0xf0
[   30.114054]  __arm64_sys_write+0x14/0x20
[   30.117989]  el0_svc_common.constprop.2+0xb0/0x168
[   30.122779]  el0_svc_handler+0x20/0x80
[   30.126534]  el0_svc+0x8/0xc

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-11-25 15:47:42 +08:00
Shijie Qin 68a85f9823 vpu: malone decoder: enable mailbox and unify code
- Enable mailbox for vpu decoder
  The mailbox of mu_m0 is used by imx8qxp and imx8qm

- Unify code between 4.19 and 5.x
  Update code from 4.19
  Separate sc and mu contents to vpu_mu.h/vpu_mu.c
  Separate pm_domain contents to vpu_pm.h/vpu_pm.c
  Add kfifo for better hold received mu message
  Sync v4l2 change
  Use ktime_get_real_ts64() replace do_gettimeofday()

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
2019-11-25 15:47:42 +08:00
Dong Aisheng 5ae24aba1c media: vpu_malone: fix boot warning by intialize device_caps
Caused by:
049e684 media: v4l2-dev: fix WARN_ON(!vdev->device_caps)
3c13505 media: v4l2-dev/ioctl: require non-zero device_caps, verify sane querycap results

[    1.650814] WARNING: CPU: 2 PID: 32 at ../drivers/media/v4l2-core/v4l2-dev.c:864 __video_register_device+0x70/0x1524
[    1.661231] Modules linked in:
[    1.664277] CPU: 2 PID: 32 Comm: kworker/2:1 Not tainted 5.3.0-rc2-next-20190730-01098-g446d4cd #475
[    1.673393] Hardware name: Freescale i.MX8QXP MEK (DT)
[    1.678527] Workqueue: events deferred_probe_work_func
[    1.683647] pstate: 60000005 (nZCv daif -PAN -UAO)
[    1.688424] pc : __video_register_device+0x70/0x1524
[    1.693379] lr : __video_register_device+0x70/0x1524
[    1.698327] sp : ffff000011d8ba90
[    1.701626] x29: ffff000011d8ba90 x28: ffff000011d33cd8
[    1.706925] x27: ffff80083bee7838 x26: ffff0000119a0230
[    1.712224] x25: ffff80083ae63000 x24: 0000000000000001
[    1.717523] x23: 0000000000000000 x22: ffff000011989000
[    1.722823] x21: ffff80083bfc7810 x20: 0000000000000000
[    1.728122] x19: ffff000011989000 x18: ffff000010035fff
[    1.733422] x17: 0000000096ae19b6 x16: ffff000010035fff
[    1.738721] x15: ffff0000113e6000 x14: 0000008000000000
[    1.744020] x13: 0000000000000000 x12: 00000000000000e9
[    1.749320] x11: ffffffffffffffff x10: 00000000000000ea
[    1.754619] x9 : ffff0000119a34c0 x8 : 5d20657265682074
[    1.759918] x7 : 7563205b2d2d2d2d x6 : ffff0000106dc978
[    1.765218] x5 : 0000000000000000 x4 : 0000000000000000
[    1.770517] x3 : 00000000ffffffff x2 : 1e0ac921e89b3600
[    1.775816] x1 : 0000000000000000 x0 : 0000000000000024
[    1.781118] Call trace:
[    1.783557]  __video_register_device+0x70/0x1524
[    1.788160]  vpu_probe+0x2e4/0x9cc
[    1.791546]  platform_drv_probe+0x4c/0xb0
[    1.795540]  really_probe+0x1c4/0x2d0
[    1.799188]  driver_probe_device+0x58/0xfc
[    1.803271]  __device_attach_driver+0x90/0xac
[    1.807619]  bus_for_each_drv+0x68/0xbc
[    1.811439]  __device_attach+0xe0/0x138
[    1.815260]  device_initial_probe+0x10/0x18
[    1.819429]  bus_probe_device+0x90/0x98
[    1.823252]  deferred_probe_work_func+0x70/0xa4
[    1.827775]  process_one_work+0x13c/0x2b4
[    1.831766]  worker_thread+0x35c/0x3e4
[    1.835506]  kthread+0xf8/0x124
[    1.838633]  ret_from_fork+0x10/0x18
[    1.842193] ---[ end trace ee5db4b471a8d91f ]---

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25 15:47:36 +08:00
Dong Aisheng 937fff6194 MLK-21985-2 vpu: malone: b0: fix build for next 20190607 upgrade
Due to below commit:
7e98b7b542 ("media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap, out}_mplane")

We met the following build error:
../drivers/mxc/vpu_malone/vpu_b0.c:1721:2: error: unknown field ‘vidioc_enum_fmt_vid_cap_mplane’ specified in initializer
  .vidioc_enum_fmt_vid_cap_mplane = v4l2_ioctl_enum_fmt_vid_cap_mplane,
  ^
../drivers/mxc/vpu_malone/vpu_b0.c:1722:2: error: unknown field ‘vidioc_enum_fmt_vid_out_mplane’ specified in initializer
  .vidioc_enum_fmt_vid_out_mplane = v4l2_ioctl_enum_fmt_vid_out_mplane,

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25 15:47:35 +08:00
Zhou Peng fbfef11442 vpu: malone decoder: porting from 4.19 rc3 release
Fix build error for kernel 5.x:
- power domain adjustment
  use dev_pm_domain_attach_by_name()/device_link_add
- remove sc fw api
  comment fuse related function
- definition of vb2_qbuf() changed
  set 'media_device' for vb2_qbuf()
- 'vidioc_g_crop' removed
  comment function 'v4l2_ioctl_g_crop'

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:33 +08:00
Zhou Peng 79a1c026fa vpu: malone decoder: porting from 4.19 rc3 release
updating source in drivers/mxc/vpu_malone

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:32 +08:00
Dong Aisheng 5c1f0bf1e6 vpu: malone: fix build failure
../drivers/mxc/vpu_malone/vpu_b0.c: In function ‘v4l2_ioctl_qbuf’:
../drivers/mxc/vpu_malone/vpu_b0.c:920:8: warning: passing argument 2 of ‘vb2_qbuf’ from incompatible pointer type
  ret = vb2_qbuf(&q_data->vb2_q, buf);
        ^
In file included from ../include/media/v4l2-mem2mem.h:20:0,
                 from ../drivers/mxc/vpu_malone/vpu_b0.c:47:
../include/media/videobuf2-v4l2.h:144:5: note: expected ‘struct media_device *’ but argument is of type ‘struct v4l2_buffer *’
 int vb2_qbuf(struct vb2_queue *q, struct media_device *mdev,
     ^
../drivers/mxc/vpu_malone/vpu_b0.c:920:8: error: too few arguments to function ‘vb2_qbuf’
  ret = vb2_qbuf(&q_data->vb2_q, buf);
        ^
In file included from ../include/media/v4l2-mem2mem.h:20:0,
                 from ../drivers/mxc/vpu_malone/vpu_b0.c:47:
../include/media/videobuf2-v4l2.h:144:5: note: declared here
 int vb2_qbuf(struct vb2_queue *q, struct media_device *mdev,
     ^
../drivers/mxc/vpu_malone/vpu_b0.c: At top level:
../drivers/mxc/vpu_malone/vpu_b0.c:1150:2: error: unknown field ‘vidioc_g_crop’ specified in initializer
  .vidioc_g_crop                  = v4l2_ioctl_g_crop,

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25 15:47:30 +08:00
Zhou Peng 95b1763c0a Add Malone decoder and windsor encoder for QXP/QM
Add vpu driver:
drivers/mxc/vpu_malone
drivers/mxc/vpu_windsor

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
2019-11-25 15:47:27 +08:00