linux/drivers/gpu/drm/i915/display/intel_display_types.h

/*
 * Copyright (c) 2006 Dave Airlie <[email protected]>
 * Copyright (c) 2007-2008 Intel Corporation
 *   Jesse Barnes <[email protected]>
 *
 * 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.
 */

#ifndef __INTEL_DISPLAY_TYPES_H__
#define __INTEL_DISPLAY_TYPES_H__

#include <linux/i2c.h>
#include <linux/pm_qos.h>
#include <linux/pwm.h>
#include <linux/sched/clock.h>

#include <drm/display/drm_dp_dual_mode_helper.h>
#include <drm/display/drm_dp_mst_helper.h>
#include <drm/display/drm_dp_tunnel.h>
#include <drm/display/drm_dsc.h>
#include <drm/drm_atomic.h>
#include <drm/drm_crtc.h>
#include <drm/drm_encoder.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
#include <drm/drm_vblank.h>
#include <drm/drm_vblank_work.h>
#include <drm/intel/i915_hdcp_interface.h>
#include <media/cec-notifier.h>

#include "gem/i915_gem_object_types.h" /* for to_intel_bo() */
#include "i915_vma.h"
#include "i915_vma_types.h"
#include "intel_bios.h"
#include "intel_display.h"
#include "intel_display_limits.h"
#include "intel_display_power.h"
#include "intel_dpll_mgr.h"
#include "intel_wm_types.h"

struct drm_printer;
struct __intel_global_objs_state;
struct intel_ddi_buf_trans;
struct intel_fbc;
struct intel_connector;
struct intel_tc_port;

/*
 * Display related stuff
 */

/* these are outputs from the chip - integrated only
   external chips are via DVO or SDVO output */
enum intel_output_type {};

enum hdmi_force_audio {};

/* "Broadcast RGB" property */
enum intel_broadcast_rgb {};

struct intel_fb_view {};

struct intel_framebuffer {};

enum intel_hotplug_state {};

struct intel_encoder {};

struct intel_panel_bl_funcs {};

enum drrs_type {};

struct intel_vbt_panel_data {};

struct intel_panel {};

struct intel_digital_port;

enum check_link_response {};

/*
 * This structure serves as a translation layer between the generic HDCP code
 * and the bus-specific code. What that means is that HDCP over HDMI differs
 * from HDCP over DP, so to account for these differences, we need to
 * communicate with the receiver through this shim.
 *
 * For completeness, the 2 buses differ in the following ways:
 *	- DP AUX vs. DDC
 *		HDCP registers on the receiver are set via DP AUX for DP, and
 *		they are set via DDC for HDMI.
 *	- Receiver register offsets
 *		The offsets of the registers are different for DP vs. HDMI
 *	- Receiver register masks/offsets
 *		For instance, the ready bit for the KSV fifo is in a different
 *		place on DP vs HDMI
 *	- Receiver register names
 *		Seriously. In the DP spec, the 16-bit register containing
 *		downstream information is called BINFO, on HDMI it's called
 *		BSTATUS. To confuse matters further, DP has a BSTATUS register
 *		with a completely different definition.
 *	- KSV FIFO
 *		On HDMI, the ksv fifo is read all at once, whereas on DP it must
 *		be read 3 keys at a time
 *	- Aksv output
 *		Since Aksv is hidden in hardware, there's different procedures
 *		to send it over DP AUX vs DDC
 */
struct intel_hdcp_shim {};

struct intel_hdcp {};

struct intel_connector {};

struct intel_digital_connector_state {};

#define to_intel_digital_connector_state(conn_state)

struct dpll {};

struct intel_atomic_state {};

struct intel_plane_state {};

struct intel_initial_plane_config {};

struct intel_scaler {};

struct intel_crtc_scaler_state {};

/* {crtc,crtc_state}->mode_flags */
/* Flag to get scanline using frame time stamps */
#define I915_MODE_FLAG_GET_SCANLINE_FROM_TIMESTAMP
/* Flag to use the scanline counter instead of the pixel counter */
#define I915_MODE_FLAG_USE_SCANLINE_COUNTER
/*
 * TE0 or TE1 flag is set if the crtc has a DSI encoder which
 * is operating in command mode.
 * Flag to use TE from DSI0 instead of VBI in command mode
 */
#define I915_MODE_FLAG_DSI_USE_TE0
/* Flag to use TE from DSI1 instead of VBI in command mode */
#define I915_MODE_FLAG_DSI_USE_TE1
/* Flag to indicate mipi dsi periodic command mode where we do not get TE */
#define I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE
/* Do tricks to make vblank timestamps sane with VRR? */
#define I915_MODE_FLAG_VRR

struct intel_wm_level {};

struct intel_pipe_wm {};

struct skl_wm_level {};

struct skl_plane_wm {};

struct skl_pipe_wm {};

enum vlv_wm_level {};

struct vlv_wm_state {};

struct vlv_fifo_state {};

enum g4x_wm_level {};

struct g4x_wm_state {};

struct intel_crtc_wm_state {};

enum intel_output_format {};

/* Used by dp and fdi links */
struct intel_link_m_n {};

struct intel_csc_matrix {};

struct intel_crtc_state {};

