linux/drivers/gpu/drm/radeon/radeon_connectors.c

/*
 * Copyright 2007-8 Advanced Micro Devices, Inc.
 * Copyright 2008 Red Hat Inc.
 *
 * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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.
 *
 * Authors: Dave Airlie
 *          Alex Deucher
 */

#include <drm/display/drm_dp_mst_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_probe_helper.h>
#include <drm/radeon_drm.h>
#include "radeon.h"
#include "radeon_audio.h"
#include "atom.h"

#include <linux/pm_runtime.h>
#include <linux/vga_switcheroo.h>

void radeon_connector_hotplug(struct drm_connector *connector)
{}

static void radeon_property_change_mode(struct drm_encoder *encoder)
{}

int radeon_get_monitor_bpc(struct drm_connector *connector)
{}

static void
radeon_connector_update_scratch_regs(struct drm_connector *connector, enum drm_connector_status status)
{}

static struct drm_encoder *radeon_find_encoder(struct drm_connector *connector, int encoder_type)
{}

static void radeon_connector_get_edid(struct drm_connector *connector)
{}

static void radeon_connector_free_edid(struct drm_connector *connector)
{}

static int radeon_ddc_get_modes(struct drm_connector *connector)
{}

static struct drm_encoder *radeon_best_single_encoder(struct drm_connector *connector)
{}

static void radeon_get_native_mode(struct drm_connector *connector)
{}

/*
 * radeon_connector_analog_encoder_conflict_solve
 * - search for other connectors sharing this encoder
 *   if priority is true, then set them disconnected if this is connected
 *   if priority is false, set us disconnected if they are connected
 */
static enum drm_connector_status
radeon_connector_analog_encoder_conflict_solve(struct drm_connector *connector,
					       struct drm_encoder *encoder,
					       enum drm_connector_status current_status,
					       bool priority)
{}

static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encoder)
{}

static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_connector *connector)
{}

static int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *property,
				  uint64_t val)
{}

static void radeon_fixup_lvds_native_mode(struct drm_encoder *encoder,
					  struct drm_connector *connector)
{}

static int radeon_lvds_get_modes(struct drm_connector *connector)
{}

static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
				  struct drm_display_mode *mode)
{}

static enum drm_connector_status
radeon_lvds_detect(struct drm_connector *connector, bool force)
{}

static void radeon_connector_unregister(struct drm_connector *connector)
{}

static void radeon_connector_destroy(struct drm_connector *connector)
{}

static int radeon_lvds_set_property(struct drm_connector *connector,
				    struct drm_property *property,
				    uint64_t value)
{}


static const struct drm_connector_helper_funcs radeon_lvds_connector_helper_funcs =;

static const struct drm_connector_funcs radeon_lvds_connector_funcs =;

static int radeon_vga_get_modes(struct drm_connector *connector)
{}

static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
				  struct drm_display_mode *mode)
{}

static enum drm_connector_status
radeon_vga_detect(struct drm_connector *connector, bool force)
{}

static const struct drm_connector_helper_funcs radeon_vga_connector_helper_funcs =;

static const struct drm_connector_funcs radeon_vga_connector_funcs =;

static int radeon_tv_get_modes(struct drm_connector *connector)
{}

static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
				struct drm_display_mode *mode)
{}

static enum drm_connector_status
radeon_tv_detect(struct drm_connector *connector, bool force)
{}

static const struct drm_connector_helper_funcs radeon_tv_connector_helper_funcs =;

static const struct drm_connector_funcs radeon_tv_connector_funcs =;

static bool radeon_check_hpd_status_unchanged(struct drm_connector *connector)
{}

/*
 * DVI is complicated
 * Do a DDC probe, if DDC probe passes, get the full EDID so
 * we can do analog/digital monitor detection at this point.
 * If the monitor is an analog monitor or we got no DDC,
 * we need to find the DAC encoder object for this connector.
 * If we got no DDC, we do load detection on the DAC encoder object.
 * If we got analog DDC or load detection passes on the DAC encoder
 * we have to check if this analog encoder is shared with anyone else (TV)
 * if its shared we have to set the other connector to disconnected.
 */
static enum drm_connector_status
radeon_dvi_detect(struct drm_connector *connector, bool force)
{}

/* okay need to be smart in here about which encoder to pick */
static struct drm_encoder *radeon_dvi_encoder(struct drm_connector *connector)
{}

static void radeon_dvi_force(struct drm_connector *connector)
{}

static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
				  struct drm_display_mode *mode)
{}

static const struct drm_connector_helper_funcs radeon_dvi_connector_helper_funcs =;

static const struct drm_connector_funcs radeon_dvi_connector_funcs =;

static int radeon_dp_get_modes(struct drm_connector *connector)
{}

u16 radeon_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector)
{}

static bool radeon_connector_encoder_is_hbr2(struct drm_connector *connector)
{}

bool radeon_connector_is_dp12_capable(struct drm_connector *connector)
{}

static enum drm_connector_status
radeon_dp_detect(struct drm_connector *connector, bool force)
{}

static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
				  struct drm_display_mode *mode)
{}

static const struct drm_connector_helper_funcs radeon_dp_connector_helper_funcs =;

static const struct drm_connector_funcs radeon_dp_connector_funcs =;

static const struct drm_connector_funcs radeon_edp_connector_funcs =;

static const struct drm_connector_funcs radeon_lvds_bridge_connector_funcs =;

void
radeon_add_atom_connector(struct drm_device *dev,
			  uint32_t connector_id,
			  uint32_t supported_device,
			  int connector_type,
			  struct radeon_i2c_bus_rec *i2c_bus,
			  uint32_t igp_lane_info,
			  uint16_t connector_object_id,
			  struct radeon_hpd *hpd,
			  struct radeon_router *router)
{}

void
radeon_add_legacy_connector(struct drm_device *dev,
			    uint32_t connector_id,
			    uint32_t supported_device,
			    int connector_type,
			    struct radeon_i2c_bus_rec *i2c_bus,
			    uint16_t connector_object_id,
			    struct radeon_hpd *hpd)
{}