Commit Graph

636839 Commits

Author SHA1 Message Date
Marek Szyprowski
9abf75a826 media: s5p-mfc: Move firmware allocation to DMA configure function
To complete DMA memory configuration for MFC device, allocation of the
firmware buffer is needed, because some parameters are dependant on its base
address. Till now, this has been handled in the s5p_mfc_alloc_firmware()
function. This patch moves that logic to s5p_mfc_configure_dma_memory() to
keep DMA memory related operations in a single place. This way
s5p_mfc_alloc_firmware() is simplified and does what it name says. The
other consequence of this change is moving s5p_mfc_alloc_firmware() call
from the s5p_mfc_probe() function to the s5p_mfc_configure_dma_memory().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:21 +01:00
Marek Szyprowski
9e90e7ba71 media: s5p-mfc: Put firmware to private buffer structure
Use s5p_mfc_priv_buf structure for keeping the firmware image. This will
help handling of firmware buffer allocation in the next patches.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:20 +01:00
Marek Szyprowski
17cbc9330d media: s5p-mfc: Move setting DMA max segment size to DMA configure function
Setting DMA max segment size to 32 bit mask is a part of DMA memory
configuration, so move those calls to s5p_mfc_configure_dma_memory()
function.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:18 +01:00
Marek Szyprowski
36bde237ff media: s5p-mfc: Simplify alloc/release private buffer functions
Change parameters for s5p_mfc_alloc_priv_buf() and s5p_mfc_release_priv_buf()
functions. Instead of DMA device pointer and a base, provide common MFC
device structure and memory bank context identifier.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:17 +01:00
Marek Szyprowski
62d3e1dd33 media: s5p-mfc: Replace bank1/bank2 entries with an array
Internal MFC driver device structure contains two entries for keeping
addresses of the DMA memory banks. Replace them with the dma_base[] array
and use defines for accessing particular banks. This will help to simplify
code in the next patches.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:16 +01:00
Marek Szyprowski
f8e4274e47 media: s5p-mfc: Replace mem_dev_* entries with an array
Internal MFC driver device structure contains two pointers to devices used
for DMA memory allocation: mem_dev_l and mem_dev_r. Replace them with the
mem_dev[] array and use defines for accessing particular banks. This will
help to simplify code in the next patches.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:16 +01:00
Marek Szyprowski
d02ff86d28 media: s5p-mfc: Use generic of_device_get_match_data helper
Replace custom code with generic helper to retrieve driver data.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Reviewed-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:14 +01:00
Marek Szyprowski
7326933ab3 media: s5p-mfc: Remove unused structures and dead code
Remove unused structures, definitions and functions that are no longer
called from the driver code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Smitha T Murthy <smitha.t@samsung.com>
Reviewed-by: Smitha T Murthy <smitha.t@samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:13 +01:00
Marek Szyprowski
10b8acb88f media: s5p-mfc: Fix initialization of internal structures
Initialize members of the internal device and context structures as early
as possible to avoid access to uninitialized objects on initialization
failures. If loading firmware or creating of the hardware instance fails,
driver will access device or context queue in error handling path, which
might not be initialized yet, what causes kernel panic. Fix this by moving
initialization of all static members as early as possible.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: memeka <mihailescu2m@gmail.com>
Signed-off-by: Ard van Breemen <ard@kwaak.net>
2017-03-23 00:48:12 +01:00
Ard van Breemen
477e0bd905 Revert "media: s5p-mfc: Fix initialization of internal structures"
This reverts commit 03d3abd163.
2017-03-22 16:22:13 +01:00
Ard van Breemen
7c96259b0b Revert "Remove unused structures, definitions and functions that are no longer called from the driver code."
This reverts commit f23daeb501.
2017-03-22 16:21:39 +01:00
Ard van Breemen
c536dbe4d0 Revert "Replace custom code with generic helper to retrieve driver data."
This reverts commit 87541760be.
2017-03-22 16:21:21 +01:00
Ard van Breemen
5cc88afcb8 Revert "Internal MFC driver device structure contains two pointers to devices used for DMA memory allocation: mem_dev_l and mem_dev_r. Replace them with the mem_dev[] array and use defines for accessing particular banks. This will help to simplify code in the next patches."
This reverts commit 29faddbeb3.
2017-03-22 16:20:58 +01:00
Ard van Breemen
0608fed2ef Revert "Internal MFC driver device structure contains two entries for keeping addresses of the DMA memory banks. Replace them with the dma_base[] array and use defines for accessing particular banks. This will help to simplify code in the next patches."
This reverts commit fbd8561d49.
2017-03-22 16:20:34 +01:00
Ard van Breemen
8d6048e456 Revert "Change parameters for s5p_mfc_alloc_priv_buf() and s5p_mfc_release_priv_buf() functions. Instead of DMA device pointer and a base, provide common MFC device structure and memory bank context identifier."
This reverts commit 3dafb955c3.
2017-03-22 16:20:02 +01:00
Ard van Breemen
4c2235b346 Revert "Setting DMA max segment size to 32 bit mask is a part of DMA memory configuration, so move those calls to s5p_mfc_configure_dma_memory() function."
This reverts commit fe59dc08f8.
2017-03-22 16:19:45 +01:00
Ard van Breemen
fa608b5883 Revert "Use s5p_mfc_priv_buf structure for keeping the firmware image. This will help handling of firmware buffer allocation in the next patches."
This reverts commit 2d54a695b8.
2017-03-22 16:19:23 +01:00
Ard van Breemen
fe223228b1 Revert "o complete DMA memory configuration for MFC device, allocation of the firmware buffer is needed, because some parameters are dependant on its base address. Till now, this has been handled in the s5p_mfc_alloc_firmware() function. This patch moves that logic to s5p_mfc_configure_dma_memory() to keep DMA memory related operations in a single place. This way s5p_mfc_alloc_firmware() is simplified and does what it name says. The other consequence of this change is moving s5p_mfc_alloc_firmware() call from the s5p_mfc_probe() function to the s5p_mfc_configure_dma_memory()."
This reverts commit bd8e44da9d.
2017-03-22 16:18:44 +01:00
Ard van Breemen
f4a1a0de1a Revert "Once firmware buffer has been converted to use s5p_mfc_priv_buf structure, it is possible to allocate it with existing s5p_mfc_alloc_priv_buf() function. This change will help to reduce code variants in the next patches."
This reverts commit 7866d65955.
2017-03-22 16:18:18 +01:00
Ard van Breemen
252fe43727 Revert "Firmware for MFC v6+ variants is not larger than 400 KiB, so there is no need to allocate a full 1 MiB buffer for it. Reduce it to 512 KiB to keep proper alignment of allocated buffer."
This reverts commit 3b9a20dc3c.
2017-03-22 16:17:50 +01:00
Ard van Breemen
2fceb391ff Revert "Move code for DMA memory configuration with IOMMU into separate function to make it easier to compare what is being done in each case."
This reverts commit 5bd6e8b795.
2017-03-22 16:17:29 +01:00
Ard van Breemen
d7134bc783 Revert "Current MFC driver depends on the fact that when IOMMU is available, the DMA-mapping framework and its IOMMU glue will use first-fit allocator. This was true for ARM architecture, but its not for ARM64 arch. However, in case of MFC v6+ hardware and latest firmware, it turned out that there is no strict requirement for ALL buffers to be allocated on higher addresses than the firmware base. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions."
This reverts commit 2bf9e9f04a.
2017-03-22 16:11:42 +01:00
Ard van Breemen
9329826759 Revert "The main reason for using special configuration of IOMMU domain was the problem with MFC firmware, which failed to operate properly when placed at 0 DMA address. Instead of adding custom code for configuring each variant of IOMMU domain and architecture specific glue code, simply use what arch code provides and if the DMA base address equals zero, skip first 128 KiB to keep required alignment. This patch also make the driver operational on ARM64 architecture, because it no longer depends on ARM specific DMA-mapping and IOMMU glue code functions."
This reverts commit 9a09c76039.
2017-03-22 16:11:03 +01:00
Ard van Breemen
0e95bb5ef6 Revert "It turned out that all versions of MFC v6+ hardware doesn't have a strict requirement for ALL buffers to be allocated on higher addresses than the firmware base like it was documented for MFC v5. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Basing on this fact, the special DMA configuration based on two reserved memory regions is not really needed for MFC v6+ devices, because the memory requirements for the firmware, device and per-context buffers can be fulfilled by the simple probe-time pre-allocated block allocator instroduced in previous patch."
This reverts commit 67d8fdd38d.
2017-03-22 16:10:43 +01:00
Ard van Breemen
4ac8d4b382 Revert "During my research I found that some of the requirements for the memory buffers for MFC v6+ devices were blindly copied from the previous (v5) version and simply turned out to be excessive. The relaxed requirements are applied by the recent patches to the MFC driver and the driver is now fully functional even without the reserved memory blocks for all v6+ variants. This patch removes those reserved memory nodes from all boards having MFC v6+ hardware block."
This reverts commit 7f3f878710.
2017-03-22 16:10:03 +01:00
Mauro (mdrjr) Ribeiro
10348e455c v4l2: fix previous merge
Change-Id: I139321470d4638915b5b17e83d4953282b93bdfe
2017-03-22 10:50:24 -03:00
Mauro (mdrjr) Ribeiro
67d1a7d8c4 defconfig: symlink xu4 defconfig to xu3 defconfig 2017-03-22 10:18:27 -03:00
Mauro (mdrjr) Ribeiro
38ab74ee2d videobuf2: apply owersun patch 2017-03-22 09:58:07 -03:00
Mauro (mdrjr) Ribeiro
5b1a747f2c defconfig: enable BINFMT_MISC and misc usb audio
Change-Id: Id9b9b4d281d75c9f3a6d42b10edebb8bca584d85
2017-03-20 14:45:10 -03:00
Mauro (mdrjr) Ribeiro
22b6127190 Merge branch 'odroidxu4-4.9.y' of github.com:hardkernel/linux into odroidxu4-4.9.y 2017-03-20 08:35:48 -03:00
memeka
d9183cd279 s5p-mfc: Copy timestamp and timecode in encoder 2017-03-20 08:35:22 -03:00
Mauro Ribeiro
e992adaf53 Merge pull request #283 from Emerald-Phoenix/cpuvolt-patch
Enable proper CPU voltage curve to improve thermal throttling
2017-03-17 18:00:26 -07:00
DarkBahamut
c13cd3ad4f arm: dts: odroid: Correct CPU voltage curve 2017-03-18 00:29:05 +00:00
Mauro (mdrjr) Ribeiro
c713a3aa55 defconfig: extend bootloader cmdline and default cmdline
Change-Id: If5a5b31087ffb09e197f36c083ec15347a59292a
jenkins-deb_kernel_5422_4.9-17
2017-03-15 11:25:21 -03:00
Mauro (mdrjr) Ribeiro
fbb0686e33 net/usb: update r8152 to the latest version 2017-03-15 10:16:20 -03:00
Mauro (mdrjr) Ribeiro
44e409fb7b defconfig: lower CMA to 128MB
Change-Id: I41cd95a97b9228d4a3cd27c3717ea95f977857c4
2017-03-15 09:38:59 -03:00
Mauro (mdrjr) Ribeiro
8c71940e1d Merge branch 'odroidxu4-4.9.y' of github.com:hardkernel/linux into odroidxu4-4.9.y 2017-03-15 09:23:58 -03:00
Mauro (mdrjr) Ribeiro
8d5bc1e3ee Merge branch 'odroidxu4-4.9.y' 2017-03-15 09:23:38 -03:00
Mauro Ribeiro
32b77f0b5d Merge "ARM: dts: exynos5422-odroidxu3: clean up gpio-keys nodes" into odroidxu4-4.9.y 2017-03-15 21:22:54 +09:00
Mauro Ribeiro
820722e0aa Merge pull request #281 from mikraus94/patch-1
Allowed logitech game controllers
2017-03-15 09:20:53 -03:00
mikraus94
a47e49a625 Allowed logitech game controllers 2017-03-14 23:11:51 +01:00
Anand Moon
2309ffc7b1 ARM: dts: exynos5422-odroidxu3: clean up gpio-keys nodes
drop interrupt-parent and interrupts property
as it's not used by gpio-keys nodes.

