linux/drivers/media/platform/sti/hva/hva-mem.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * Copyright (C) STMicroelectronics SA 2015
   4 * Authors: Yannick Fertre <yannick.fertre@st.com>
   5 *          Hugues Fruchet <hugues.fruchet@st.com>
   6 */
   7
   8#ifndef HVA_MEM_H
   9#define HVA_MEM_H
  10
  11/**
  12 * struct hva_buffer - hva buffer
  13 *
  14 * @name:  name of requester
  15 * @paddr: physical address (for hardware)
  16 * @vaddr: virtual address (kernel can read/write)
  17 * @size:  size of buffer
  18 */
  19struct hva_buffer {
  20        const char              *name;
  21        dma_addr_t              paddr;
  22        void                    *vaddr;
  23        u32                     size;
  24};
  25
  26int hva_mem_alloc(struct hva_ctx *ctx,
  27                  __u32 size,
  28                  const char *name,
  29                  struct hva_buffer **buf);
  30
  31void hva_mem_free(struct hva_ctx *ctx,
  32                  struct hva_buffer *buf);
  33
  34#endif /* HVA_MEM_H */
  35