Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Copyright (C) 2012 Russell King
0004  *  With inspiration from the i915 driver
0005  *
0006  * This program is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU General Public License version 2 as
0008  * published by the Free Software Foundation.
0009  */
0010 #ifndef DRM_ARMADA_IOCTL_H
0011 #define DRM_ARMADA_IOCTL_H
0012 
0013 #include "drm.h"
0014 
0015 #if defined(__cplusplus)
0016 extern "C" {
0017 #endif
0018 
0019 #define DRM_ARMADA_GEM_CREATE       0x00
0020 #define DRM_ARMADA_GEM_MMAP     0x02
0021 #define DRM_ARMADA_GEM_PWRITE       0x03
0022 
0023 #define ARMADA_IOCTL(dir, name, str) \
0024     DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
0025 
0026 struct drm_armada_gem_create {
0027     __u32 handle;
0028     __u32 size;
0029 };
0030 #define DRM_IOCTL_ARMADA_GEM_CREATE \
0031     ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create)
0032 
0033 struct drm_armada_gem_mmap {
0034     __u32 handle;
0035     __u32 pad;
0036     __u64 offset;
0037     __u64 size;
0038     __u64 addr;
0039 };
0040 #define DRM_IOCTL_ARMADA_GEM_MMAP \
0041     ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap)
0042 
0043 struct drm_armada_gem_pwrite {
0044     __u64 ptr;
0045     __u32 handle;
0046     __u32 offset;
0047     __u32 size;
0048 };
0049 #define DRM_IOCTL_ARMADA_GEM_PWRITE \
0050     ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite)
0051 
0052 #if defined(__cplusplus)
0053 }
0054 #endif
0055 
0056 #endif