Fixes: f841fe13911e8(ARM: dts: exynos5422-odroidxu3: Enable power key)

Change-Id: Ib07850a6d93dfe964f41d76932c57c99f7aecde1
2017-03-13 16:49:57 +05:30
Anand Moon
2ee821de7c net:wireless:rtl8812au: stop debug logs.
stop flooding of debug logs.

[   11.831873] RTW: module init start
[   11.831887] RTW: rtl8812au v5.1.5_19247.20160830
[   11.832124] RTW:
               usb_endpoint_descriptor(0):
[   11.832133] RTW: bLength=7
[   11.832141] RTW: bDescriptorType=5
[   11.832149] RTW: bEndpointAddress=81
[   11.832157] RTW: wMaxPacketSize=1024
[   11.832166] RTW: bInterval=0
[   11.832174] RTW: RT_usb_endpoint_is_bulk_in = 1
[   11.832182] RTW:
               usb_endpoint_descriptor(1):

Change-Id: I9f23e71247ae37e762e65003ac87934f03196787
2017-03-13 16:19:37 +05:30
Thibault Saunier
67837d4fb6 s5p-mfc: Handle 'v4l2_pix_format:field' in try_fmt and g_fmt
It is required by the standard that the field order is set by the
driver, default to NONE in case any is provided, but we can basically
accept any value provided by the userspace as we will anyway not
be able to do any deinterlacing.

