#include "i915_drv.h"
#include "intel_backlight.h"
#include "intel_display_types.h"
#include "intel_dp.h"
#include "intel_dp_aux_backlight.h"
#define INTEL_EDP_HDR_TCON_CAP0 …
#define INTEL_EDP_HDR_TCON_CAP1 …
#define INTEL_EDP_HDR_TCON_2084_DECODE_CAP …
#define INTEL_EDP_HDR_TCON_2020_GAMUT_CAP …
#define INTEL_EDP_HDR_TCON_TONE_MAPPING_CAP …
#define INTEL_EDP_HDR_TCON_SEGMENTED_BACKLIGHT_CAP …
#define INTEL_EDP_HDR_TCON_BRIGHTNESS_NITS_CAP …
#define INTEL_EDP_HDR_TCON_OPTIMIZATION_CAP …
#define INTEL_EDP_HDR_TCON_SDP_COLORIMETRY_CAP …
#define INTEL_EDP_HDR_TCON_SRGB_TO_PANEL_GAMUT_CONVERSION_CAP …
#define INTEL_EDP_HDR_TCON_CAP2 …
#define INTEL_EDP_SDR_TCON_BRIGHTNESS_AUX_CAP …
#define INTEL_EDP_HDR_TCON_CAP3 …
#define INTEL_EDP_HDR_GETSET_CTRL_PARAMS …
#define INTEL_EDP_HDR_TCON_2084_DECODE_ENABLE …
#define INTEL_EDP_HDR_TCON_2020_GAMUT_ENABLE …
#define INTEL_EDP_HDR_TCON_TONE_MAPPING_ENABLE …
#define INTEL_EDP_HDR_TCON_SEGMENTED_BACKLIGHT_ENABLE …
#define INTEL_EDP_HDR_TCON_BRIGHTNESS_AUX_ENABLE …
#define INTEL_EDP_HDR_TCON_SRGB_TO_PANEL_GAMUT_ENABLE …
#define INTEL_EDP_HDR_TCON_SDP_OVERRIDE_AUX …
#define INTEL_EDP_HDR_CONTENT_LUMINANCE …
#define INTEL_EDP_HDR_PANEL_LUMINANCE_OVERRIDE …
#define INTEL_EDP_SDR_LUMINANCE_LEVEL …
#define INTEL_EDP_BRIGHTNESS_NITS_LSB …
#define INTEL_EDP_BRIGHTNESS_NITS_MSB …
#define INTEL_EDP_BRIGHTNESS_DELAY_FRAMES …
#define INTEL_EDP_BRIGHTNESS_PER_FRAME_STEPS …
#define INTEL_EDP_BRIGHTNESS_OPTIMIZATION_0 …
#define INTEL_EDP_TCON_USAGE_MASK …
#define INTEL_EDP_TCON_USAGE_UNKNOWN …
#define INTEL_EDP_TCON_USAGE_DESKTOP …
#define INTEL_EDP_TCON_USAGE_FULL_SCREEN_MEDIA …
#define INTEL_EDP_TCON_USAGE_FULL_SCREEN_GAMING …
#define INTEL_EDP_TCON_POWER_MASK …
#define INTEL_EDP_TCON_POWER_DC …
#define INTEL_EDP_TCON_POWER_AC …
#define INTEL_EDP_TCON_OPTIMIZATION_STRENGTH_MASK …
#define INTEL_EDP_BRIGHTNESS_OPTIMIZATION_1 …
enum intel_dp_aux_backlight_modparam { … };
static bool is_intel_tcon_cap(const u8 tcon_cap[4])
{ … }
static bool
intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
{ … }
static u32
intel_dp_aux_hdr_get_backlight(struct intel_connector *connector, enum pipe pipe)
{ … }
static void
intel_dp_aux_hdr_set_aux_backlight(const struct drm_connector_state *conn_state, u32 level)
{ … }
static bool
intel_dp_in_hdr_mode(const struct drm_connector_state *conn_state)
{ … }
static void
intel_dp_aux_hdr_set_backlight(const struct drm_connector_state *conn_state, u32 level)
{ … }
static void
intel_dp_aux_write_content_luminance(struct intel_connector *connector,
struct hdr_output_metadata *hdr_metadata)
{ … }
static void
intel_dp_aux_fill_hdr_tcon_params(const struct drm_connector_state *conn_state, u8 *ctrl)
{ … }
static void
intel_dp_aux_hdr_enable_backlight(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state, u32 level)
{ … }
static void
intel_dp_aux_hdr_disable_backlight(const struct drm_connector_state *conn_state, u32 level)
{ … }
static const char *dpcd_vs_pwm_str(bool aux)
{ … }
static void
intel_dp_aux_write_panel_luminance_override(struct intel_connector *connector)
{ … }
static int
intel_dp_aux_hdr_setup_backlight(struct intel_connector *connector, enum pipe pipe)
{ … }
static u32 intel_dp_aux_vesa_get_backlight(struct intel_connector *connector, enum pipe unused)
{ … }
static void
intel_dp_aux_vesa_set_backlight(const struct drm_connector_state *conn_state, u32 level)
{ … }
static void
intel_dp_aux_vesa_enable_backlight(const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state, u32 level)
{ … }
static void intel_dp_aux_vesa_disable_backlight(const struct drm_connector_state *old_conn_state,
u32 level)
{ … }
static int intel_dp_aux_vesa_setup_backlight(struct intel_connector *connector, enum pipe pipe)
{ … }
static bool
intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
{ … }
static const struct intel_panel_bl_funcs intel_dp_hdr_bl_funcs = …;
static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = …;
int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
{ … }