This source file includes following definitions.
- udl_enc_destroy
- udl_encoder_disable
- udl_encoder_prepare
- udl_encoder_commit
- udl_encoder_mode_set
- udl_encoder_dpms
- udl_encoder_init
1
2
3
4
5
6
7
8
9
10 #include <drm/drm_encoder.h>
11 #include <drm/drm_modeset_helper_vtables.h>
12
13 #include "udl_drv.h"
14
15
16 static void udl_enc_destroy(struct drm_encoder *encoder)
17 {
18 drm_encoder_cleanup(encoder);
19 kfree(encoder);
20 }
21
22 static void udl_encoder_disable(struct drm_encoder *encoder)
23 {
24 }
25
26 static void udl_encoder_prepare(struct drm_encoder *encoder)
27 {
28 }
29
30 static void udl_encoder_commit(struct drm_encoder *encoder)
31 {
32 }
33
34 static void udl_encoder_mode_set(struct drm_encoder *encoder,
35 struct drm_display_mode *mode,
36 struct drm_display_mode *adjusted_mode)
37 {
38 }
39
40 static void
41 udl_encoder_dpms(struct drm_encoder *encoder, int mode)
42 {
43 }
44
45 static const struct drm_encoder_helper_funcs udl_helper_funcs = {
46 .dpms = udl_encoder_dpms,
47 .prepare = udl_encoder_prepare,
48 .mode_set = udl_encoder_mode_set,
49 .commit = udl_encoder_commit,
50 .disable = udl_encoder_disable,
51 };
52
53 static const struct drm_encoder_funcs udl_enc_funcs = {
54 .destroy = udl_enc_destroy,
55 };
56
57 struct drm_encoder *udl_encoder_init(struct drm_device *dev)
58 {
59 struct drm_encoder *encoder;
60
61 encoder = kzalloc(sizeof(struct drm_encoder), GFP_KERNEL);
62 if (!encoder)
63 return NULL;
64
65 drm_encoder_init(dev, encoder, &udl_enc_funcs, DRM_MODE_ENCODER_TMDS,
66 NULL);
67 drm_encoder_helper_add(encoder, &udl_helper_funcs);
68 encoder->possible_crtcs = 1;
69 return encoder;
70 }