root/drivers/gpu/drm/udl/udl_encoder.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. udl_enc_destroy
  2. udl_encoder_disable
  3. udl_encoder_prepare
  4. udl_encoder_commit
  5. udl_encoder_mode_set
  6. udl_encoder_dpms
  7. udl_encoder_init

   1 // SPDX-License-Identifier: GPL-2.0-only
   2 /*
   3  * Copyright (C) 2012 Red Hat
   4  * based in parts on udlfb.c:
   5  * Copyright (C) 2009 Roberto De Ioris <roberto@unbit.it>
   6  * Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@gmail.com>
   7  * Copyright (C) 2009 Bernie Thompson <bernie@plugable.com>
   8  */
   9 
  10 #include <drm/drm_encoder.h>
  11 #include <drm/drm_modeset_helper_vtables.h>
  12 
  13 #include "udl_drv.h"
  14 
  15 /* dummy encoder */
  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 }

/* [<][>][^][v][top][bottom][index][help] */