blob: 5bb2f2b296a5c5d4b547ea40e73ba7b20bd96508 [file] [log] [blame]
Yalong Liubdcf9122018-01-19 18:35:02 +08001/*
2 * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 */
24
Yalong Liu22dc0a52018-02-22 10:27:20 +080025#ifndef _MESON_DRM_H_
26#define _MESON_DRM_H_
Yalong Liubdcf9122018-01-19 18:35:02 +080027
28#include <stdint.h>
29#include "drm.h"
30
31/**
32 * User-desired buffer creation information structure.
33 *
34 * @size: user-desired memory allocation size.
35 * - this size value would be page-aligned internally.
36 * @flags: user request for setting memory type or cache attributes.
37 * @handle: returned a handle to created gem object.
38 * - this handle will be set by gem module of kernel side.
39 */
Yalong Liu22dc0a52018-02-22 10:27:20 +080040struct drm_meson_gem_create {
Yalong Liubdcf9122018-01-19 18:35:02 +080041 uint64_t size;
42 uint32_t flags;
43 uint32_t handle;
44};
45
Yalong Liu22dc0a52018-02-22 10:27:20 +080046#define DRM_MESON_GEM_CREATE 0x00
Yalong Liubdcf9122018-01-19 18:35:02 +080047
Yalong Liu22dc0a52018-02-22 10:27:20 +080048#define DRM_IOCTL_MESON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
49 DRM_MESON_GEM_CREATE, struct drm_meson_gem_create)
Yalong Liubdcf9122018-01-19 18:35:02 +080050
51#endif