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

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2023 Intel Corporation
 */

#include <drm/intel/i915_pciids.h>
#include <drm/drm_color_mgmt.h>
#include <linux/pci.h>

#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_de.h"
#include "intel_display.h"
#include "intel_display_device.h"
#include "intel_display_params.h"
#include "intel_display_power.h"
#include "intel_display_reg_defs.h"
#include "intel_fbc.h"
#include "intel_step.h"

__diag_push();
__diag_ignore_all("-Woverride-init", "Allow field initialization overrides for display info");

struct stepping_desc {};

#define STEP_INFO(_map)

struct subplatform_desc {};

struct platform_desc {};

#define PLATFORM(_platform)

#define ID(id)

static const struct intel_display_device_info no_display =;

#define PIPE_A_OFFSET
#define PIPE_B_OFFSET
#define PIPE_C_OFFSET
#define PIPE_D_OFFSET
#define CHV_PIPE_C_OFFSET
/*
 * There's actually no pipe EDP. Some pipe registers have
 * simply shifted from the pipe to the transcoder, while
 * keeping their original offset. Thus we need PIPE_EDP_OFFSET
 * to access such registers in transcoder EDP.
 */
#define PIPE_EDP_OFFSET

/* ICL DSI 0 and 1 */
#define PIPE_DSI0_OFFSET
#define PIPE_DSI1_OFFSET

#define TRANSCODER_A_OFFSET
#define TRANSCODER_B_OFFSET
#define TRANSCODER_C_OFFSET
#define CHV_TRANSCODER_C_OFFSET
#define TRANSCODER_D_OFFSET
#define TRANSCODER_EDP_OFFSET
#define TRANSCODER_DSI0_OFFSET
#define TRANSCODER_DSI1_OFFSET

#define CURSOR_A_OFFSET
#define CURSOR_B_OFFSET
#define CHV_CURSOR_C_OFFSET
#define IVB_CURSOR_B_OFFSET
#define IVB_CURSOR_C_OFFSET
#define TGL_CURSOR_D_OFFSET

#define I845_PIPE_OFFSETS

#define I9XX_PIPE_OFFSETS

#define IVB_PIPE_OFFSETS

#define HSW_PIPE_OFFSETS

#define CHV_PIPE_OFFSETS

#define I845_CURSOR_OFFSETS

#define I9XX_CURSOR_OFFSETS

#define CHV_CURSOR_OFFSETS

#define IVB_CURSOR_OFFSETS

#define TGL_CURSOR_OFFSETS

#define I845_COLORS
#define I9XX_COLORS
#define ILK_COLORS
#define IVB_COLORS
#define CHV_COLORS
#define GLK_COLORS
#define ICL_COLORS

#define I830_DISPLAY

#define I845_DISPLAY

static const struct platform_desc i830_desc =;

static const struct platform_desc i845_desc =;

static const struct platform_desc i85x_desc =;

static const struct platform_desc i865g_desc =;

#define GEN3_DISPLAY

static const struct platform_desc i915g_desc =;

static const struct platform_desc i915gm_desc =;

static const struct platform_desc i945g_desc =;

static const struct platform_desc i945gm_desc =;

static const struct platform_desc g33_desc =;

static const struct platform_desc pnv_desc =;

#define GEN4_DISPLAY

static const struct platform_desc i965g_desc =;

static const struct platform_desc i965gm_desc =;

static const struct platform_desc g45_desc =;

static const struct platform_desc gm45_desc =;

#define ILK_DISPLAY

static const struct platform_desc ilk_d_desc =;

static const struct platform_desc ilk_m_desc =;

static const struct platform_desc snb_desc =;

static const struct platform_desc ivb_desc =;

static const struct platform_desc vlv_desc =;

static const u16 hsw_ult_ids[] =;

static const u16 hsw_ulx_ids[] =;

static const struct platform_desc hsw_desc =;

static const u16 bdw_ult_ids[] =;

static const u16 bdw_ulx_ids[] =;

static const struct platform_desc bdw_desc =;

static const struct platform_desc chv_desc =;

static const struct intel_display_device_info skl_display =;

static const u16 skl_ult_ids[] =;

static const u16 skl_ulx_ids[] =;

static const enum intel_step skl_steppings[] =;

static const struct platform_desc skl_desc =;

static const u16 kbl_ult_ids[] =;

static const u16 kbl_ulx_ids[] =;

static const enum intel_step kbl_steppings[] =;

static const struct platform_desc kbl_desc =;

static const u16 cfl_ult_ids[] =;

static const u16 cfl_ulx_ids[] =;

