{
struct dw_hdmi *hdmi = bridge->driver_private;
const struct dw_hdmi_plat_data *pdata = hdmi->plat_data;
- struct drm_connector *connector = &hdmi->connector;
enum drm_mode_status mode_status = MODE_OK;
/* We don't support double-clocked modes */
return MODE_BAD;
if (pdata->mode_valid)
- mode_status = pdata->mode_valid(hdmi, pdata->priv_data,
- connector, mode);
+ mode_status = pdata->mode_valid(hdmi, pdata->priv_data, info,
+ mode);
return mode_status;
}
static enum drm_mode_status
imx6q_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *con,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
if (mode->clock < 13500)
static enum drm_mode_status
imx6dl_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *con,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
if (mode->clock < 13500)
static enum drm_mode_status
dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *display_info,
const struct drm_display_mode *mode)
{
struct meson_dw_hdmi *dw_hdmi = data;
struct meson_drm *priv = dw_hdmi->priv;
- bool is_hdmi2_sink = connector->display_info.hdmi.scdc.supported;
+ bool is_hdmi2_sink = display_info->hdmi.scdc.supported;
unsigned int phy_freq;
unsigned int vclk_freq;
unsigned int venc_freq;
DRM_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
/* If sink does not support 540MHz, reject the non-420 HDMI2 modes */
- if (connector->display_info.max_tmds_clock &&
- mode->clock > connector->display_info.max_tmds_clock &&
- !drm_mode_is_420_only(&connector->display_info, mode) &&
- !drm_mode_is_420_also(&connector->display_info, mode))
+ if (display_info->max_tmds_clock &&
+ mode->clock > display_info->max_tmds_clock &&
+ !drm_mode_is_420_only(display_info, mode) &&
+ !drm_mode_is_420_also(display_info, mode))
return MODE_BAD;
/* Check against non-VIC supported modes */
vclk_freq = mode->clock;
/* For 420, pixel clock is half unlike venc clock */
- if (drm_mode_is_420_only(&connector->display_info, mode) ||
+ if (drm_mode_is_420_only(display_info, mode) ||
(!is_hdmi2_sink &&
- drm_mode_is_420_also(&connector->display_info, mode)))
+ drm_mode_is_420_also(display_info, mode)))
vclk_freq /= 2;
/* TMDS clock is pixel_clock * 10 */
/* VENC double pixels for 1080i, 720p and YUV420 modes */
if (meson_venc_hdmi_venc_repeat(vic) ||
- drm_mode_is_420_only(&connector->display_info, mode) ||
+ drm_mode_is_420_only(display_info, mode) ||
(!is_hdmi2_sink &&
- drm_mode_is_420_also(&connector->display_info, mode)))
+ drm_mode_is_420_also(display_info, mode)))
venc_freq *= 2;
vclk_freq = max(venc_freq, hdmi_freq);
static enum drm_mode_status
rcar_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
/*
static enum drm_mode_status
dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
static enum drm_mode_status
sun8i_dw_hdmi_mode_valid_a83t(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
if (mode->clock > 297000)
static enum drm_mode_status
sun8i_dw_hdmi_mode_valid_h6(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode)
{
/*
struct sun8i_dw_hdmi_quirks {
enum drm_mode_status (*mode_valid)(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode);
unsigned int set_rate : 1;
unsigned int use_drm_infoframe : 1;
#include <sound/hdmi-codec.h>
-struct drm_connector;
+struct drm_display_info;
struct drm_display_mode;
struct drm_encoder;
struct dw_hdmi;
/* Platform-specific mode validation (optional). */
enum drm_mode_status (*mode_valid)(struct dw_hdmi *hdmi, void *data,
- struct drm_connector *connector,
+ const struct drm_display_info *info,
const struct drm_display_mode *mode);
/* Vendor PHY support */