#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"
#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 { … };
static u32 cdv_intel_lvds_get_max_backlight(struct drm_device *dev)
{ … }
static void cdv_intel_lvds_set_backlight(struct drm_device *dev, int level)
{ … }
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)
{ … }
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 = …;
static bool lvds_is_present_in_vbt(struct drm_device *dev,
u8 *i2c_pin)
{ … }
void cdv_intel_lvds_init(struct drm_device *dev,
struct psb_intel_mode_device *mode_dev)
{ … }