static const struct platform_desc cfl_desc =;

static const u16 cml_ult_ids[] =;

static const struct platform_desc cml_desc =;

#define GEN9_LP_DISPLAY

static const enum intel_step bxt_steppings[] =;

static const struct platform_desc bxt_desc =;

static const enum intel_step glk_steppings[] =;

static const struct platform_desc glk_desc =;

#define ICL_DISPLAY

static const u16 icl_port_f_ids[] =;

static const enum intel_step icl_steppings[] =;

static const struct platform_desc icl_desc =;

static const struct intel_display_device_info jsl_ehl_display =;

static const enum intel_step jsl_ehl_steppings[] =;

static const struct platform_desc jsl_desc =;

static const struct platform_desc ehl_desc =;

#define XE_D_DISPLAY

static const u16 tgl_uy_ids[] =;

static const enum intel_step tgl_steppings[] =;

static const enum intel_step tgl_uy_steppings[] =;

static const struct platform_desc tgl_desc =;

static const enum intel_step dg1_steppings[] =;

static const struct platform_desc dg1_desc =;

static const enum intel_step rkl_steppings[] =;

static const struct platform_desc rkl_desc =;

static const u16 adls_rpls_ids[] =;

static const enum intel_step adl_s_steppings[] =;

static const enum intel_step adl_s_rpl_s_steppings[] =;

static const struct platform_desc adl_s_desc =;

#define XE_LPD_FEATURES

static const struct intel_display_device_info xe_lpd_display =;

static const u16 adlp_adln_ids[] =;

static const u16 adlp_rplu_ids[] =;

static const u16 adlp_rplp_ids[] =;

static const enum intel_step adl_p_steppings[] =;

static const enum intel_step adl_p_adl_n_steppings[] =;

static const enum intel_step adl_p_rpl_pu_steppings[] =;

static const struct platform_desc adl_p_desc =;

static const struct intel_display_device_info xe_hpd_display =;

static const u16 dg2_g10_ids[] =;

static const u16 dg2_g11_ids[] =;

static const u16 dg2_g12_ids[] =;

static const enum intel_step dg2_g10_steppings[] =;

static const enum intel_step dg2_g11_steppings[] =;

static const enum intel_step dg2_g12_steppings[] =;

static const struct platform_desc dg2_desc =;

#define XE_LPDP_FEATURES

static const struct intel_display_device_info xe_lpdp_display =;

static const struct intel_display_device_info xe2_lpd_display =;

static const struct intel_display_device_info xe2_hpd_display =;

/*
 * Do not initialize the .info member of the platform desc for GMD ID based
 * platforms. Their display will be probed automatically based on the IP version
 * reported by the hardware.
 */
static const struct platform_desc mtl_desc =;

static const struct platform_desc lnl_desc =;

static const struct platform_desc bmg_desc =;

__diag_pop();

/*
 * Separate detection for no display cases to keep the display id array simple.
 *
 * IVB Q requires subvendor and subdevice matching to differentiate from IVB D
 * GT2 server.
 */
static bool has_no_display(struct pci_dev *pdev)
{}

#define INTEL_DISPLAY_DEVICE(_id, _desc)

static const struct {} intel_display_ids[] =;

static const struct {} gmdid_display_map[] =;

static const struct intel_display_device_info *
probe_gmdid_display(struct drm_i915_private *i915, struct intel_display_ip_ver *ip_ver)
{}

static const struct platform_desc *find_platform_desc(struct pci_dev *pdev)
{}

static const struct subplatform_desc *
find_subplatform_desc(struct pci_dev *pdev, const struct platform_desc *desc)
{}

static enum intel_step get_pre_gmdid_step(struct intel_display *display,
					  const struct stepping_desc *main,
					  const struct stepping_desc *sub)
{}

void intel_display_device_probe(struct drm_i915_private *i915)
{}

void intel_display_device_remove(struct drm_i915_private *i915)
{}

static void __intel_display_device_info_runtime_init(struct drm_i915_private *i915)
{}

void intel_display_device_info_runtime_init(struct drm_i915_private *i915)
{}

void intel_display_device_info_print(const struct intel_display_device_info *info,
				     const struct intel_display_runtime_info *runtime,
				     struct drm_printer *p)
{}

/*
 * Assuming the device has display hardware, should it be enabled?
 *
 * It's an error to call this function if the device does not have display
 * hardware.
 *
 * Disabling display means taking over the display hardware, putting it to
 * sleep, and preventing connectors from being connected via any means.
 */
bool intel_display_device_enabled(struct drm_i915_private *i915)
{}