Skip to content

Commit

Permalink
v4.20.1 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
HailoRT-Automation authored Jan 12, 2025
1 parent d1af769 commit a10524a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common/hailo_ioctl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define HAILO_DRV_VER_MAJOR 4
#define HAILO_DRV_VER_MINOR 20
#define HAILO_DRV_VER_REVISION 0
#define HAILO_DRV_VER_REVISION 1

#define _STRINGIFY_EXPANDED( x ) #x
#define _STRINGIFY_NUMBER( x ) _STRINGIFY_EXPANDED(x)
Expand Down
2 changes: 1 addition & 1 deletion download_firmware.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@ECHO OFF

set BASE_URI=https://hailo-hailort.s3.eu-west-2.amazonaws.com
set HRT_VERSION=4.20.0
set HRT_VERSION=4.20.1
set FW_DIR=Hailo8/%HRT_VERSION%/FW
set FW=hailo8_fw.%HRT_VERSION%.bin

Expand Down
2 changes: 1 addition & 1 deletion download_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

readonly BASE_URI="https://hailo-hailort.s3.eu-west-2.amazonaws.com"
readonly HRT_VERSION=4.20.0
readonly HRT_VERSION=4.20.1
readonly FW_AWS_DIR="Hailo8/${HRT_VERSION}/FW"
readonly FW="hailo8_fw.${HRT_VERSION}.bin"

Expand Down
2 changes: 1 addition & 1 deletion download_firmware_hailo10h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

readonly BASE_URI="https://hailo-hailort.s3.eu-west-2.amazonaws.com"
readonly HRT_VERSION=4.20.0
readonly HRT_VERSION=4.20.1
readonly FW_AWS_DIR="Hailo10/${HRT_VERSION}/FW"
readonly list_of_files=(
"image-fs"
Expand Down
12 changes: 5 additions & 7 deletions linux/vdma/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ struct hailo_vdma_buffer *hailo_vdma_buffer_map(struct device *dev,
}
}

if (is_dmabuf_vma(vma)) {
if (IS_ENABLED(HAILO_SUPPORT_MMIO_DMA_MAPPING) &&
(MMIO_AND_NO_PAGES_VMA_MASK == (vma->vm_flags & MMIO_AND_NO_PAGES_VMA_MASK))) {
is_mmio = true;
} else if (is_dmabuf_vma(vma)) {
dev_dbg(dev, "Given vma is backed by dmabuf - creating fd and mapping as dmabuf\n");
buffer_type = HAILO_DMA_DMABUF_BUFFER;
ret = create_fd_from_vma(dev, vma);
Expand All @@ -186,9 +189,7 @@ struct hailo_vdma_buffer *hailo_vdma_buffer_map(struct device *dev,
}

// TODO: is MMIO DMA MAPPINGS STILL needed after dmabuf
if (IS_ENABLED(HAILO_SUPPORT_MMIO_DMA_MAPPING) &&
(MMIO_AND_NO_PAGES_VMA_MASK == (vma->vm_flags & MMIO_AND_NO_PAGES_VMA_MASK)) &&
(HAILO_DMA_DMABUF_BUFFER != buffer_type)) {
if (IS_ENABLED(HAILO_SUPPORT_MMIO_DMA_MAPPING) && is_mmio) {
// user_address represents memory mapped I/O and isn't backed by 'struct page' (only by pure pfn)
if (NULL != low_mem_driver_allocated_buffer) {
// low_mem_driver_allocated_buffer are backed by regular 'struct page' addresses, just in low memory
Expand All @@ -202,9 +203,6 @@ struct hailo_vdma_buffer *hailo_vdma_buffer_map(struct device *dev,
dev_err(dev, "failed to map mmio address %d\n", ret);
goto free_buffer_struct;
}

is_mmio = true;

} else if (HAILO_DMA_DMABUF_BUFFER == buffer_type) {
// Content user_address in case of dmabuf is fd - for now
ret = hailo_map_dmabuf(dev, user_address, direction, &sgt, &dmabuf_info);
Expand Down

0 comments on commit a10524a

Please sign in to comment.