summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2019-11-13staging: exfat: Clean up the namespace pollution part 1Valdis Kletnieks
Everything referenced in the struct fs_func exfat_fs_func is located in that same .c file. Make them static and remove from exfat.h Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 4Valdis Kletnieks
The code simplification from the previous patch rendered a few more routines unreferenced, so heave them over the side as well. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 3Valdis Kletnieks
In this patch, we straighten out most of the cases where the code was testing 'p_fs->vol_type == EXFAT' and '!= EXFAT' There's still some ?: ops and a few places where the code is doing checks for '.' and '..' that require looking at, but those are future patches Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 2Valdis Kletnieks
Remove no longer referenced FAT/VFAT routines. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 1Valdis Kletnieks
Remove the top-level mount functionality, to make this driver handle only exfat file systems. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Correct return codeValdis Kletnieks
Use -ENOTEMPTY rather than -EEXIST for attempting to remove a directory that still has files in it. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Collapse redundant return code translationsValdis Kletnieks
Now that we no longer use odd internal return codes, we can heave the translation code over the side, and just pass the error code back up the call chain. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_SUCCESSValdis Kletnieks
Convert FFS_SUCCESS to 0. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - remove unused codesValdis Kletnieks
There are 6 FFS_* error values not used at all. Remove them. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_ERRORValdis Kletnieks
Convert FFS_ERROR to -EINVAL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_INVALIDFIDValdis Kletnieks
Covert FFS_INVALIDFID to -EINVAL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_EOFValdis Kletnieks
Convert FFS_EOF to return 0 for a zero-length read() as per 'man 2 read'. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_MEDIAERRValdis Kletnieks
Convert FFS_MEDIAERR to (mostly) -ENOENT and -EIO. Some additional code surgery needed to propogate correct error codes upwards. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_FORMATERRValdis Kletnieks
Convert FFS_FORMATERR to -EFSCORRUPTED Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: ordered workqueue should be per ethswIoana Ciornei
Create a different ordered workqueue per dpaa2-ethsw instance. Without this change, we overwrite the global queue and leak memory when probing multiple instances of the driver. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port switchdev blocking notifier per ethswIoana Ciornei
Register a different switchdev blocking notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port switchdev notifier per ethswIoana Ciornei
Register a different switchdev notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port notifier per ethswIoana Ciornei
Register a different net_device notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove unnecessary bracesJavier F. Arias
This patch removes unnecessary braces on single statement blocks or that aren't necessary in any arm of the statement. Issue found by Checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/041503946a1c58111e69579838b184359745d8c1.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove blank lines after an open braceJavier F. Arias
This patch removes blank lines after an open brace. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/847ce59f8429afaac1299794987779d0db54d0be.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove blank lines before a close braceJavier F. Arias
This patch removes blank lines before a close brase. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/369fa1068078d98d658fe5e8fc335df1b22f5238.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove multiple blank linesJavier F. Arias
This patch removes multiple blank lines to solve the warning found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/257b08ad13aa23c2ee53fc333ea3c3f7e3105791.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: most: core: add comments to mutex and spinlock definitionsChristian Gromm
This patch adds a comment to the start_mutex and fifo_lock fields of the most_channel structure definition. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1573566036-2279-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Remove commented codeJavier F. Arias
This patch removes unnecessary commented code. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/1dfda6d22e4a972b9c91c6f56d2dc76603007626.1573219728.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: most: block module removal while having active configfs itemsChristian Gromm
This patch avoids that core component modules are being unloaded while the related configfs interface has active items in its directories. It is needed to prevent the situation where the core module cannot be unloaded anymore, because the reference count 'used by' indicates that the module is still being used and the usage count cannot be decreased by calling rmdir, as the configfs directory has already been removed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1573230068-27658-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: most: configfs: move configfs subsystems to container structChristian Gromm
This patch moves the declarations of the configfs subsystems to a superordinate container structure. This is done to get access to private subsystem data. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1573230068-27658-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Drop ACPI device idsHans de Goede
The driver only binds by SDIO device-ids, all the ACPI device-id does is causing the driver to load unnecessarily on devices where the DSDT contains a bogus OBDA8723 device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191111113846.24940-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-idsHans de Goede
Add 024c:0525 to the list of SDIO device-ids, based on a patch found in the Android X86 kernels. According to that patch this device id is used on the Alcatel Plus 10 device. Reported-and-tested-by: youling257 <youling257@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191111113846.24940-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8192u: Fix typo in commentXianting Tian
Fix the typo "cheked" -> "checked" in comment Signed-off-by: Xianting Tian <xianting_tian@126.com> Link: https://lore.kernel.org/r/1573306614-21490-1-git-send-email-xianting_tian@126.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: wilc1000: fix illegal memory access in wilc_parse_join_bss_param()Ajay Singh
Do not copy the extended supported rates in 'param->supp_rates' if the array is already full with basic rates values. The array size check helped to avoid possible illegal memory access [1] while copying to 'param->supp_rates' array. 1. https://marc.info/?l=linux-next&m=157301720517456&w=2 Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1487400 ("Memory - illegal accesses") Fixes: 4e0b0f42c9c7 ("staging: wilc1000: use struct to pack join parameters for FW") Cc: stable@vger.kernel.org Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Link: https://lore.kernel.org/r/20191106062127.3165-1-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: exfat: use prandom_u32() for i_generationArnd Bergmann
Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191108213257.3097633-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: octeon: fix missing a blank line after declarationValery Ivanov
This patch fixes "WARNING: Missing a blank line after declarations" Issue found by checkpatch.pl Signed-off-by: Valery Ivanov <ivalery111@gmail.com> Link: https://lore.kernel.org/r/20191108142329.GA3192@hwsrv-485799.hostwindsdns.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: wfx: replace uintXX_t to uXX and intXX_t to sXXJules Irenge
Replace uint8_t to u8, uint16_t to u16, uint32_t to u32 int8_t to s8,int16_t to s16 and int32_t to s32 As per recommendation of checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191111133055.214410-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11Merge 5.4-rc7 into staging-nextGreg Kroah-Hartman
We want the staging fixes in here, and it resolves some merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-10media: hantro: Set H264 FIELDPIC_FLAG_E flag correctlyJonas Karlman
The FIELDPIC_FLAG_E bit should be set when field_pic_flag exists in stream, it is currently set based on field_pic_flag of current frame. The PIC_FIELDMODE_E bit is correctly set based on the field_pic_flag. Fix this by setting the FIELDPIC_FLAG_E bit when frame_mbs_only is not set. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: hantro: Remove now unused H264 pic_sizeJonas Karlman
pic_size in hantro_h264_dec_hw_ctx struct is no longer used, lets remove it. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: hantro: Use output buffer width and height for H264 decodingJonas Karlman
Calculations for motion vector buffer offset is based on width and height from the configured output format, lets use the same values for macroblock width and height hw regs. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: hantro: Reduce H264 extra space for motion vectorsJonas Karlman
A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per macroblock with additional 32 bytes on multi-core variants. Memory layout is as follow: +---------------------------+ | Y-plane 256 bytes x MBs | +---------------------------+ | UV-plane 128 bytes x MBs | +---------------------------+ | MV buffer 64 bytes x MBs | +---------------------------+ | MC sync 32 bytes | +---------------------------+ Reduce the extra space allocated now that motion vector buffer offset no longer is based on the extra space. Only allocate extra space for 64 bytes x MBs of motion vector buffer and 32 bytes for multi-core sync. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: hantro: Fix H264 motion vector buffer offsetJonas Karlman
A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per macroblock and is laid out in memory as follow: +---------------------------+ | Y-plane 256 bytes x MBs | +---------------------------+ | UV-plane 128 bytes x MBs | +---------------------------+ | MV buffer 64 bytes x MBs | +---------------------------+ The motion vector buffer offset is currently correct for 4:2:0 because the extra space for motion vectors is overallocated with an extra 64 bytes x MBs. Wrong offset for both destination and motion vector buffer are used for the bottom field of field encoded content, wrong offset is also used for 4:0:0 (monochrome) content. Fix this by setting the motion vector address to the expected 384 bytes x MBs offset for 4:2:0 and 256 bytes x MBs offset for 4:0:0 content. Also use correct destination and motion vector buffer offset for the bottom field of field encoded content. While at it also extend the check for 4:0:0 (monochrome) to include an additional check for High Profile (100). Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: hantro: Fix s_fmt for dynamic resolution changesEzequiel Garcia
Commit 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders") changed the conditions under S_FMT was allowed for OUTPUT CAPTURE buffers. However, and according to the mem-to-mem stateless decoder specification, in order to support dynamic resolution changes, S_FMT should be allowed even if OUTPUT buffers have been allocated. Relax decoder S_FMT restrictions on OUTPUT buffers, allowing a resolution modification, provided the pixel format stays the same. Tested on RK3288 platforms using ChromiumOS Video Decode/Encode Accelerator Unittests. [hverkuil: fix typo: In other -> In order] Fixes: 953aaa1492c53 ("media: rockchip/vpu: Prepare things to support decoders") Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Cc: <stable@vger.kernel.org> # for v5.4 and up Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-10media: cedrus: Increase maximum supported sizeJernej Skrabec
There are few variations of 4k resolutions. The biggest one is 4096x2304 which is also supported by HW. It has also nice property that both width and size are divisible by maximum HEVC CTB size, which is 64. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-11-10media: cedrus: Fix H264 4k supportJernej Skrabec
H264 decoder needs additional or bigger buffers in order to decode 4k videos. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-11-10media: cedrus: Properly signal size in mode registerJernej Skrabec
Mode register also holds information if video width is bigger than 2048 and if it is equal to 4096. Rework cedrus_engine_enable() to properly signal this properties. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09staging: most: Convert to the common vmalloc memallocTakashi Iwai
The recent change (*) in the ALSA memalloc core allows us to drop the special vmalloc-specific allocation and page handling. This patch coverts to the common code. (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation support 7e8edae39fd1: ALSA: pcm: Handle special page mapping in the default mmap handler Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20191108164528.998-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-09media: hantro: Fix picture order count table enableFrancois Buergisser
The picture order count table only makes sense for profiles higher than Baseline. This is confirmed by the H.264 specification (See 8.2.1 Decoding process for picture order count), which clarifies how POC are used for features not present in Baseline. """ Picture order counts are used to determine initial picture orderings for reference pictures in the decoding of B slices, to represent picture order differences between frames or fields for motion vector derivation in temporal direct mode, for implicit mode weighted prediction in B slices, and for decoder conformance checking. """ As a side note, this change matches various vendors downstream codebases, including ChromiumOS and IMX VPU libraries. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Francois Buergisser <fbuergisser@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Tested-by: Boris Brezillon <boris.brezillon@collabora.com> Cc: <stable@vger.kernel.org> # for v5.4 and up Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09media: hantro: Fix motion vectors usage conditionFrancois Buergisser
The setting of the motion vectors usage and the setting of motion vectors address are currently done under different conditions. When decoding pre-recorded videos, this results of leaving the motion vectors address unset, resulting in faulty memory accesses. Fix it by using the same condition everywhere, which matches the profiles that support motion vectors. Fixes: dea0a82f3d22 ("media: hantro: Add support for H264 decoding on G1") Signed-off-by: Francois Buergisser <fbuergisser@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Tested-by: Boris Brezillon <boris.brezillon@collabora.com> Cc: <stable@vger.kernel.org> # for v5.4 and up Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09media: hantro: Fix H264 max frmsize supported on RK3288Jonas Karlman
TRM specify supported image size 48x48 to 4096x2304 at step size 16 pixels, change frmsize max_width/max_height to match TRM at [1]. This patch makes it possible to decode the 4096x2304 sample at [2]. [1] http://www.t-firefly.com/download/firefly-rk3288/docs/TRM/rk3288-chapter-25-video-encoder-decoder-unit-(vcodec).pdf [2] https://4ksamples.com/puppies-bath-in-4k/ Fixes: 760327930e10 ("media: hantro: Enable H264 decoding on rk3288") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Tested-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09media: hantro: Do not reorder H264 scaling listJonas Karlman
Scaling list supplied from userspace should be in matrix order and can be used without applying the inverse scanning process. The HW also only support 8x8 scaling list for the Y component, indices 0 and 1 in the scaling list supplied from userspace. Remove reordering and write the scaling matrix in an order expected by the VPU, also only allocate memory for the two 8x8 lists supported. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09media: cedrus: Use correct H264 8x8 scaling listJonas Karlman
Documentation now defines the expected order of scaling lists, change to use correct indices. Fixes: 6eb9b758e307 ("media: cedrus: Add H264 decoding support") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2019-11-09media: cedrus: Use helpers to access capture queueJernej Skrabec
Accessing capture queue structue directly is not safe. Use helpers for that. Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>