XenevaOS
Loading...
Searching...
No Matches
drm_simple_kms_helper.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (C) 2016 Noralf Trønnes
4 */
5
6/*
7 * Simple KMS helpers are deprected in favor of regular atomic helpers. Do not
8 * use the min new code.
9 */
10
11#ifndef __LINUX_DRM_SIMPLE_KMS_HELPER_H
12#define __LINUX_DRM_SIMPLE_KMS_HELPER_H
13
14#include <drm/drm_crtc.h>
15#include <drm/drm_encoder.h>
16#include <drm/drm_plane.h>
17
19
22 const struct drm_display_mode *mode);
23 void (*enable)(struct drm_simple_display_pipe *pipe,
24 struct drm_crtc_state *crtc_state,
25 struct drm_plane_state *plane_state);
26 void (*disable)(struct drm_simple_display_pipe *pipe);
27 int (*check)(struct drm_simple_display_pipe *pipe,
28 struct drm_plane_state *plane_state,
29 struct drm_crtc_state *crtc_state);
30 void (*update)(struct drm_simple_display_pipe *pipe,
31 struct drm_plane_state *old_plane_state);
33 struct drm_plane_state *plane_state);
34 void (*cleanup_fb)(struct drm_simple_display_pipe *pipe,
35 struct drm_plane_state *plane_state);
37 struct drm_plane_state *new_plane_state);
39 struct drm_plane_state *plane_state);
42 void (*reset_crtc)(struct drm_simple_display_pipe *pipe);
43 struct drm_crtc_state * (*duplicate_crtc_state)(struct drm_simple_display_pipe *pipe);
45 struct drm_crtc_state *crtc_state);
46 void (*reset_plane)(struct drm_simple_display_pipe *pipe);
47 struct drm_plane_state * (*duplicate_plane_state)(struct drm_simple_display_pipe *pipe);
49 struct drm_plane_state *plane_state);
50};
51
60
62 struct drm_bridge *bridge);
63
65 struct drm_simple_display_pipe *pipe,
67 const uint32_t *formats, unsigned int format_count,
69 struct drm_connector *connector);
70
72 struct drm_encoder *encoder,
73 int encoder_type);
74
76 size_t offset, int encoder_type);
77
78#define drmm_simple_encoder_alloc(dev, type, member, encoder_type) \
79 ((type *)__drmm_simple_encoder_alloc(dev, sizeof(type), \
80 offsetof(type, member), \
81 encoder_type))
82
83#endif /* __LINUX_DRM_SIMPLE_KMS_HELPER_H */
unsigned int uint32_t
Definition acefiex.h:163
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
size_t size
Definition drm_bridge.h:1299
size_t size_t const struct drm_bridge_funcs * funcs
Definition drm_bridge.h:1300
size_t size_t offset
Definition drm_bridge.h:1299
struct drm_encoder * encoder
Definition drm_encoder.h:211
struct drm_encoder const struct drm_encoder_funcs int encoder_type
Definition drm_encoder.h:213
drm_mode_status
Definition drm_modes.h:91
struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t unsigned int const uint64_t * format_modifiers
Definition drm_plane.h:833
struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t unsigned int format_count
Definition drm_plane.h:832
struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t * formats
Definition drm_plane.h:831
const struct device * dev
Definition drm_print.h:519
int drm_simple_display_pipe_init(struct drm_device *dev, struct drm_simple_display_pipe *pipe, const struct drm_simple_display_pipe_funcs *funcs, const uint32_t *formats, unsigned int format_count, const uint64_t *format_modifiers, struct drm_connector *connector)
int drm_simple_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, int encoder_type)
int drm_simple_display_pipe_attach_bridge(struct drm_simple_display_pipe *pipe, struct drm_bridge *bridge)
void * __drmm_simple_encoder_alloc(struct drm_device *dev, size_t size, size_t offset, int encoder_type)
Definition drm_bridge.h:1100
Definition drm_connector.h:1998
Definition drm_crtc.h:81
Definition drm_crtc.h:955
Definition drm_device.h:75
Definition drm_modes.h:252
Definition drm_encoder.h:106
Definition drm_plane.h:54
Definition drm_plane.h:641
Definition drm_simple_kms_helper.h:20
void(* disable_vblank)(struct drm_simple_display_pipe *pipe)
Definition drm_simple_kms_helper.h:41
void(* destroy_plane_state)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state)
Definition drm_simple_kms_helper.h:48
void(* reset_crtc)(struct drm_simple_display_pipe *pipe)
Definition drm_simple_kms_helper.h:42
void(* end_fb_access)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state)
Definition drm_simple_kms_helper.h:38
enum drm_mode_status(* mode_valid)(struct drm_simple_display_pipe *pipe, const struct drm_display_mode *mode)
Definition drm_simple_kms_helper.h:21
void(* disable)(struct drm_simple_display_pipe *pipe)
Definition drm_simple_kms_helper.h:26
void(* enable)(struct drm_simple_display_pipe *pipe, struct drm_crtc_state *crtc_state, struct drm_plane_state *plane_state)
Definition drm_simple_kms_helper.h:23
void(* reset_plane)(struct drm_simple_display_pipe *pipe)
Definition drm_simple_kms_helper.h:46
void(* destroy_crtc_state)(struct drm_simple_display_pipe *pipe, struct drm_crtc_state *crtc_state)
Definition drm_simple_kms_helper.h:44
int(* enable_vblank)(struct drm_simple_display_pipe *pipe)
Definition drm_simple_kms_helper.h:40
void(* cleanup_fb)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state)
Definition drm_simple_kms_helper.h:34
void(* update)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *old_plane_state)
Definition drm_simple_kms_helper.h:30
int(* check)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state, struct drm_crtc_state *crtc_state)
Definition drm_simple_kms_helper.h:27
int(* prepare_fb)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state)
Definition drm_simple_kms_helper.h:32
int(* begin_fb_access)(struct drm_simple_display_pipe *pipe, struct drm_plane_state *new_plane_state)
Definition drm_simple_kms_helper.h:36
Definition drm_simple_kms_helper.h:52
struct drm_connector * connector
Definition drm_simple_kms_helper.h:56
const struct drm_simple_display_pipe_funcs * funcs
Definition drm_simple_kms_helper.h:58
struct drm_plane plane
Definition drm_simple_kms_helper.h:54
struct drm_encoder encoder
Definition drm_simple_kms_helper.h:55
struct drm_crtc crtc
Definition drm_simple_kms_helper.h:53
#define mode(x)