Move code from system sleep pm to runtime pm callbacks to ensure proper
driver state preservation when device is under power domain. Then, use
generic helpers for using runtime pm for system sleep pm.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 29
noticable code reduction. Patches 1-4 should go via exynos drm
kernel tree, while patches 5-6 are aimed for media tree.
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Marek Szyprowski (6):
drm/exynos: fimc: fix system and runtime pm integration
drm/exynos: gsc: fix system
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 29 ++---
1 file changed, 2 insertions(+), 27 deletions
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski
---
drivers/staging/media/s5p-cec/s5p_cec.c | 17 ++---
1 file changed, 2 insertions(+), 15 deletions(-)
diff
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-jpeg/jpeg-core.c | 24
1 file changed, 4 insertions(+), 20 deletions
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 29 ++---
1 file changed, 2 insertions(+), 27 deletions
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski
---
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 26 ++
1 file changed, 2 insertions(+), 24 deletions
Dear All,
This is a set of a few patches for Exynos4-IS driver, which improve clock
management. Those patches are needed for improved runtime pm
management for Exynos clocks driver, which will be posted in a
separate thread.
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
M
There is no need to keep all clocks prepared all the time. Call to
clk_prepare/unprepare can be done on demand from runtime pm callbacks
(it is allowed to call sleeping functions from that context).
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/exynos4-is/fimc-lite.c | 16
This patch adds 3 more clocks to Exynos4 ISP driver. Enabling them is
needed to make the hardware operational. Till now it worked only because
those clocks were registered with IGNORE_UNUSED flag and were enabled
by default after SoC reset.
Signed-off-by: Marek Szyprowski
---
Documentation
FIMC-IS blocks must control 3 more clocks ("gicisp", "mcuctl_isp" and
"pwm_isp") to make the hardware fully operational.
Signed-off-by: Marek Szyprowski
---
arch/arm/boot/dts/exynos4x12.dtsi | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
place custom
reserved memory handling code with generic one")
CC: sta...@vger.kernel.org # v4.7+
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c
b/drivers/medi
Hi Hans,
On 2017-12-15 16:57, Hans Verkuil wrote:
On 14/12/17 15:11, Marek Szyprowski wrote:
I would like to get your opinion on this patch. Do you think it makes sense to:
1. add limited support for USERPTR and DMA-buf import? (limited means driver
will accept setting buffer pointer/fd only
PAGE_KERNEL);
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
to ioremap so that ioremap
can map correct area. Also, this uses __pfn_to_phys() to get the physical
address of given PFN.
Signed-off-by: Masami Hiramatsu
Reported-by: Takao Orito
Reported-by: Fumihiro ATSUMI
Reviewed-by: Marek Szyprowski
---
Chanegs in v2:
- Fix to pass size + off
NERS file.
Reported-by: Joe Perches
Signed-off-by: Marek Szyprowski
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 29c08106bd22..4455fe05d3a3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15720,7 +15720,7 @@ M:
.
>
> Signed-off-by: Myungho Jung
> Reported-by: syzbot+4180ff9ca6810b06c...@syzkaller.appspotmail.com
Acked-by: Marek Szyprowski
Thanks for analyzing the code and fixing this issue!
> ---
> drivers/media/common/videobuf2/videobuf2-core.c | 4
> 1 file changed, 4 insertio
Hi Souptick,
On 2018-11-15 16:50, Souptick Joarder wrote:
> Convert to use vm_insert_range to map range of kernel memory
> to user vma.
>
> Signed-off-by: Souptick Joarder
> Reviewed-by: Matthew Wilcox
Acked-by: Marek Szyprowski
> ---
> drivers/media/common/videobuf2/vi
ign data[] to
ARCH_KMALLOC_MINALIGN").
Reported-by: Paweł Chmiel
Fixes: c79667dd93b0 ("media: s5p-mfc: replace custom reserved memory handling
code with generic one")
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 -
1 file changed, 1 deletion(-)
dif
ptions about the DMA mapping internals. Feel
free to add my:
Reviewed-by: Marek Szyprowski
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
ed only when no IOMMU is available, but I agree that the
hacky code should be replaced by a generic code if possible.
Tested-by: Marek Szyprowski
V4L2 pipeline works fine on older Exynos-based boards with CMA and IOMMU
disabled.
> ---
> .../common/videobuf2/videobuf2-dma-contig.c | 41
Hi Christoph,
On 2019-01-17 18:21, Christoph Hellwig wrote:
> On Mon, Jan 14, 2019 at 01:42:26PM +0100, Marek Szyprowski wrote:
>> On 2019-01-11 19:17, Christoph Hellwig wrote:
>>> vb2_dc_get_userptr pokes into arm direct mapping details to get the
>>> resemblan
usize -= PAGE_SIZE;
> - } while (usize > 0);
> -
> + err = vm_insert_range_buggy(vma, buf->pages, buf->num_pages);
> + if (err) {
> + printk(KERN_ERR "Remapping memory, error: %d\n", err);
> + return err;
> + }
>
> /*
>* Use common vm_area operations to track buffer refcount.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Hi Souptick,
On 2019-01-25 05:55, Souptick Joarder wrote:
> On Tue, Jan 22, 2019 at 8:37 PM Marek Szyprowski
> wrote:
>> On 2019-01-11 16:11, Souptick Joarder wrote:
>>> Convert to use vm_insert_range_buggy to map range of kernel memory
>>> to user vma.
>>&g
pt userspace memory
> causing the application to crash. It's not quite clear to me how the memory
> can
> get corrupted. I don't know enough of those low-level mm internals to
> understand
> the sequence of events.
>
> I have test code for v4l2-compliance available
Hi Hans,
On 2019-06-07 15:40, Hans Verkuil wrote:
> On 6/7/19 2:47 PM, Hans Verkuil wrote:
>> On 6/7/19 2:23 PM, Hans Verkuil wrote:
>>> On 6/7/19 2:14 PM, Marek Szyprowski wrote:
>>>> On 2019-06-07 14:01, Hans Verkuil wrote:
>>>>> On 6/7/19 1:16 PM,
Hi Hans,
On 2019-06-07 16:11, Hans Verkuil wrote:
> On 6/7/19 3:55 PM, Marek Szyprowski wrote:
>> On 2019-06-07 15:40, Hans Verkuil wrote:
>>> On 6/7/19 2:47 PM, Hans Verkuil wrote:
>>>> On 6/7/19 2:23 PM, Hans Verkuil wrote:
>>>>> On 6/7/19 2:14 PM,
Hi Hans,
On 2019-06-11 09:52, Hans Verkuil wrote:
> On 6/7/19 9:43 PM, Nicolas Dufresne wrote:
>> Le vendredi 07 juin 2019 à 16:39 +0200, Marek Szyprowski a écrit :
>>> Hi Hans,
>>>
>>> On 2019-06-07 16:11, Hans Verkuil wrote:
>>>> On 6/7/19 3:55 PM
->num_buffers)
> + return q->bufs[index];
> + return NULL;
> +}
> +
> /*
> * The following functions are not part of the vb2 core API, but are useful
>* functions for videobuf2-*.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
x28)
Exception stack(0xe73ddfa8 to 0xe73ddff0)
...
---[ end trace 376cf5ba6e0bee93 ]---
Fixes: c8ffbd433a77 ("media: s5p-mfc: Use min scratch buffer size as provided
by F/W")
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 ++-
1 file changed, 2 ins
havior of the
driver and fixes its operation on Exynos5420 SoCs.
Fixes: 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling")
Signed-off-by: Marek Szyprowski
---
v2: this is the correct version, v1 had parenthesis in wrong place
---
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 5 +
havior of the
driver and fixes its operation on Exynos5420 SoCs.
Fixes: 1bce6fb3edf1 ("[media] s5p-mfc: Rework clock handling")
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/media/pl
Hi Hans,
On 2019-07-15 12:30, Hans Verkuil wrote:
> Use cec_notifier_cec_adap_(un)register instead of
> cec_notifier_get, cec_notifier_put and cec_register_cec_notifier.
>
> Also enable the CEC_CAP_CONNECTOR_INFO capability.
>
> Signed-off-by: Hans Verkuil
> Cc: Marek Szypro
ly imported and detached again, like Weston is currently
> doing in the DRM compositor.
>
> Signed-off-by: Lucas Stach
Acked-by: Marek Szyprowski
> ---
> v2: Add comments why it is safe to skip the CPU sync.
> ---
> .../common/videobuf2/videobuf2-dma-contig.c | 23
a
> whole buffer from its beginning.
>
> Signed-off-by: Souptick Joarder
Suggested-by: Marek Szyprowski
Reviewed-by: Marek Szyprowski
> ---
> drivers/media/common/videobuf2/videobuf2-core.c| 7 +++
> .../media/common/videobuf2/videobuf2-dma-contig.c | 6 --
>
ma_map_resource
> implementation to not provide a somewhat dangerous default and improve
> the error handling.
>
> Changes since v1:
> - don't apply bus offsets in dma_direct_map_resource
Works fine on older Exynos based boards with IOMMU and CMA disabled.
Tested-by: Marek
.versions = MFC_V6PLUS_BITS,
>> + .flags = V4L2_FMT_FLAG_DYN_RESOLUTION,
>> },
>> {
>> .fourcc = V4L2_PIX_FMT_HEVC,
>> @@ -132,6 +147,8 @@ static struct s5p_mfc_fmt formats[] = {
lho Chehab
Acked-by: Marek Szyprowski
---
drivers/media/v4l2-core/videobuf2-core.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/videobuf2-core.c
b/drivers/media/v4l2-core/videobuf2-core.c
index e6890d47cdcb..c5d49d7a0d76 100644
--- a/drivers/
Hi Rob,
On 2015-12-31 00:25, Rob Herring wrote:
On Wed, Dec 16, 2015 at 9:37 AM, Marek Szyprowski
wrote:
This patch allows device drivers to initialize more than one reserved
memory region assigned to given device. When driver needs to use more
than one reserved memory region, it should
=0x7ff2b07bc500, length=5765760
Fixes: 21fb0cb7ec65 ("[media] vb2: Provide helpers for mapping virtual
addresses")
Reported-by: Albert Antony
Signed-off-by: Ricardo Ribalda Delgado
Acked-by: Marek Szyprowski
---
Maybe we should cc stable.
This error has not pop-out yet because userptr
d-off-by: Marek Szyprowski
---
This patch was posted earlier as a part of
http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/97316
thread, but applying it is really needed to get all Exynos multimedia
drivers working with IOMMU enabled.
Best regards,
Marek Szyprowski
---
dr
All multimedia devices found on Exynos SoCs support only contiguous
buffers, so set DMA max segment size to DMA_BIT_MASK(32) to let memory
allocator to correctly create contiguous memory mappings.
Signed-off-by: Marek Szyprowski
---
This patch was posted earlier as a part of
http
Hello,
On 2016-04-27 14:10, Hans Verkuil wrote:
On 04/27/2016 02:00 PM, Marek Szyprowski wrote:
Add a helper function for device drivers to set DMA's max_seg_size.
Setting it to largest possible value lets DMA-mapping API always create
contiguous mappings in DMA address space. Th
Hello,
On 2016-04-27 14:58, Hans Verkuil wrote:
On 04/27/2016 02:23 PM, Marek Szyprowski wrote:
Hello,
On 2016-04-27 14:10, Hans Verkuil wrote:
On 04/27/2016 02:00 PM, Marek Szyprowski wrote:
Add a helper function for device drivers to set DMA's max_seg_size.
Setting it to la
utex taken. This patch removes taking ->graph_mutex in
driver probe to avoid deadlock. Other drivers don't take ->graph_mutex
for entity registration, so this change should be safe.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s3c-camif/camif-core.c | 12 +++-
1 file
utex taken. This patch removes taking ->graph_mutex in
driver probe to avoid deadlock. Other drivers don't take ->graph_mutex
for entity registration, so this change should be safe.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/exynos4-is/media-dev.c | 13 ++---
1
allocator and shared buffers (in USERPTR or DMAbuf modes
of operations).
Signed-off-by: Marek Szyprowski
---
Hello,
This patch is a follow-up of my previous attempts to let Exynos
multimedia devices to work properly with shared buffers when IOMMU is
enabled:
1. https://www.mail-archive.com/linux
allocator and shared buffers (in USERPTR or DMAbuf modes
of operations).
Signed-off-by: Marek Szyprowski
---
Hello,
This patch is a follow-up of my previous attempts to let Exynos
multimedia devices to work properly with shared buffers when IOMMU is
enabled:
1. https://www.mail-archive.com/linux
Hello,
On 2016-04-28 15:29, Hans Verkuil wrote:
On 04/28/2016 03:20 PM, Marek Szyprowski wrote:
This patch lets vb2-dma-contig memory allocator to configure DMA max
segment size properly for the client device. Setting it is needed to let
DMA-mapping subsystem to create a single, contiguous
Hi Sakari,
On 2016-04-29 13:21, Sakari Ailus wrote:
Hi Marek,
Thanks for the patch!
On Thu, Apr 28, 2016 at 03:20:03PM +0200, Marek Szyprowski wrote:
This patch lets vb2-dma-contig memory allocator to configure DMA max
segment size properly for the client device. Setting it is needed to let
Hi All,
I'm sorry for the late reply, I just got back from holidays.
On 2017-06-02 23:43, Jacek Anaszewski wrote:
Cc Marek Szyprowski.
Marek, could you share your opinion about this patch?
On 06/02/2017 06:02 PM, Thierry Escande wrote:
From: Tony K Nadackal
This patch adds suppor
too. Also change the mailing list from ARM generic to Samsung SoC
specific to get more attention and easier review in the future.
Signed-off-by: Marek Szyprowski
---
MAINTAINERS | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 053c3bdd1fe5
too and add DT bindings file pattern match. Also change the mailing
list from ARM generic to Samsung SoC specific to get more attention and
easier review in the future.
Signed-off-by: Marek Szyprowski
Acked-by: Krzysztof Kozlowski
---
v2:
- added DT bindings file as suggested by Krzysztof Kozlowski
Escande (1):
[media] videobuf2-dc: Move vb2_dc_get_base_sgt() above mmap callbacks
drivers/media/v4l2-core/videobuf2-dma-contig.c | 60 --
1 file changed, 38 insertions(+), 22 deletions(-)
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
ned-off-by: Arvind Yadav
Acked-by: Marek Szyprowski
---
drivers/media/v4l2-core/videobuf2-vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/videobuf2-vmalloc.c
b/drivers/media/v4l2-core/videobuf2-vmalloc.c
index b337d78..6bc130f 100644
---
ned-off-by: Arvind Yadav
Acked-by: Marek Szyprowski
---
drivers/media/v4l2-core/videobuf2-dma-sg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c
b/drivers/media/v4l2-core/videobuf2-dma-sg.c
index 8e8798a..f8b4643 100644
--- a/dri
Signed-off-by: Arvind Yadav
Thanks!
Acked-by: Marek Szyprowski
---
drivers/media/v4l2-core/videobuf2-dma-contig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index 4f246d
Hi Christoph,
On 2017-07-05 19:33, Christoph Hellwig wrote:
On Mon, Jul 03, 2017 at 11:27:32AM +0200, Marek Szyprowski wrote:
The main question here if we want to merge incomplete solution or not. As
for now, there is no support in ARM/ARM64 for NON_CONSISTENT attribute.
Also none of the v4l2
ulk_data *clks)
+{
+}
+
static inline struct clk *clk_get(struct device *dev, const char *id)
{
return NULL;
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
-mfc 1100.codec: Direct firmware load for s5p-mfc-v6-v2.fw failed with
error -2
s5p-mfc 1100.codec: Direct firmware load for s5p-mfc-v6.fw failed with
error -2
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1
fer during reqbufs
drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 17 ++---
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 18 +++---
3 files changed, 23 insertions(+), 14 deletions(-)
Best regards
--
Marek Szyprowsk
e notifier integration for your
st-cec driver as is done for s5p-cec? It would be good to be able to
move st-cec out of staging at the same time.
Thanks for working on this and taking it from by TODO list! :)
Please add:
Tested-by: Marek Szyprowski
If you plan to send an updated version, plea
adead.org/pipermail/linux-arm-kernel/2015-January/317678.html
I'm really sorry.
Acked-by: Marek Szyprowski
---
drivers/media/platform/exynos-gsc/gsc-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c
b/drivers/media/platform
gsc_hw_set_sw_reset(gsc);
+ gsc_wait_reset(gsc);
+ }
vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32));
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the bo
Hi Javier,
On 2017-01-19 15:56, Javier Martinez Canillas wrote:
Thanks a lot for your feedback.
On 01/19/2017 11:17 AM, Marek Szyprowski wrote:
On 2017-01-18 01:30, Javier Martinez Canillas wrote:
Commit 15f90ab57acc ("[media] exynos-gsc: Make driver functional when
CONFIG_PM is
Hi Javier,
On 2017-01-19 18:51, Javier Martinez Canillas wrote:
On 01/19/2017 11:56 AM, Javier Martinez Canillas wrote:
On 01/19/2017 11:17 AM, Marek Szyprowski wrote:
[snip]
Also when removing the exynos_gsc driver, I get the same error:
# rmmod s5p_mfc
[ 106.405972] s5p-mfc 1100
work+0x120/0x31c)
[] (process_one_work) from []
(process_scheduled_works+0x28/0x38)
[] (process_scheduled_works) from []
(worker_thread+0x204/0x4ac)
[] (worker_thread) from [] (kthread+0xfc/0x134)
[] (kthread) from [] (ret_from_fork+0x14/0x3c)
Signed-off-by: Marek Szyprowski
---
drivers/medi
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
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a
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
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 102 ++-
1 file changed, 61 insertions(+), 41
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.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/regs-mfc-v6.h | 2 +-
drivers/media
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
g/patch/39198/
I've tried to split changes into small pieces to make it easier to review
the code. I've also did a bit of cleanup while touching the driver.
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Patch summary:
Marek Szyprowski (15):
media: s5p-mfc: Remove unuse
Replace custom code with generic helper to retrieve driver data.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc.c| 17 ++---
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 4 ++--
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a
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
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
---
drivers/media
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.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc
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
---
drivers
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
---
arch/arm/boot/dts/exynos5250-arndale.dts | 1 -
arch/arm/boot/dts/exynos5250-smdk5250
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
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
---
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2
guous 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
---
Documentation/devicetree/bindings/media/s5p-mfc.tx
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
---
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5.c | 2 +-
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 3
Remove unused structures, definitions and functions that are no longer
called from the driver code.
Signed-off-by: Marek Szyprowski
---
drivers/media/platform/s5p-mfc/s5p_mfc.c| 21 -
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 13 -
drivers/media
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
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 +
1 file changed, 13 insertions(+), 8
Hi Javier,
On 2017-02-17 22:13, Javier Martinez Canillas wrote:
On 02/14/2017 04:52 AM, Marek Szyprowski wrote:
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 i
Remove unused structures, definitions and functions that are no longer
called from the driver code.
Signed-off-by: Marek Szyprowski
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Martinez Canillas
---
drivers/media/platform/s5p-mfc/s5p_mfc.c| 21 -
drivers
g/patch/39198/
I've tried to split changes into small pieces to make it easier to review
the code. I've also did a bit of cleanup while touching the driver.
Best regards
Marek Szyprowski
Samsung R&D Institute Poland
Changelog:
v2:
- fixed issues pointed by Javier Martinez Canillas:
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
Reviewed-by: Javier
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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier
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.
Signed-off-by: Marek Szyprowski
Reviewed-by: Javier Martinez Canillas
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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Martinez Canillas
---
arch/arm/boot/dts
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
guous 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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Mar
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.
Signed-off-by: Marek Szyprowski
Reviewed-by: Javier Martinez Canillas
---
drivers/media/platform/s5p-mfc/regs
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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Martinez Canillas
---
drivers/media/platform/s5p-mfc/s5p_mfc_cmd_v5
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
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
Reviewed-by
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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Martinez Canillas
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 102
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
Reviewed-by: Javier Martinez Canillas
Tested-by: Javier Martinez Canillas
---
drivers/media/platform/s5p-mfc
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
1 - 100 of 975 matches
Mail list logo