1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
// SPDX-License-Identifier: MIT
/*
* Copyright © 2022 Intel Corporation
*/
#ifndef __IGT_CRC_H__
#define __IGT_CRC_H__
#include <stddef.h>
#include <stdint.h>
/**
* SECTION:igt_crc
* @short_description: igt crc tables and calculation functions
* @title: CRC
* @include: igt_crc.h
*
* # Introduction
*
* Providing vendor agnostic crc calculation is useful to avoid code
* duplication. Especially if vendor will decide to do on-gpu crc calculation
* it will need to inject crc table to gpu.
*
* All crc tables are globals to allow direct in-code use.
*/
extern const uint32_t igt_crc32_tab[256];
uint32_t igt_cpu_crc32(const void *buf, size_t size);
#endif
|