XenevaOS
Loading...
Searching...
No Matches
drm_mode_object.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Intel Corporation
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
13 *
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THIS SOFTWARE.
21 */
22
23#ifndef __DRM_MODESET_H__
24#define __DRM_MODESET_H__
25
26#include <linux/kref.h>
27#include <drm/drm_lease.h>
29struct drm_property;
30struct drm_device;
31struct drm_file;
32
62
63#define DRM_OBJECT_MAX_PROPERTY 64
108
109/* Avoid boilerplate. I'm tired of typing. */
110#define DRM_ENUM_NAME_FN(fnname, list) \
111 const char *fnname(int val) \
112 { \
113 int i; \
114 for (i = 0; i < ARRAY_SIZE(list); i++) { \
115 if (list[i].type == val) \
116 return list[i].name; \
117 } \
118 return "(unknown)"; \
119 }
120
122 struct drm_file *file_priv,
126
128 struct drm_property *property,
129 uint64_t val);
131 struct drm_property *property,
132 uint64_t *value);
134 struct drm_property *property,
135 uint64_t *val);
137 struct drm_property *property,
138 uint64_t *val);
139
141 struct drm_property *property,
142 uint64_t init_val);
143
145#endif
unsigned int uint32_t
Definition acefiex.h:163
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
int drm_object_property_get_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t *value)
int drm_object_property_set_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t val)
int drm_object_property_get_default_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t *val)
#define DRM_OBJECT_MAX_PROPERTY
Definition drm_mode_object.h:63
bool drm_mode_object_lease_required(uint32_t type)
void drm_object_attach_property(struct drm_mode_object *obj, struct drm_property *property, uint64_t init_val)
void drm_mode_object_put(struct drm_mode_object *obj)
void drm_mode_object_get(struct drm_mode_object *obj)
int drm_object_immutable_property_get_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t *val)
struct drm_mode_object * drm_mode_object_find(struct drm_device *dev, struct drm_file *file_priv, uint32_t id, uint32_t type)
const struct device * dev
Definition drm_print.h:519
Definition drm_device.h:75
Definition drm_file.h:165
Definition drm_mode_object.h:55
uint32_t id
Definition drm_mode_object.h:56
void(* free_cb)(struct kref *kref)
Definition drm_mode_object.h:60
uint32_t type
Definition drm_mode_object.h:57
struct kref refcount
Definition drm_mode_object.h:59
struct drm_object_properties * properties
Definition drm_mode_object.h:58
Definition drm_mode_object.h:67
int count
Definition drm_mode_object.h:73
uint64_t values[DRM_OBJECT_MAX_PROPERTY]
Definition drm_mode_object.h:106
struct drm_property * properties[DRM_OBJECT_MAX_PROPERTY]
Definition drm_mode_object.h:82
Definition drm_property.h:80
Definition kref.h:44