linux/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c

/*
 * Copyright © 2016 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 * Author: Deepak M <m.deepak at intel.com>
 */

#include <drm/drm_mipi_dsi.h>
#include <video/mipi_display.h>

#include "i915_drv.h"
#include "intel_display_types.h"
#include "intel_dsi.h"
#include "intel_dsi_dcs_backlight.h"

#define CONTROL_DISPLAY_BCTRL
#define CONTROL_DISPLAY_DD
#define CONTROL_DISPLAY_BL

#define POWER_SAVE_OFF
#define POWER_SAVE_LOW
#define POWER_SAVE_MEDIUM
#define POWER_SAVE_HIGH
#define POWER_SAVE_OUTDOOR_MODE

#define PANEL_PWM_MAX_VALUE

static u32 dcs_get_backlight(struct intel_connector *connector, enum pipe unused)
{}

static void dcs_set_backlight(const struct drm_connector_state *conn_state, u32 level)
{}

static void dcs_disable_backlight(const struct drm_connector_state *conn_state, u32 level)
{}

static void dcs_enable_backlight(const struct intel_crtc_state *crtc_state,
				 const struct drm_connector_state *conn_state, u32 level)
{}

static int dcs_setup_backlight(struct intel_connector *connector,
			       enum pipe unused)
{}

static const struct intel_panel_bl_funcs dcs_bl_funcs =;

int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector)
{}