Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: media: pci: Update Hailo accelerator device driver to v4.18.0 #6296

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/media/pci/hailo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ hailo_pci-objs += src/pcie.o
hailo_pci-objs += src/fops.o
hailo_pci-objs += src/utils.o
hailo_pci-objs += src/sysfs.o
hailo_pci-objs += src/pci_soc_ioctl.o

hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/fw_validation.o
hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/fw_operation.o
Expand All @@ -18,6 +19,7 @@ hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/vdma_common.o
hailo_pci-objs += $(COMMON_SRC_DIRECTORY)/hailo_resource.o

hailo_pci-objs += $(UTILS_SRC_DIRECTORY)/logs.o
hailo_pci-objs += $(UTILS_SRC_DIRECTORY)/integrated_nnc_utils.o

hailo_pci-objs += $(VDMA_SRC_DIRECTORY)/vdma.o
hailo_pci-objs += $(VDMA_SRC_DIRECTORY)/memory.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/pci/hailo/common/fw_operation.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: MIT
/**
* Copyright (c) 2022 Hailo Technologies Ltd. All rights reserved.
**/
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/pci/hailo/common/fw_operation.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: MIT
/**
* Copyright (c) 2022 Hailo Technologies Ltd. All rights reserved.
**/
Expand Down
10 changes: 6 additions & 4 deletions drivers/media/pci/hailo/common/fw_validation.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: MIT
/**
* Copyright (c) 2019-2022 Hailo Technologies Ltd. All rights reserved.
**/
Expand Down Expand Up @@ -28,16 +28,18 @@
firmware_header_t *firmware_header = NULL;
u32 consumed_firmware_offset = *outer_consumed_firmware_offset;
u32 expected_firmware_magic = 0;

firmware_header = (firmware_header_t *) (firmware_base_address + consumed_firmware_offset);
CONSUME_FIRMWARE(sizeof(firmware_header_t), -EINVAL);

switch (board_type) {
case HAILO_BOARD_TYPE_HAILO8:
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO8;
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO8;

Check failure on line 37 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 37 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
break;
case HAILO_BOARD_TYPE_HAILO10H_LEGACY:

Check failure on line 39 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
case HAILO_BOARD_TYPE_HAILO15:
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO15;
case HAILO_BOARD_TYPE_HAILO10H:

Check failure on line 41 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_HAILO15;

Check failure on line 42 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: code indent should use tabs where possible

Check failure on line 42 in drivers/media/pci/hailo/common/fw_validation.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: please, no spaces at the start of a line
break;
case HAILO_BOARD_TYPE_PLUTO:
expected_firmware_magic = FIRMWARE_HEADER_MAGIC_PLUTO;
Expand Down
5 changes: 2 additions & 3 deletions drivers/media/pci/hailo/common/fw_validation.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
// SPDX-License-Identifier: MIT
/**
* Copyright (c) 2019-2022 Hailo Technologies Ltd. All rights reserved.
**/
Expand All @@ -11,8 +11,7 @@

#define FIRMWARE_HEADER_MAGIC_HAILO8 (0x1DD89DE0)
#define FIRMWARE_HEADER_MAGIC_HAILO15 (0xE905DAAB)
// TODO - HRT-11344 : change fw magic to pluto specific
#define FIRMWARE_HEADER_MAGIC_PLUTO (0xE905DAAB)
#define FIRMWARE_HEADER_MAGIC_PLUTO (0xF94739AB)

#ifndef HAILO_EMULATOR
#define FIRMWARE_WAIT_TIMEOUT_MS (5000)
Expand Down
Loading