Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
5685ca0
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
acpi
asm-generic
clocksource
crypto
drm
bridge
i2c
tinydrm
mipi-dbi.h
tinydrm-helpers.h
tinydrm.h
ttm
amd_asic_type.h
ati_pcigart.h
drmP.h
drm_agpsupport.h
drm_atomic.h
drm_atomic_helper.h
drm_auth.h
drm_blend.h
drm_bridge.h
drm_cache.h
drm_client.h
drm_color_mgmt.h
drm_connector.h
drm_crtc.h
drm_crtc_helper.h
drm_debugfs.h
drm_debugfs_crc.h
drm_device.h
drm_displayid.h
drm_dp_dual_mode_helper.h
drm_dp_helper.h
drm_dp_mst_helper.h
drm_drv.h
drm_edid.h
drm_encoder.h
drm_encoder_slave.h
drm_fb_cma_helper.h
drm_fb_helper.h
drm_file.h
drm_fixed.h
drm_flip_work.h
drm_fourcc.h
drm_framebuffer.h
drm_gem.h
drm_gem_cma_helper.h
drm_gem_framebuffer_helper.h
drm_global.h
drm_hashtab.h
drm_hdcp.h
drm_ioctl.h
drm_irq.h
drm_lease.h
drm_legacy.h
drm_mipi_dsi.h
drm_mm.h
drm_mode_config.h
drm_mode_object.h
drm_modes.h
drm_modeset_helper.h
drm_modeset_helper_vtables.h
drm_modeset_lock.h
drm_of.h
drm_os_linux.h
drm_panel.h
drm_pci.h
drm_pciids.h
drm_plane.h
drm_plane_helper.h
drm_prime.h
drm_print.h
drm_property.h
drm_rect.h
drm_scdc_helper.h
drm_simple_kms_helper.h
drm_syncobj.h
drm_sysfs.h
drm_utils.h
drm_vblank.h
drm_vma_manager.h
drm_writeback.h
gma_drm.h
gpu_scheduler.h
i915_component.h
i915_drm.h
i915_pciids.h
intel-gtt.h
intel_lpe_audio.h
spsc_queue.h
dt-bindings
keys
kvm
linux
math-emu
media
memory
misc
net
pcmcia
ras
rdma
scsi
soc
sound
target
trace
uapi
video
xen
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
include
/
drm
/
tinydrm
/
tinydrm.h
Copy path
Blame
Blame
Latest commit
History
History
122 lines (109 loc) · 3.58 KB
Breadcrumbs
linux
/
include
/
drm
/
tinydrm
/
tinydrm.h
Top
File metadata and controls
Code
Blame
122 lines (109 loc) · 3.58 KB
Raw
/* * Copyright (C) 2016 Noralf Trønnes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef __LINUX_TINYDRM_H #define __LINUX_TINYDRM_H #include <drm/drm_gem_cma_helper.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_simple_kms_helper.h> /** * struct tinydrm_device - tinydrm device */ struct tinydrm_device { /** * @drm: DRM device */ struct drm_device *drm; /** * @pipe: Display pipe structure */ struct drm_simple_display_pipe pipe; /** * @dirty_lock: Serializes framebuffer flushing */ struct mutex dirty_lock; /** * @fb_funcs: Framebuffer functions used when creating framebuffers */ const struct drm_framebuffer_funcs *fb_funcs; /** * @fb_dirty: Framebuffer dirty callback */ int (*fb_dirty)(struct drm_framebuffer *framebuffer, struct drm_file *file_priv, unsigned flags, unsigned color, struct drm_clip_rect *clips, unsigned num_clips); }; static inline struct tinydrm_device * pipe_to_tinydrm(struct drm_simple_display_pipe *pipe) { return container_of(pipe, struct tinydrm_device, pipe); } /** * TINYDRM_GEM_DRIVER_OPS - default tinydrm gem operations * * This macro provides a shortcut for setting the tinydrm GEM operations in * the &drm_driver structure. */ #define TINYDRM_GEM_DRIVER_OPS \ .gem_free_object_unlocked = tinydrm_gem_cma_free_object, \ .gem_print_info = drm_gem_cma_print_info, \ .gem_vm_ops = &drm_gem_cma_vm_ops, \ .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \ .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \ .gem_prime_import = drm_gem_prime_import, \ .gem_prime_export = drm_gem_prime_export, \ .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, \ .gem_prime_import_sg_table = tinydrm_gem_cma_prime_import_sg_table, \ .gem_prime_vmap = drm_gem_cma_prime_vmap, \ .gem_prime_vunmap = drm_gem_cma_prime_vunmap, \ .gem_prime_mmap = drm_gem_cma_prime_mmap, \ .dumb_create = drm_gem_cma_dumb_create /** * TINYDRM_MODE - tinydrm display mode * @hd: Horizontal resolution, width * @vd: Vertical resolution, height * @hd_mm: Display width in millimeters * @vd_mm: Display height in millimeters * * This macro creates a &drm_display_mode for use with tinydrm. */ #define TINYDRM_MODE(hd, vd, hd_mm, vd_mm) \ .hdisplay = (hd), \ .hsync_start = (hd), \ .hsync_end = (hd), \ .htotal = (hd), \ .vdisplay = (vd), \ .vsync_start = (vd), \ .vsync_end = (vd), \ .vtotal = (vd), \ .width_mm = (hd_mm), \ .height_mm = (vd_mm), \ .type = DRM_MODE_TYPE_DRIVER, \ .clock = 1 /* pass validation */ void tinydrm_gem_cma_free_object(struct drm_gem_object *gem_obj); struct drm_gem_object * tinydrm_gem_cma_prime_import_sg_table(struct drm_device *drm, struct dma_buf_attachment *attach, struct sg_table *sgt); int devm_tinydrm_init(struct device *parent, struct tinydrm_device *tdev, const struct drm_framebuffer_funcs *fb_funcs, struct drm_driver *driver); int devm_tinydrm_register(struct tinydrm_device *tdev); void tinydrm_shutdown(struct tinydrm_device *tdev); void tinydrm_display_pipe_update(struct drm_simple_display_pipe *pipe, struct drm_plane_state *old_state); int tinydrm_display_pipe_init(struct tinydrm_device *tdev, const struct drm_simple_display_pipe_funcs *funcs, int connector_type, const uint32_t *formats, unsigned int format_count, const struct drm_display_mode *mode, unsigned int rotation); #endif /* __LINUX_TINYDRM_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
You can’t perform that action at this time.