enum intel_pipe_crc_source {};

enum drrs_refresh_rate {};

#define INTEL_PIPE_CRC_ENTRIES_NR
struct intel_pipe_crc {};

struct intel_crtc {};

struct intel_plane {};

struct intel_watermark_params {};

#define to_intel_atomic_state(x)
#define to_intel_crtc(x)
#define to_intel_connector(x)
#define to_intel_encoder(x)
#define to_intel_plane(x)

#define to_intel_crtc_state(crtc_state)
#define to_intel_plane_state(plane_state)
#define to_intel_framebuffer(fb)

#define intel_fb_obj(x)

struct intel_hdmi {};

struct intel_dp_mst_encoder;

struct intel_dp_compliance_data {};

struct intel_dp_compliance {};

struct intel_dp_pcon_frl {};

struct intel_pps {};

struct intel_psr {};

struct intel_dp {};

enum lspcon_vendor {};

struct intel_lspcon {};

struct intel_digital_port {};

struct intel_dp_mst_encoder {};

static inline struct intel_encoder *
intel_attached_encoder(struct intel_connector *connector)
{}

static inline bool intel_encoder_is_dig_port(struct intel_encoder *encoder)
{}

static inline bool intel_encoder_is_mst(struct intel_encoder *encoder)
{}

static inline struct intel_dp_mst_encoder *
enc_to_mst(struct intel_encoder *encoder)
{}

static inline struct intel_digital_port *
enc_to_dig_port(struct intel_encoder *encoder)
{}

static inline struct intel_digital_port *
intel_attached_dig_port(struct intel_connector *connector)
{}

static inline struct intel_hdmi *
enc_to_intel_hdmi(struct intel_encoder *encoder)
{}

static inline struct intel_hdmi *
intel_attached_hdmi(struct intel_connector *connector)
{}

static inline struct intel_dp *enc_to_intel_dp(struct intel_encoder *encoder)
{}

static inline struct intel_dp *intel_attached_dp(struct intel_connector *connector)
{}

static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)
{}

static inline struct intel_lspcon *
enc_to_intel_lspcon(struct intel_encoder *encoder)
{}

static inline struct intel_digital_port *
dp_to_dig_port(struct intel_dp *intel_dp)
{}

static inline struct intel_lspcon *
dp_to_lspcon(struct intel_dp *intel_dp)
{}

static inline struct intel_digital_port *
hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
{}

static inline struct intel_plane_state *
intel_atomic_get_plane_state(struct intel_atomic_state *state,
				 struct intel_plane *plane)
{}

static inline struct intel_plane_state *
intel_atomic_get_old_plane_state(struct intel_atomic_state *state,
				 struct intel_plane *plane)
{}

static inline struct intel_plane_state *
intel_atomic_get_new_plane_state(struct intel_atomic_state *state,
				 struct intel_plane *plane)
{}

static inline struct intel_crtc_state *
intel_atomic_get_old_crtc_state(struct intel_atomic_state *state,
				struct intel_crtc *crtc)
{}

static inline struct intel_crtc_state *
intel_atomic_get_new_crtc_state(struct intel_atomic_state *state,
				struct intel_crtc *crtc)
{}

static inline struct intel_digital_connector_state *
intel_atomic_get_new_connector_state(struct intel_atomic_state *state,
				     struct intel_connector *connector)
{}

static inline struct intel_digital_connector_state *
intel_atomic_get_old_connector_state(struct intel_atomic_state *state,
				     struct intel_connector *connector)
{}

/* intel_display.c */
static inline bool
intel_crtc_has_type(const struct intel_crtc_state *crtc_state,
		    enum intel_output_type type)
{}

static inline bool
intel_crtc_has_dp_encoder(const struct intel_crtc_state *crtc_state)
{}

static inline bool
intel_crtc_needs_modeset(const struct intel_crtc_state *crtc_state)
{}

static inline bool
intel_crtc_needs_fastset(const struct intel_crtc_state *crtc_state)
{}

static inline bool
intel_crtc_needs_color_update(const struct intel_crtc_state *crtc_state)
{}

static inline u32 intel_plane_ggtt_offset(const struct intel_plane_state *plane_state)
{}

static inline struct intel_frontbuffer *
to_intel_frontbuffer(struct drm_framebuffer *fb)
{}

/*
 * Conversion functions/macros from various pointer types to struct
 * intel_display pointer.
 */
#define __drm_device_to_intel_display(p)
#define __device_to_intel_display(p)
#define __pci_dev_to_intel_display(p)
#define __intel_atomic_state_to_intel_display(p)
#define __intel_connector_to_intel_display(p)
#define __intel_crtc_to_intel_display(p)
#define __intel_crtc_state_to_intel_display(p)
#define __intel_digital_port_to_intel_display(p)
#define __intel_dp_to_intel_display(p)
#define __intel_encoder_to_intel_display(p)
#define __intel_hdmi_to_intel_display(p)

/* Helper for generic association. Map types to conversion functions/macros. */
#define __assoc(type, p)

/* Convert various pointer types to struct intel_display pointer. */
#define to_intel_display(p)

#endif /*  __INTEL_DISPLAY_TYPES_H__ */