#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_connector.h"
#include "intel_crtc.h"
#include "intel_de.h"
#include "intel_display_irq.h"
#include "intel_display_driver.h"
#include "intel_display_types.h"
#include "intel_dpll.h"
#include "intel_hotplug.h"
#include "intel_load_detect.h"
#include "intel_tv.h"
#include "intel_tv_regs.h"
enum tv_margin { … };
struct intel_tv { … };
struct video_levels { … };
struct color_conversion { … };
static const u32 filter_table[] = …;
static const struct color_conversion ntsc_m_csc_composite = …;
static const struct video_levels ntsc_m_levels_composite = …;
static const struct color_conversion ntsc_m_csc_svideo = …;
static const struct video_levels ntsc_m_levels_svideo = …;
static const struct color_conversion ntsc_j_csc_composite = …;
static const struct video_levels ntsc_j_levels_composite = …;
static const struct color_conversion ntsc_j_csc_svideo = …;
static const struct video_levels ntsc_j_levels_svideo = …;
static const struct color_conversion pal_csc_composite = …;
static const struct video_levels pal_levels_composite = …;
static const struct color_conversion pal_csc_svideo = …;
static const struct video_levels pal_levels_svideo = …;
static const struct color_conversion pal_m_csc_composite = …;
static const struct video_levels pal_m_levels_composite = …;
static const struct color_conversion pal_m_csc_svideo = …;
static const struct video_levels pal_m_levels_svideo = …;
static const struct color_conversion pal_n_csc_composite = …;
static const struct video_levels pal_n_levels_composite = …;
static const struct color_conversion pal_n_csc_svideo = …;
static const struct video_levels pal_n_levels_svideo = …;
static const struct color_conversion sdtv_csc_yprpb = …;
static const struct color_conversion hdtv_csc_yprpb = …;
static const struct video_levels component_levels = …;
struct tv_mode { … };
static const struct tv_mode tv_modes[] = …;
struct intel_tv_connector_state { … };
#define to_intel_tv_connector_state(conn_state) …
static struct drm_connector_state *
intel_tv_connector_duplicate_state(struct drm_connector *connector)
{ … }
static struct intel_tv *enc_to_tv(struct intel_encoder *encoder)
{ … }
static struct intel_tv *intel_attached_tv(struct intel_connector *connector)
{ … }
static bool
intel_tv_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe)
{ … }
static void
intel_enable_tv(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *pipe_config,
const struct drm_connector_state *conn_state)
{ … }
static void
intel_disable_tv(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static const struct tv_mode *intel_tv_mode_find(const struct drm_connector_state *conn_state)
{ … }
static enum drm_mode_status
intel_tv_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static int
intel_tv_mode_vdisplay(const struct tv_mode *tv_mode)
{ … }
static void
intel_tv_mode_to_mode(struct drm_display_mode *mode,
const struct tv_mode *tv_mode,
int clock)
{ … }
static void intel_tv_scale_mode_horiz(struct drm_display_mode *mode,
int hdisplay, int left_margin,
int right_margin)
{ … }
static void intel_tv_scale_mode_vert(struct drm_display_mode *mode,
int vdisplay, int top_margin,
int bottom_margin)
{ … }
static void
intel_tv_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{ … }
static bool intel_tv_source_too_wide(struct intel_display *display,
int hdisplay)
{ … }
static bool intel_tv_vert_scaling(const struct drm_display_mode *tv_mode,
const struct drm_connector_state *conn_state,
int vdisplay)
{ … }
static int
intel_tv_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{ … }
static void
set_tv_mode_timings(struct intel_display *display,
const struct tv_mode *tv_mode,
bool burst_ena)
{ … }
static void set_color_conversion(struct intel_display *display,
const struct color_conversion *color_conversion)
{ … }
static void intel_tv_pre_enable(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *pipe_config,
const struct drm_connector_state *conn_state)
{ … }
static int
intel_tv_detect_type(struct intel_tv *intel_tv,
struct drm_connector *connector)
{ … }
static void intel_tv_find_better_format(struct drm_connector *connector)
{ … }
static int
intel_tv_detect(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{ … }
static const struct input_res { … } input_res_table[] = …;
static bool
intel_tv_is_preferred_mode(const struct drm_display_mode *mode,
const struct tv_mode *tv_mode)
{ … }
static void
intel_tv_set_mode_type(struct drm_display_mode *mode,
const struct tv_mode *tv_mode)
{ … }
static int
intel_tv_get_modes(struct drm_connector *connector)
{ … }
static const struct drm_connector_funcs intel_tv_connector_funcs = …;
static int intel_tv_atomic_check(struct drm_connector *connector,
struct drm_atomic_state *state)
{ … }
static const struct drm_connector_helper_funcs intel_tv_connector_helper_funcs = …;
static const struct drm_encoder_funcs intel_tv_enc_funcs = …;
static void intel_tv_add_properties(struct drm_connector *connector)
{ … }
void
intel_tv_init(struct intel_display *display)
{ … }