In this patch we also make sure to pass the interlacing mode provided
by userspace from the output to the capture side of the device so
that the information is given back to userspace. This way it can
handle it and potentially deinterlace afterward.

Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>

Series-to: linux-kernel@vger.kernel.org
Series-cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>, Andi Shyti <andi.shyti@samsung.com>, Thibault Saunier <thibault.saunier@osg.samsung.com>, Shuah Khan <shuahkh@osg.samsung.com>, Inki Dae <inki.dae@samsung.com>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, Javier Martinez Canillas <javier@osg.samsung.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Kukjin Kim <kgene@kernel.org>, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki <s.nawrocki@samsung.com>, linux-media@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>, linux-arm-kernel@lists.infradead.org, Ulf Hansson <ulf.hansson@linaro.org>
Cover-letter:
Fixes for colorspace logic in exynos-gsc and s5p-mfc drivers

Hello,

This patchset fixes a few issues on the colorspace logic for the exynos-gsc
and s5p-mfc drivers.

We now handle the colorspace in those drivers, and make sure to respect user setting if
possible.

We also now set the 'v4l2_pix_format:field' if userspace passed ANY, and
replicate users value on the capture side.

This is the sixth version of the patch serie.

Best regards,

Thibault Saunier
END

Series-version: 6
Series-changes: 2
- Fix a silly build error that slipped in while rebasing the patches

