linux/drivers/gpu/drm/gma500/cdv_intel_lvds.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright © 2006-2011 Intel Corporation
 *
 * Authors:
 *	Eric Anholt <[email protected]>
 *	Dave Airlie <[email protected]>
 *	Jesse Barnes <[email protected]>
 */

#include <linux/dmi.h>
#include <linux/i2c.h>
#include <linux/pm_runtime.h>

#include <drm/drm_crtc_helper.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_simple_kms_helper.h>

#include "cdv_device.h"
#include "intel_bios.h"
#include "power.h"
#include "psb_drv.h"
#include "psb_intel_drv.h"
#include "psb_intel_reg.h"

/*
 * LVDS I2C backlight control macros
 */
#define BRIGHTNESS_MAX_LEVEL
#define BRIGHTNESS_MASK
#define BLC_I2C_TYPE
#define BLC_PWM_TYPT

#define BLC_POLARITY_NORMAL
#define BLC_POLARITY_INVERSE

#define PSB_BLC_MAX_PWM_REG_FREQ
#define PSB_BLC_MIN_PWM_REG_FREQ
#define PSB_BLC_PWM_PRECISION_FACTOR
#define PSB_BACKLIGHT_PWM_CTL_SHIFT
#define PSB_BACKLIGHT_PWM_POLARITY_BIT_CLEAR

struct cdv_intel_lvds_priv {};

/*
 * Returns the maximum level of the backlight duty cycle field.
 */
static u32 cdv_intel_lvds_get_max_backlight(struct drm_device *dev)
{}

/*
 * Sets the backlight level.
 *
 * level backlight level, from 0 to cdv_intel_lvds_get_max_backlight().
 */
static void cdv_intel_lvds_set_backlight(struct drm_device *dev, int level)
{}

/*
 * Sets the power state for the panel.
 */
static void cdv_intel_lvds_set_power(struct drm_device *dev,
				     struct drm_encoder *encoder, bool on)
{}

static void cdv_intel_lvds_encoder_dpms(struct drm_encoder *encoder, int mode)
{}

static void cdv_intel_lvds_save(struct drm_connector *connector)
{}

static void cdv_intel_lvds_restore(struct drm_connector *connector)
{}

static enum drm_mode_status cdv_intel_lvds_mode_valid(struct drm_connector *connector,
			      struct drm_display_mode *mode)
{}

static bool cdv_intel_lvds_mode_fixup(struct drm_encoder *encoder,
				  const struct drm_display_mode *mode,
				  struct drm_display_mode *adjusted_mode)
{}

static void cdv_intel_lvds_prepare(struct drm_encoder *encoder)
{}

static void cdv_intel_lvds_commit(struct drm_encoder *encoder)
{}

static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder,
				struct drm_display_mode *mode,
				struct drm_display_mode *adjusted_mode)
{}

/*
 * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
 */
static int cdv_intel_lvds_get_modes(struct drm_connector *connector)
{}

static void cdv_intel_lvds_destroy(struct drm_connector *connector)
{}

static int cdv_intel_lvds_set_property(struct drm_connector *connector,
				       struct drm_property *property,
				       uint64_t value)
{}

static const struct drm_encoder_helper_funcs
					cdv_intel_lvds_helper_funcs =;

static const struct drm_connector_helper_funcs
				cdv_intel_lvds_connector_helper_funcs =;

static const struct drm_connector_funcs cdv_intel_lvds_connector_funcs =;

/*
 * Enumerate the child dev array parsed from VBT to check whether
 * the LVDS is present.
 * If it is present, return 1.
 * If it is not present, return false.
 * If no child dev is parsed from VBT, it assumes that the LVDS is present.
 */
static bool lvds_is_present_in_vbt(struct drm_device *dev,
				   u8 *i2c_pin)
{}

/**
 * cdv_intel_lvds_init - setup LVDS connectors on this device
 * @dev: drm device
 * @mode_dev: PSB mode device
 *
 * Create the connector, register the LVDS DDC bus, and try to figure out what
 * modes we can display on the LVDS panel (if present).
 */
void cdv_intel_lvds_init(struct drm_device *dev,
		     struct psb_intel_mode_device *mode_dev)
{}