Skip to content
Snippets Groups Projects
Select Git revision
  • 77e63534d679e281bf200dd9ee2a422bd4865a2b
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

map_perf_test_user.c

Blame
  • virtio_camera.h 1.61 KiB
    /* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
    /*
     * Virtio Camera Device
     *
     * Copyright © 2022 Collabora, Ltd.
     */
    
    #ifndef _LINUX_VIRTIO_CAMERA_H
    #define _LINUX_VIRTIO_CAMERA_H
    
    #include "standard-headers/linux/types.h"
    
    enum virtio_camera_ctrl_type {
    	VIRTIO_CAMERA_CMD_GET_FORMAT = 0x1,
    	VIRTIO_CAMERA_CMD_SET_FORMAT,
    	VIRTIO_CAMERA_CMD_TRY_FORMAT,
    	VIRTIO_CAMERA_CMD_ENUM_FORMAT,
    	VIRTIO_CAMERA_CMD_ENUM_SIZE,
    	VIRTIO_CAMERA_CMD_CREATE_BUFFER,
    	VIRTIO_CAMERA_CMD_DESTROY_BUFFER,
    	VIRTIO_CAMERA_CMD_ENQUEUE_BUFFER,
    	VIRTIO_CAMERA_CMD_STREAM_ON,
    	VIRTIO_CAMERA_CMD_STREAM_OFF,
    
    	VIRTIO_CAMERA_CMD_RESP_OK_NODATA = 0x100,
    
    	VIRTIO_CAMERA_CMD_RESP_ERR_UNSPEC = 0x200,
    	VIRTIO_CAMERA_CMD_RESP_ERR_BUSY = 0x201,
    	VIRTIO_CAMERA_CMD_RESP_ERR_OUT_OF_MEMORY = 0x202,
    };
    
    struct virtio_camera_config {
    	uint8_t name[256];
    };
    
    struct virtio_camera_mem_entry {
    	uint64_t addr;
    	uint32_t length;
    };
    
    struct virtio_camera_ctrl_hdr {
    	uint32_t cmd;
    	uint32_t index;
    };
    
    struct virtio_camera_format_size {
    	union {
    		uint32_t min_width;
    		uint32_t width;
    	};
    	uint32_t max_width;
    	uint32_t step_width;
    
    	union {
    		uint32_t min_height;
    		uint32_t height;
    	};
    	uint32_t max_height;
    	uint32_t step_height;
    	uint32_t stride;
    	uint32_t sizeimage;
    };
    
    struct virtio_camera_req_format {
    	uint32_t pixelformat;
    	struct virtio_camera_format_size size;
    };
    
    struct virtio_camera_req_buffer {
    	uint32_t num_entries;
    	uint8_t uuid[16];
    };
    
    struct virtio_camera_op_ctrl_req {
    	struct virtio_camera_ctrl_hdr header;
    
    	union {
    		struct virtio_camera_req_format format;
    		struct virtio_camera_req_buffer buffer;
    		uint64_t padding[3];
    	} u;
    };
    
    #endif