Series-changes: 3
- Do not check values in the g_fmt functions as Andrzej explained in previous review

Series-changes: 5
- Just adapt the field and never error out.

Series-changes: 6
- Pass user output field value to the capture as the device is not
  doing any deinterlacing and thus decoded content will still be
  interlaced on the output.
2017-03-09 11:35:32 -03:00
Thibault Saunier
9403aeaf8a exynos-gsc: Use user configured colorspace if provided
Use colorspace provided by the user as we are only doing scaling and
color encoding conversion, we won't be able to transform the colorspace
itself and the colorspace won't mater in that operation.

Also always use output colorspace on the capture side.

If the user does not provide a colorspace do no make it up, we might
later while processing need to figure out the colorspace, which
is possible depending on the frame size but do not ever guess and
leak that guess to the userspace.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

Series-changes: 3
- Do not check values in the g_fmt functions as Andrzej explained in previous review
- Added 'Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>'

Series-changes: 4
- Reword commit message to better back our assumptions on specifications

Series-changes: 5
- Squash commit to always use output colorspace on the capture side
  inside this one
- Fix typo in commit message

Series-changes: 6
- Do not ever guess colorspace
2017-03-09 11:35:29 -03:00
Marek Szyprowski
7f3f878710 During my research I found that some of the requirements for the memory buffers for MFC v6+ devices were blindly copied from the previous (v5) version and simply turned out to be excessive. The relaxed requirements are applied by the recent patches to the MFC driver and the driver is now fully functional even without the reserved memory blocks for all v6+ variants. This patch removes those reserved memory nodes from all boards having MFC v6+ hardware block.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
67d8fdd38d It turned out that all versions of MFC v6+ hardware doesn't have a strict requirement for ALL buffers to be allocated on higher addresses than the firmware base like it was documented for MFC v5. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions. Basing on this fact, the special DMA configuration based on two reserved memory regions is not really needed for MFC v6+ devices, because the memory requirements for the firmware, device and per-context buffers can be fulfilled by the simple probe-time pre-allocated block allocator instroduced in previous patch.
This patch enables support for such pre-allocated block based allocator
always for MFC v6+ devices. Due to the limitations of the memory management
subsystem the largest supported size of the pre-allocated buffer when no
CMA (Contiguous Memory Allocator) is enabled is 4MiB.

