mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
drm/i915/hti: convert to struct intel_display
Going forward, struct intel_display shall replace struct drm_i915_private as the main display device data pointer type. Convert intel_hti.[ch] to struct intel_display. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240813164123.2674462-7-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
6276706f33
commit
7d085bb17e
@ -4900,7 +4900,7 @@ void intel_ddi_init(struct intel_display *display,
|
||||
* driver. In that case we should skip initializing the corresponding
|
||||
* outputs.
|
||||
*/
|
||||
if (intel_hti_uses_phy(dev_priv, phy)) {
|
||||
if (intel_hti_uses_phy(display, phy)) {
|
||||
drm_dbg_kms(&dev_priv->drm, "PORT %c / PHY %c reserved by HTI\n",
|
||||
port_name(port), phy_name(phy));
|
||||
return;
|
||||
|
@ -453,7 +453,7 @@ int intel_display_driver_probe_nogem(struct drm_i915_private *i915)
|
||||
if (i915->display.cdclk.max_cdclk_freq == 0)
|
||||
intel_update_max_cdclk(i915);
|
||||
|
||||
intel_hti_init(i915);
|
||||
intel_hti_init(display);
|
||||
|
||||
/* Just disable it once at startup */
|
||||
intel_vga_disable(i915);
|
||||
|
@ -3339,6 +3339,7 @@ static int icl_get_combo_phy_dpll(struct intel_atomic_state *state,
|
||||
struct intel_crtc *crtc,
|
||||
struct intel_encoder *encoder)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
|
||||
struct intel_crtc_state *crtc_state =
|
||||
intel_atomic_get_new_crtc_state(state, crtc);
|
||||
@ -3379,7 +3380,7 @@ static int icl_get_combo_phy_dpll(struct intel_atomic_state *state,
|
||||
}
|
||||
|
||||
/* Eliminate DPLLs from consideration if reserved by HTI */
|
||||
dpll_mask &= ~intel_hti_dpll_mask(i915);
|
||||
dpll_mask &= ~intel_hti_dpll_mask(display);
|
||||
|
||||
port_dpll->pll = intel_find_shared_dpll(state, crtc,
|
||||
&port_dpll->hw_state,
|
||||
|
@ -9,33 +9,33 @@
|
||||
#include "intel_hti.h"
|
||||
#include "intel_hti_regs.h"
|
||||
|
||||
void intel_hti_init(struct drm_i915_private *i915)
|
||||
void intel_hti_init(struct intel_display *display)
|
||||
{
|
||||
/*
|
||||
* If the platform has HTI, we need to find out whether it has reserved
|
||||
* any display resources before we create our display outputs.
|
||||
*/
|
||||
if (DISPLAY_INFO(i915)->has_hti)
|
||||
i915->display.hti.state = intel_de_read(i915, HDPORT_STATE);
|
||||
if (DISPLAY_INFO(display)->has_hti)
|
||||
display->hti.state = intel_de_read(display, HDPORT_STATE);
|
||||
}
|
||||
|
||||
bool intel_hti_uses_phy(struct drm_i915_private *i915, enum phy phy)
|
||||
bool intel_hti_uses_phy(struct intel_display *display, enum phy phy)
|
||||
{
|
||||
if (drm_WARN_ON(&i915->drm, phy == PHY_NONE))
|
||||
if (drm_WARN_ON(display->drm, phy == PHY_NONE))
|
||||
return false;
|
||||
|
||||
return i915->display.hti.state & HDPORT_ENABLED &&
|
||||
i915->display.hti.state & HDPORT_DDI_USED(phy);
|
||||
return display->hti.state & HDPORT_ENABLED &&
|
||||
display->hti.state & HDPORT_DDI_USED(phy);
|
||||
}
|
||||
|
||||
u32 intel_hti_dpll_mask(struct drm_i915_private *i915)
|
||||
u32 intel_hti_dpll_mask(struct intel_display *display)
|
||||
{
|
||||
if (!(i915->display.hti.state & HDPORT_ENABLED))
|
||||
if (!(display->hti.state & HDPORT_ENABLED))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Note: This is subtle. The values must coincide with what's defined
|
||||
* for the platform.
|
||||
*/
|
||||
return REG_FIELD_GET(HDPORT_DPLL_USED_MASK, i915->display.hti.state);
|
||||
return REG_FIELD_GET(HDPORT_DPLL_USED_MASK, display->hti.state);
|
||||
}
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct drm_i915_private;
|
||||
struct intel_display;
|
||||
enum phy;
|
||||
|
||||
void intel_hti_init(struct drm_i915_private *i915);
|
||||
bool intel_hti_uses_phy(struct drm_i915_private *i915, enum phy phy);
|
||||
u32 intel_hti_dpll_mask(struct drm_i915_private *i915);
|
||||
void intel_hti_init(struct intel_display *display);
|
||||
bool intel_hti_uses_phy(struct intel_display *display, enum phy phy);
|
||||
u32 intel_hti_dpll_mask(struct intel_display *display);
|
||||
|
||||
#endif /* __INTEL_HTI_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user