mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/i915/fdi: convert intel_fdi.[ch] to struct intel_display
Going forward, struct intel_display is the main display device data pointer. Convert as much as possible of intel_fdi.[ch] to struct intel_display. Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/a1a4ae213a8823734908993f22bdc91517470b19.1740502116.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
c4fad8c64e
commit
706184fad0
|
|
@ -1568,8 +1568,8 @@ static void ilk_crtc_enable(struct intel_atomic_state *state,
|
|||
if (new_crtc_state->has_pch_encoder) {
|
||||
ilk_pch_pre_enable(state, crtc);
|
||||
} else {
|
||||
assert_fdi_tx_disabled(dev_priv, pipe);
|
||||
assert_fdi_rx_disabled(dev_priv, pipe);
|
||||
assert_fdi_tx_disabled(display, pipe);
|
||||
assert_fdi_rx_disabled(display, pipe);
|
||||
}
|
||||
|
||||
ilk_pfit_enable(new_crtc_state);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void intel_display_driver_early_probe(struct intel_display *display)
|
|||
intel_audio_hooks_init(display);
|
||||
intel_dpll_init_clock_hook(i915);
|
||||
intel_init_display_hooks(i915);
|
||||
intel_fdi_init_hook(i915);
|
||||
intel_fdi_init_hook(display);
|
||||
intel_dmc_wl_init(display);
|
||||
}
|
||||
|
||||
|
|
@ -449,7 +449,7 @@ int intel_display_driver_probe_nogem(struct intel_display *display)
|
|||
|
||||
intel_plane_possible_crtcs_init(display);
|
||||
intel_shared_dpll_init(display);
|
||||
intel_fdi_pll_freq_update(i915);
|
||||
intel_fdi_pll_freq_update(display);
|
||||
|
||||
intel_update_czclk(i915);
|
||||
intel_display_driver_init_hw(display);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,16 +9,16 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
enum pipe;
|
||||
struct drm_i915_private;
|
||||
struct intel_atomic_state;
|
||||
struct intel_crtc;
|
||||
struct intel_crtc_state;
|
||||
struct intel_display;
|
||||
struct intel_display;
|
||||
struct intel_encoder;
|
||||
struct intel_link_bw_limits;
|
||||
|
||||
int intel_fdi_add_affected_crtcs(struct intel_atomic_state *state);
|
||||
int intel_fdi_link_freq(struct drm_i915_private *i915,
|
||||
int intel_fdi_link_freq(struct intel_display *display,
|
||||
const struct intel_crtc_state *pipe_config);
|
||||
bool intel_fdi_compute_pipe_bpp(struct intel_crtc_state *crtc_state);
|
||||
int ilk_fdi_compute_config(struct intel_crtc *intel_crtc,
|
||||
|
|
@ -29,19 +29,19 @@ void intel_fdi_normal_train(struct intel_crtc *crtc);
|
|||
void ilk_fdi_disable(struct intel_crtc *crtc);
|
||||
void ilk_fdi_pll_disable(struct intel_crtc *intel_crtc);
|
||||
void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_fdi_init_hook(struct drm_i915_private *dev_priv);
|
||||
void intel_fdi_init_hook(struct intel_display *display);
|
||||
void hsw_fdi_link_train(struct intel_encoder *encoder,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
void hsw_fdi_disable(struct intel_encoder *encoder);
|
||||
void intel_fdi_pll_freq_update(struct drm_i915_private *i915);
|
||||
void intel_fdi_pll_freq_update(struct intel_display *display);
|
||||
|
||||
void intel_fdi_link_train(struct intel_crtc *crtc,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
|
||||
void assert_fdi_tx_enabled(struct drm_i915_private *i915, enum pipe pipe);
|
||||
void assert_fdi_tx_disabled(struct drm_i915_private *i915, enum pipe pipe);
|
||||
void assert_fdi_rx_enabled(struct drm_i915_private *i915, enum pipe pipe);
|
||||
void assert_fdi_rx_disabled(struct drm_i915_private *i915, enum pipe pipe);
|
||||
void assert_fdi_tx_enabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_tx_disabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_rx_enabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_rx_disabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_tx_pll_enabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_rx_pll_enabled(struct intel_display *display, enum pipe pipe);
|
||||
void assert_fdi_rx_pll_disabled(struct intel_display *display, enum pipe pipe);
|
||||
|
|
|
|||
|
|
@ -90,10 +90,11 @@ verify_connector_state(struct intel_atomic_state *state,
|
|||
|
||||
static void intel_pipe_config_sanity_check(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
|
||||
|
||||
if (crtc_state->has_pch_encoder) {
|
||||
int fdi_dotclock = intel_dotclock_calculate(intel_fdi_link_freq(i915, crtc_state),
|
||||
int fdi_dotclock = intel_dotclock_calculate(intel_fdi_link_freq(display, crtc_state),
|
||||
&crtc_state->fdi_m_n);
|
||||
int dotclock = crtc_state->hw.adjusted_mode.crtc_clock;
|
||||
|
||||
|
|
|
|||
|
|
@ -259,8 +259,8 @@ static void ilk_enable_pch_transcoder(const struct intel_crtc_state *crtc_state)
|
|||
assert_shared_dpll_enabled(display, crtc_state->shared_dpll);
|
||||
|
||||
/* FDI must be feeding us bits for PCH ports */
|
||||
assert_fdi_tx_enabled(dev_priv, pipe);
|
||||
assert_fdi_rx_enabled(dev_priv, pipe);
|
||||
assert_fdi_tx_enabled(display, pipe);
|
||||
assert_fdi_rx_enabled(display, pipe);
|
||||
|
||||
if (HAS_PCH_CPT(dev_priv)) {
|
||||
reg = TRANS_CHICKEN2(pipe);
|
||||
|
|
@ -316,13 +316,14 @@ static void ilk_enable_pch_transcoder(const struct intel_crtc_state *crtc_state)
|
|||
|
||||
static void ilk_disable_pch_transcoder(struct intel_crtc *crtc)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
enum pipe pipe = crtc->pipe;
|
||||
i915_reg_t reg;
|
||||
|
||||
/* FDI relies on the transcoder */
|
||||
assert_fdi_tx_disabled(dev_priv, pipe);
|
||||
assert_fdi_rx_disabled(dev_priv, pipe);
|
||||
assert_fdi_tx_disabled(display, pipe);
|
||||
assert_fdi_rx_disabled(display, pipe);
|
||||
|
||||
/* Ports must be off as well */
|
||||
assert_pch_ports_disabled(dev_priv, pipe);
|
||||
|
|
@ -479,8 +480,7 @@ void ilk_pch_post_disable(struct intel_atomic_state *state,
|
|||
|
||||
static void ilk_pch_clock_get(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
|
||||
/* read out port_clock from the DPLL */
|
||||
i9xx_crtc_clock_get(crtc_state);
|
||||
|
|
@ -491,7 +491,7 @@ static void ilk_pch_clock_get(struct intel_crtc_state *crtc_state)
|
|||
* Calculate one based on the FDI configuration.
|
||||
*/
|
||||
crtc_state->hw.adjusted_mode.crtc_clock =
|
||||
intel_dotclock_calculate(intel_fdi_link_freq(dev_priv, crtc_state),
|
||||
intel_dotclock_calculate(intel_fdi_link_freq(display, crtc_state),
|
||||
&crtc_state->fdi_m_n);
|
||||
}
|
||||
|
||||
|
|
@ -549,14 +549,15 @@ void ilk_pch_get_config(struct intel_crtc_state *crtc_state)
|
|||
|
||||
static void lpt_enable_pch_transcoder(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
|
||||
u32 val, pipeconf_val;
|
||||
|
||||
/* FDI must be feeding us bits for PCH ports */
|
||||
assert_fdi_tx_enabled(dev_priv, (enum pipe) cpu_transcoder);
|
||||
assert_fdi_rx_enabled(dev_priv, PIPE_A);
|
||||
assert_fdi_tx_enabled(display, (enum pipe)cpu_transcoder);
|
||||
assert_fdi_rx_enabled(display, PIPE_A);
|
||||
|
||||
val = intel_de_read(dev_priv, TRANS_CHICKEN2(PIPE_A));
|
||||
/* Workaround: set timing override bit. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user