This patch also removes the requirement to provide two reserved memory
regions for MFC v6+ devices in device tree. Now the driver is fully
functional without them.

Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
9a09c76039 The main reason for using special configuration of IOMMU domain was the problem with MFC firmware, which failed to operate properly when placed at 0 DMA address. Instead of adding custom code for configuring each variant of IOMMU domain and architecture specific glue code, simply use what arch code provides and if the DMA base address equals zero, skip first 128 KiB to keep required alignment. This patch also make the driver operational on ARM64 architecture, because it no longer depends on ARM specific DMA-mapping and IOMMU glue code functions.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
2bf9e9f04a Current MFC driver depends on the fact that when IOMMU is available, the DMA-mapping framework and its IOMMU glue will use first-fit allocator. This was true for ARM architecture, but its not for ARM64 arch. However, in case of MFC v6+ hardware and latest firmware, it turned out that there is no strict requirement for ALL buffers to be allocated on higher addresses than the firmware base. This requirement is true only for the device and per-context buffers. All video data buffers can be allocated anywhere for all MFC v6+ versions.
Such relaxed requirements for the memory buffers can be easily fulfilled
by allocating firmware, device and per-context buffers from the probe-time
preallocated larger buffer. This patch adds support for it. This way the
driver finally works fine on ARM64 architecture. The size of the
preallocated buffer is 8 MiB, what is enough for three instances H264
decoders or encoders (other codecs have smaller memory requirements).
If one needs more for particular use case, one can use "mem" module
parameter to force larger (or smaller) buffer (for example by adding
"s5p_mfc.mem=16M" to kernel command line).

Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00
Marek Szyprowski
5bd6e8b795 Move code for DMA memory configuration with IOMMU into separate function to make it easier to compare what is being done in each case.
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Reviewed-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Tested-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Signed-off-by: memeka <mihailescu2m@gmail.com>
2017-03-09 10:30:36 -03:00