Commit a434689c authored by Jani Nikula's avatar Jani Nikula

drm/i915: move vbt to display.vbt

Move display VBT related members under drm_i915_private display
sub-struct.

v2: Rebase
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/db4b648b201ea0b79654fec2028120999a735db0.1661779055.git.jani.nikula@intel.com
parent 90b87cf2
This diff is collapsed.
...@@ -645,7 +645,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) ...@@ -645,7 +645,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)
BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG);
i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->vbt.crt_ddc_pin); i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->display.vbt.crt_ddc_pin);
edid = intel_crt_get_edid(connector, i2c); edid = intel_crt_get_edid(connector, i2c);
if (edid) { if (edid) {
...@@ -931,7 +931,7 @@ static int intel_crt_get_modes(struct drm_connector *connector) ...@@ -931,7 +931,7 @@ static int intel_crt_get_modes(struct drm_connector *connector)
wakeref = intel_display_power_get(dev_priv, wakeref = intel_display_power_get(dev_priv,
intel_encoder->power_domain); intel_encoder->power_domain);
i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->vbt.crt_ddc_pin); i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->display.vbt.crt_ddc_pin);
ret = intel_crt_ddc_get_modes(connector, i2c); ret = intel_crt_ddc_get_modes(connector, i2c);
if (ret || !IS_G4X(dev_priv)) if (ret || !IS_G4X(dev_priv))
goto out; goto out;
......
...@@ -2772,12 +2772,12 @@ static void intel_panel_sanitize_ssc(struct drm_i915_private *dev_priv) ...@@ -2772,12 +2772,12 @@ static void intel_panel_sanitize_ssc(struct drm_i915_private *dev_priv)
PCH_DREF_CONTROL) & PCH_DREF_CONTROL) &
DREF_SSC1_ENABLE; DREF_SSC1_ENABLE;
if (dev_priv->vbt.lvds_use_ssc != bios_lvds_use_ssc) { if (dev_priv->display.vbt.lvds_use_ssc != bios_lvds_use_ssc) {
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"SSC %s by BIOS, overriding VBT which says %s\n", "SSC %s by BIOS, overriding VBT which says %s\n",
str_enabled_disabled(bios_lvds_use_ssc), str_enabled_disabled(bios_lvds_use_ssc),
str_enabled_disabled(dev_priv->vbt.lvds_use_ssc)); str_enabled_disabled(dev_priv->display.vbt.lvds_use_ssc));
dev_priv->vbt.lvds_use_ssc = bios_lvds_use_ssc; dev_priv->display.vbt.lvds_use_ssc = bios_lvds_use_ssc;
} }
} }
} }
...@@ -4373,7 +4373,7 @@ static int i9xx_pll_refclk(struct drm_device *dev, ...@@ -4373,7 +4373,7 @@ static int i9xx_pll_refclk(struct drm_device *dev,
u32 dpll = pipe_config->dpll_hw_state.dpll; u32 dpll = pipe_config->dpll_hw_state.dpll;
if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN) if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN)
return dev_priv->vbt.lvds_ssc_freq; return dev_priv->display.vbt.lvds_ssc_freq;
else if (HAS_PCH_SPLIT(dev_priv)) else if (HAS_PCH_SPLIT(dev_priv))
return 120000; return 120000;
else if (DISPLAY_VER(dev_priv) != 2) else if (DISPLAY_VER(dev_priv) != 2)
...@@ -7923,7 +7923,7 @@ static bool intel_ddi_crt_present(struct drm_i915_private *dev_priv) ...@@ -7923,7 +7923,7 @@ static bool intel_ddi_crt_present(struct drm_i915_private *dev_priv)
if (intel_de_read(dev_priv, DDI_BUF_CTL(PORT_A)) & DDI_A_4_LANES) if (intel_de_read(dev_priv, DDI_BUF_CTL(PORT_A)) & DDI_A_4_LANES)
return false; return false;
if (!dev_priv->vbt.int_crt_support) if (!dev_priv->display.vbt.int_crt_support)
return false; return false;
return true; return true;
...@@ -8058,7 +8058,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) ...@@ -8058,7 +8058,7 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { } else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
bool has_edp, has_port; bool has_edp, has_port;
if (IS_VALLEYVIEW(dev_priv) && dev_priv->vbt.int_crt_support) if (IS_VALLEYVIEW(dev_priv) && dev_priv->display.vbt.int_crt_support)
intel_crt_init(dev_priv); intel_crt_init(dev_priv);
/* /*
......
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
#ifndef __INTEL_DISPLAY_CORE_H__ #ifndef __INTEL_DISPLAY_CORE_H__
#define __INTEL_DISPLAY_CORE_H__ #define __INTEL_DISPLAY_CORE_H__
#include <linux/list.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <drm/drm_connector.h>
#include "intel_cdclk.h" #include "intel_cdclk.h"
#include "intel_display.h" #include "intel_display.h"
#include "intel_dmc.h" #include "intel_dmc.h"
...@@ -25,6 +28,7 @@ struct i915_audio_component; ...@@ -25,6 +28,7 @@ struct i915_audio_component;
struct i915_hdcp_comp_master; struct i915_hdcp_comp_master;
struct intel_atomic_state; struct intel_atomic_state;
struct intel_audio_funcs; struct intel_audio_funcs;
struct intel_bios_encoder_data;
struct intel_cdclk_funcs; struct intel_cdclk_funcs;
struct intel_cdclk_vals; struct intel_cdclk_vals;
struct intel_color_funcs; struct intel_color_funcs;
...@@ -153,6 +157,39 @@ struct intel_hotplug { ...@@ -153,6 +157,39 @@ struct intel_hotplug {
struct workqueue_struct *dp_wq; struct workqueue_struct *dp_wq;
}; };
struct intel_vbt_data {
/* bdb version */
u16 version;
/* Feature bits */
unsigned int int_tv_support:1;
unsigned int int_crt_support:1;
unsigned int lvds_use_ssc:1;
unsigned int int_lvds_support:1;
unsigned int display_clock_mode:1;
unsigned int fdi_rx_polarity_inverted:1;
int lvds_ssc_freq;
enum drm_panel_orientation orientation;
bool override_afc_startup;
u8 override_afc_startup_val;
int crt_ddc_pin;
struct list_head display_devices;
struct list_head bdb_blocks;
struct intel_bios_encoder_data *ports[I915_MAX_PORTS]; /* Non-NULL if port present. */
struct sdvo_device_mapping {
u8 initialized;
u8 dvo_port;
u8 slave_addr;
u8 dvo_wiring;
u8 i2c_pin;
u8 ddc_pin;
} sdvo_mappings[2];
};
struct intel_wm { struct intel_wm {
/* /*
* Raw watermark latency values: * Raw watermark latency values:
...@@ -311,6 +348,7 @@ struct intel_display { ...@@ -311,6 +348,7 @@ struct intel_display {
struct intel_hotplug hotplug; struct intel_hotplug hotplug;
struct intel_opregion opregion; struct intel_opregion opregion;
struct intel_overlay *overlay; struct intel_overlay *overlay;
struct intel_vbt_data vbt;
struct intel_wm wm; struct intel_wm wm;
}; };
......
...@@ -5193,7 +5193,7 @@ intel_edp_add_properties(struct intel_dp *intel_dp) ...@@ -5193,7 +5193,7 @@ intel_edp_add_properties(struct intel_dp *intel_dp)
return; return;
drm_connector_set_panel_orientation_with_quirk(&connector->base, drm_connector_set_panel_orientation_with_quirk(&connector->base,
i915->vbt.orientation, i915->display.vbt.orientation,
fixed_mode->hdisplay, fixed_mode->hdisplay,
fixed_mode->vdisplay); fixed_mode->vdisplay);
} }
......
...@@ -991,7 +991,7 @@ static void ilk_update_pll_dividers(struct intel_crtc_state *crtc_state, ...@@ -991,7 +991,7 @@ static void ilk_update_pll_dividers(struct intel_crtc_state *crtc_state,
factor = 21; factor = 21;
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) {
if ((intel_panel_use_ssc(dev_priv) && if ((intel_panel_use_ssc(dev_priv) &&
dev_priv->vbt.lvds_ssc_freq == 100000) || dev_priv->display.vbt.lvds_ssc_freq == 100000) ||
(HAS_PCH_IBX(dev_priv) && (HAS_PCH_IBX(dev_priv) &&
intel_is_dual_link_lvds(dev_priv))) intel_is_dual_link_lvds(dev_priv)))
factor = 25; factor = 25;
...@@ -1105,8 +1105,8 @@ static int ilk_crtc_compute_clock(struct intel_atomic_state *state, ...@@ -1105,8 +1105,8 @@ static int ilk_crtc_compute_clock(struct intel_atomic_state *state,
if (intel_panel_use_ssc(dev_priv)) { if (intel_panel_use_ssc(dev_priv)) {
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"using SSC reference clock of %d kHz\n", "using SSC reference clock of %d kHz\n",
dev_priv->vbt.lvds_ssc_freq); dev_priv->display.vbt.lvds_ssc_freq);
refclk = dev_priv->vbt.lvds_ssc_freq; refclk = dev_priv->display.vbt.lvds_ssc_freq;
} }
if (intel_is_dual_link_lvds(dev_priv)) { if (intel_is_dual_link_lvds(dev_priv)) {
...@@ -1231,7 +1231,7 @@ static int g4x_crtc_compute_clock(struct intel_atomic_state *state, ...@@ -1231,7 +1231,7 @@ static int g4x_crtc_compute_clock(struct intel_atomic_state *state,
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) {
if (intel_panel_use_ssc(dev_priv)) { if (intel_panel_use_ssc(dev_priv)) {
refclk = dev_priv->vbt.lvds_ssc_freq; refclk = dev_priv->display.vbt.lvds_ssc_freq;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"using SSC reference clock of %d kHz\n", "using SSC reference clock of %d kHz\n",
refclk); refclk);
...@@ -1273,7 +1273,7 @@ static int pnv_crtc_compute_clock(struct intel_atomic_state *state, ...@@ -1273,7 +1273,7 @@ static int pnv_crtc_compute_clock(struct intel_atomic_state *state,
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) {
if (intel_panel_use_ssc(dev_priv)) { if (intel_panel_use_ssc(dev_priv)) {
refclk = dev_priv->vbt.lvds_ssc_freq; refclk = dev_priv->display.vbt.lvds_ssc_freq;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"using SSC reference clock of %d kHz\n", "using SSC reference clock of %d kHz\n",
refclk); refclk);
...@@ -1306,7 +1306,7 @@ static int i9xx_crtc_compute_clock(struct intel_atomic_state *state, ...@@ -1306,7 +1306,7 @@ static int i9xx_crtc_compute_clock(struct intel_atomic_state *state,
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) {
if (intel_panel_use_ssc(dev_priv)) { if (intel_panel_use_ssc(dev_priv)) {
refclk = dev_priv->vbt.lvds_ssc_freq; refclk = dev_priv->display.vbt.lvds_ssc_freq;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"using SSC reference clock of %d kHz\n", "using SSC reference clock of %d kHz\n",
refclk); refclk);
...@@ -1339,7 +1339,7 @@ static int i8xx_crtc_compute_clock(struct intel_atomic_state *state, ...@@ -1339,7 +1339,7 @@ static int i8xx_crtc_compute_clock(struct intel_atomic_state *state,
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_LVDS)) {
if (intel_panel_use_ssc(dev_priv)) { if (intel_panel_use_ssc(dev_priv)) {
refclk = dev_priv->vbt.lvds_ssc_freq; refclk = dev_priv->display.vbt.lvds_ssc_freq;
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"using SSC reference clock of %d kHz\n", "using SSC reference clock of %d kHz\n",
refclk); refclk);
......
...@@ -2769,8 +2769,8 @@ static void icl_calc_dpll_state(struct drm_i915_private *i915, ...@@ -2769,8 +2769,8 @@ static void icl_calc_dpll_state(struct drm_i915_private *i915,
else else
pll_state->cfgcr1 |= DPLL_CFGCR1_CENTRAL_FREQ_8400; pll_state->cfgcr1 |= DPLL_CFGCR1_CENTRAL_FREQ_8400;
if (i915->vbt.override_afc_startup) if (i915->display.vbt.override_afc_startup)
pll_state->div0 = TGL_DPLL0_DIV0_AFC_STARTUP(i915->vbt.override_afc_startup_val); pll_state->div0 = TGL_DPLL0_DIV0_AFC_STARTUP(i915->display.vbt.override_afc_startup_val);
} }
static int icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc, static int icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc,
...@@ -2965,8 +2965,8 @@ static int icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, ...@@ -2965,8 +2965,8 @@ static int icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state,
DKL_PLL_DIV0_PROP_COEFF(prop_coeff) | DKL_PLL_DIV0_PROP_COEFF(prop_coeff) |
DKL_PLL_DIV0_FBPREDIV(m1div) | DKL_PLL_DIV0_FBPREDIV(m1div) |
DKL_PLL_DIV0_FBDIV_INT(m2div_int); DKL_PLL_DIV0_FBDIV_INT(m2div_int);
if (dev_priv->vbt.override_afc_startup) { if (dev_priv->display.vbt.override_afc_startup) {
u8 val = dev_priv->vbt.override_afc_startup_val; u8 val = dev_priv->display.vbt.override_afc_startup_val;
pll_state->mg_pll_div0 |= DKL_PLL_DIV0_AFC_STARTUP(val); pll_state->mg_pll_div0 |= DKL_PLL_DIV0_AFC_STARTUP(val);
} }
...@@ -3502,7 +3502,7 @@ static bool dkl_pll_get_hw_state(struct drm_i915_private *dev_priv, ...@@ -3502,7 +3502,7 @@ static bool dkl_pll_get_hw_state(struct drm_i915_private *dev_priv,
hw_state->mg_pll_div0 = intel_de_read(dev_priv, DKL_PLL_DIV0(tc_port)); hw_state->mg_pll_div0 = intel_de_read(dev_priv, DKL_PLL_DIV0(tc_port));
val = DKL_PLL_DIV0_MASK; val = DKL_PLL_DIV0_MASK;
if (dev_priv->vbt.override_afc_startup) if (dev_priv->display.vbt.override_afc_startup)
val |= DKL_PLL_DIV0_AFC_STARTUP_MASK; val |= DKL_PLL_DIV0_AFC_STARTUP_MASK;
hw_state->mg_pll_div0 &= val; hw_state->mg_pll_div0 &= val;
...@@ -3566,7 +3566,7 @@ static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv, ...@@ -3566,7 +3566,7 @@ static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv,
TGL_DPLL_CFGCR0(id)); TGL_DPLL_CFGCR0(id));
hw_state->cfgcr1 = intel_de_read(dev_priv, hw_state->cfgcr1 = intel_de_read(dev_priv,
TGL_DPLL_CFGCR1(id)); TGL_DPLL_CFGCR1(id));
if (dev_priv->vbt.override_afc_startup) { if (dev_priv->display.vbt.override_afc_startup) {
hw_state->div0 = intel_de_read(dev_priv, TGL_DPLL0_DIV0(id)); hw_state->div0 = intel_de_read(dev_priv, TGL_DPLL0_DIV0(id));
hw_state->div0 &= TGL_DPLL0_DIV0_AFC_STARTUP_MASK; hw_state->div0 &= TGL_DPLL0_DIV0_AFC_STARTUP_MASK;
} }
...@@ -3638,9 +3638,9 @@ static void icl_dpll_write(struct drm_i915_private *dev_priv, ...@@ -3638,9 +3638,9 @@ static void icl_dpll_write(struct drm_i915_private *dev_priv,
intel_de_write(dev_priv, cfgcr0_reg, hw_state->cfgcr0); intel_de_write(dev_priv, cfgcr0_reg, hw_state->cfgcr0);
intel_de_write(dev_priv, cfgcr1_reg, hw_state->cfgcr1); intel_de_write(dev_priv, cfgcr1_reg, hw_state->cfgcr1);
drm_WARN_ON_ONCE(&dev_priv->drm, dev_priv->vbt.override_afc_startup && drm_WARN_ON_ONCE(&dev_priv->drm, dev_priv->display.vbt.override_afc_startup &&
!i915_mmio_reg_valid(div0_reg)); !i915_mmio_reg_valid(div0_reg));
if (dev_priv->vbt.override_afc_startup && if (dev_priv->display.vbt.override_afc_startup &&
i915_mmio_reg_valid(div0_reg)) i915_mmio_reg_valid(div0_reg))
intel_de_rmw(dev_priv, div0_reg, TGL_DPLL0_DIV0_AFC_STARTUP_MASK, intel_de_rmw(dev_priv, div0_reg, TGL_DPLL0_DIV0_AFC_STARTUP_MASK,
hw_state->div0); hw_state->div0);
...@@ -3732,7 +3732,7 @@ static void dkl_pll_write(struct drm_i915_private *dev_priv, ...@@ -3732,7 +3732,7 @@ static void dkl_pll_write(struct drm_i915_private *dev_priv,
intel_de_write(dev_priv, DKL_CLKTOP2_HSCLKCTL(tc_port), val); intel_de_write(dev_priv, DKL_CLKTOP2_HSCLKCTL(tc_port), val);
val = DKL_PLL_DIV0_MASK; val = DKL_PLL_DIV0_MASK;
if (dev_priv->vbt.override_afc_startup) if (dev_priv->display.vbt.override_afc_startup)
val |= DKL_PLL_DIV0_AFC_STARTUP_MASK; val |= DKL_PLL_DIV0_AFC_STARTUP_MASK;
intel_de_rmw(dev_priv, DKL_PLL_DIV0(tc_port), val, intel_de_rmw(dev_priv, DKL_PLL_DIV0(tc_port), val,
hw_state->mg_pll_div0); hw_state->mg_pll_div0);
......
...@@ -106,7 +106,7 @@ intel_dsi_get_panel_orientation(struct intel_connector *connector) ...@@ -106,7 +106,7 @@ intel_dsi_get_panel_orientation(struct intel_connector *connector)
if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN) if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
return orientation; return orientation;
orientation = dev_priv->vbt.orientation; orientation = dev_priv->display.vbt.orientation;
if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN) if (orientation != DRM_MODE_PANEL_ORIENTATION_UNKNOWN)
return orientation; return orientation;
......
...@@ -837,12 +837,12 @@ void intel_lvds_init(struct drm_i915_private *dev_priv) ...@@ -837,12 +837,12 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
/* Skip init on machines we know falsely report LVDS */ /* Skip init on machines we know falsely report LVDS */
if (dmi_check_system(intel_no_lvds)) { if (dmi_check_system(intel_no_lvds)) {
drm_WARN(dev, !dev_priv->vbt.int_lvds_support, drm_WARN(dev, !dev_priv->display.vbt.int_lvds_support,
"Useless DMI match. Internal LVDS support disabled by VBT\n"); "Useless DMI match. Internal LVDS support disabled by VBT\n");
return; return;
} }
if (!dev_priv->vbt.int_lvds_support) { if (!dev_priv->display.vbt.int_lvds_support) {
drm_dbg_kms(&dev_priv->drm, drm_dbg_kms(&dev_priv->drm,
"Internal LVDS support disabled by VBT\n"); "Internal LVDS support disabled by VBT\n");
return; return;
......
...@@ -42,7 +42,7 @@ bool intel_panel_use_ssc(struct drm_i915_private *i915) ...@@ -42,7 +42,7 @@ bool intel_panel_use_ssc(struct drm_i915_private *i915)
{ {
if (i915->params.panel_use_ssc >= 0) if (i915->params.panel_use_ssc >= 0)
return i915->params.panel_use_ssc != 0; return i915->params.panel_use_ssc != 0;
return i915->vbt.lvds_use_ssc return i915->display.vbt.lvds_use_ssc
&& !(i915->quirks & QUIRK_LVDS_SSC_DISABLE); && !(i915->quirks & QUIRK_LVDS_SSC_DISABLE);
} }
......
...@@ -514,7 +514,7 @@ static void ilk_init_pch_refclk(struct drm_i915_private *dev_priv) ...@@ -514,7 +514,7 @@ static void ilk_init_pch_refclk(struct drm_i915_private *dev_priv)
} }
if (HAS_PCH_IBX(dev_priv)) { if (HAS_PCH_IBX(dev_priv)) {
has_ck505 = dev_priv->vbt.display_clock_mode; has_ck505 = dev_priv->display.vbt.display_clock_mode;
can_ssc = has_ck505; can_ssc = has_ck505;
} else { } else {
has_ck505 = false; has_ck505 = false;
......
...@@ -2016,7 +2016,7 @@ intel_sdvo_get_analog_edid(struct drm_connector *connector) ...@@ -2016,7 +2016,7 @@ intel_sdvo_get_analog_edid(struct drm_connector *connector)
return drm_get_edid(connector, return drm_get_edid(connector,
intel_gmbus_get_adapter(dev_priv, intel_gmbus_get_adapter(dev_priv,
dev_priv->vbt.crt_ddc_pin)); dev_priv->display.vbt.crt_ddc_pin));
} }
static enum drm_connector_status static enum drm_connector_status
...@@ -2581,9 +2581,9 @@ intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv, ...@@ -2581,9 +2581,9 @@ intel_sdvo_select_ddc_bus(struct drm_i915_private *dev_priv,
struct sdvo_device_mapping *mapping; struct sdvo_device_mapping *mapping;
if (sdvo->port == PORT_B) if (sdvo->port == PORT_B)
mapping = &dev_priv->vbt.sdvo_mappings[0]; mapping = &dev_priv->display.vbt.sdvo_mappings[0];
else else
mapping = &dev_priv->vbt.sdvo_mappings[1]; mapping = &dev_priv->display.vbt.sdvo_mappings[1];
if (mapping->initialized) if (mapping->initialized)
sdvo->ddc_bus = 1 << ((mapping->ddc_pin & 0xf0) >> 4); sdvo->ddc_bus = 1 << ((mapping->ddc_pin & 0xf0) >> 4);
...@@ -2599,9 +2599,9 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv, ...@@ -2599,9 +2599,9 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
u8 pin; u8 pin;
if (sdvo->port == PORT_B) if (sdvo->port == PORT_B)
mapping = &dev_priv->vbt.sdvo_mappings[0]; mapping = &dev_priv->display.vbt.sdvo_mappings[0];
else else
mapping = &dev_priv->vbt.sdvo_mappings[1]; mapping = &dev_priv->display.vbt.sdvo_mappings[1];
if (mapping->initialized && if (mapping->initialized &&
intel_gmbus_is_valid_pin(dev_priv, mapping->i2c_pin)) intel_gmbus_is_valid_pin(dev_priv, mapping->i2c_pin))
...@@ -2639,11 +2639,11 @@ intel_sdvo_get_slave_addr(struct drm_i915_private *dev_priv, ...@@ -2639,11 +2639,11 @@ intel_sdvo_get_slave_addr(struct drm_i915_private *dev_priv,
struct sdvo_device_mapping *my_mapping, *other_mapping; struct sdvo_device_mapping *my_mapping, *other_mapping;
if (sdvo->port == PORT_B) { if (sdvo->port == PORT_B) {
my_mapping = &dev_priv->vbt.sdvo_mappings[0]; my_mapping = &dev_priv->display.vbt.sdvo_mappings[0];
other_mapping = &dev_priv->vbt.sdvo_mappings[1]; other_mapping = &dev_priv->display.vbt.sdvo_mappings[1];
} else { } else {
my_mapping = &dev_priv->vbt.sdvo_mappings[1]; my_mapping = &dev_priv->display.vbt.sdvo_mappings[1];
other_mapping = &dev_priv->vbt.sdvo_mappings[0]; other_mapping = &dev_priv->display.vbt.sdvo_mappings[0];
} }
/* If the BIOS described our SDVO device, take advantage of it. */ /* If the BIOS described our SDVO device, take advantage of it. */
......
...@@ -362,10 +362,10 @@ enum vbt_gmbus_ddi { ...@@ -362,10 +362,10 @@ enum vbt_gmbus_ddi {
* basically any of the fields to ensure the correct interpretation for the BDB * basically any of the fields to ensure the correct interpretation for the BDB
* version in question. * version in question.
* *
* When we copy the child device configs to dev_priv->vbt.child_dev, we reserve * When we copy the child device configs to dev_priv->display.vbt.child_dev, we
* space for the full structure below, and initialize the tail not actually * reserve space for the full structure below, and initialize the tail not
* present in VBT to zeros. Accessing those fields is fine, as long as the * actually present in VBT to zeros. Accessing those fields is fine, as long as
* default zero is taken into account, again according to the BDB version. * the default zero is taken into account, again according to the BDB version.
* *
* BDB versions 155 and below are considered legacy, and version 155 seems to be * BDB versions 155 and below are considered legacy, and version 155 seems to be
* a baseline for some of the VBT documentation. When adding new fields, please * a baseline for some of the VBT documentation. When adding new fields, please
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <linux/pm_qos.h> #include <linux/pm_qos.h>
#include <drm/drm_connector.h>
#include <drm/ttm/ttm_device.h> #include <drm/ttm/ttm_device.h>
#include "display/intel_display.h" #include "display/intel_display.h"
...@@ -90,15 +89,6 @@ struct vlv_s0ix_state; ...@@ -90,15 +89,6 @@ struct vlv_s0ix_state;
I915_GEM_DOMAIN_INSTRUCTION | \ I915_GEM_DOMAIN_INSTRUCTION | \
I915_GEM_DOMAIN_VERTEX) I915_GEM_DOMAIN_VERTEX)
struct sdvo_device_mapping {
u8 initialized;
u8 dvo_port;
u8 slave_addr;
u8 dvo_wiring;
u8 i2c_pin;
u8 ddc_pin;
};
#define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ #define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */
#define GEM_QUIRK_PIN_SWIZZLED_PAGES BIT(0) #define GEM_QUIRK_PIN_SWIZZLED_PAGES BIT(0)
...@@ -200,32 +190,6 @@ i915_fence_timeout(const struct drm_i915_private *i915) ...@@ -200,32 +190,6 @@ i915_fence_timeout(const struct drm_i915_private *i915)
#define HAS_HW_SAGV_WM(i915) (DISPLAY_VER(i915) >= 13 && !IS_DGFX(i915)) #define HAS_HW_SAGV_WM(i915) (DISPLAY_VER(i915) >= 13 && !IS_DGFX(i915))
struct intel_vbt_data {
/* bdb version */
u16 version;
/* Feature bits */
unsigned int int_tv_support:1;
unsigned int int_crt_support:1;
unsigned int lvds_use_ssc:1;
unsigned int int_lvds_support:1;
unsigned int display_clock_mode:1;
unsigned int fdi_rx_polarity_inverted:1;
int lvds_ssc_freq;
enum drm_panel_orientation orientation;
bool override_afc_startup;
u8 override_afc_startup_val;
int crt_ddc_pin;
struct list_head display_devices;
struct list_head bdb_blocks;
struct intel_bios_encoder_data *ports[I915_MAX_PORTS]; /* Non-NULL if port present. */
struct sdvo_device_mapping sdvo_mappings[2];
};
struct i915_frontbuffer_tracking { struct i915_frontbuffer_tracking {
spinlock_t lock; spinlock_t lock;
...@@ -323,7 +287,6 @@ struct drm_i915_private { ...@@ -323,7 +287,6 @@ struct drm_i915_private {
u32 pipestat_irq_mask[I915_MAX_PIPES]; u32 pipestat_irq_mask[I915_MAX_PIPES];
struct intel_fbc *fbc[I915_MAX_FBCS]; struct intel_fbc *fbc[I915_MAX_FBCS];
struct intel_vbt_data vbt;
bool preserve_bios_swizzle; bool preserve_bios_swizzle;
......
...@@ -7464,7 +7464,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *dev_priv) ...@@ -7464,7 +7464,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *dev_priv)
val = intel_uncore_read(&dev_priv->uncore, TRANS_CHICKEN2(pipe)); val = intel_uncore_read(&dev_priv->uncore, TRANS_CHICKEN2(pipe));
val |= TRANS_CHICKEN2_TIMING_OVERRIDE; val |= TRANS_CHICKEN2_TIMING_OVERRIDE;
val &= ~TRANS_CHICKEN2_FDI_POLARITY_REVERSED; val &= ~TRANS_CHICKEN2_FDI_POLARITY_REVERSED;
if (dev_priv->vbt.fdi_rx_polarity_inverted) if (dev_priv->display.vbt.fdi_rx_polarity_inverted)
val |= TRANS_CHICKEN2_FDI_POLARITY_REVERSED; val |= TRANS_CHICKEN2_FDI_POLARITY_REVERSED;
val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_COUNTER; val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_COUNTER;
val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_MODESWITCH; val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_MODESWITCH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment