mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
12eb90f1ed
Based on 1 normalized pattern(s): this file is subject to the terms and conditions of the gnu general public license v2 see the file copying in the main directory of this archive for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 11 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141333.582369016@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
71 lines
1.6 KiB
C
71 lines
1.6 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (C) 2012 Red Hat
|
|
* based in parts on udlfb.c:
|
|
* Copyright (C) 2009 Roberto De Ioris <roberto@unbit.it>
|
|
* Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@gmail.com>
|
|
* Copyright (C) 2009 Bernie Thompson <bernie@plugable.com>
|
|
*/
|
|
|
|
#include <drm/drmP.h>
|
|
#include <drm/drm_crtc.h>
|
|
#include <drm/drm_crtc_helper.h>
|
|
#include "udl_drv.h"
|
|
|
|
/* dummy encoder */
|
|
static void udl_enc_destroy(struct drm_encoder *encoder)
|
|
{
|
|
drm_encoder_cleanup(encoder);
|
|
kfree(encoder);
|
|
}
|
|
|
|
static void udl_encoder_disable(struct drm_encoder *encoder)
|
|
{
|
|
}
|
|
|
|
static void udl_encoder_prepare(struct drm_encoder *encoder)
|
|
{
|
|
}
|
|
|
|
static void udl_encoder_commit(struct drm_encoder *encoder)
|
|
{
|
|
}
|
|
|
|
static void udl_encoder_mode_set(struct drm_encoder *encoder,
|
|
struct drm_display_mode *mode,
|
|
struct drm_display_mode *adjusted_mode)
|
|
{
|
|
}
|
|
|
|
static void
|
|
udl_encoder_dpms(struct drm_encoder *encoder, int mode)
|
|
{
|
|
}
|
|
|
|
static const struct drm_encoder_helper_funcs udl_helper_funcs = {
|
|
.dpms = udl_encoder_dpms,
|
|
.prepare = udl_encoder_prepare,
|
|
.mode_set = udl_encoder_mode_set,
|
|
.commit = udl_encoder_commit,
|
|
.disable = udl_encoder_disable,
|
|
};
|
|
|
|
static const struct drm_encoder_funcs udl_enc_funcs = {
|
|
.destroy = udl_enc_destroy,
|
|
};
|
|
|
|
struct drm_encoder *udl_encoder_init(struct drm_device *dev)
|
|
{
|
|
struct drm_encoder *encoder;
|
|
|
|
encoder = kzalloc(sizeof(struct drm_encoder), GFP_KERNEL);
|
|
if (!encoder)
|
|
return NULL;
|
|
|
|
drm_encoder_init(dev, encoder, &udl_enc_funcs, DRM_MODE_ENCODER_TMDS,
|
|
NULL);
|
|
drm_encoder_helper_add(encoder, &udl_helper_funcs);
|
|
encoder->possible_crtcs = 1;
|
|
return encoder;
|
|
}
|