drm/i915/display: move hti under display sub-struct
Move display hti/hdport related members under drm_i915_private display sub-struct. Prefer adding anonymous sub-structs even for single members that aren't our own structs. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221109144209.3624739-2-jani.nikula@intel.com
This commit is contained in:
parent
03120feffb
commit
6274991254
3 changed files with 15 additions and 13 deletions
|
@ -370,6 +370,16 @@ struct intel_display {
|
||||||
struct mutex comp_mutex;
|
struct mutex comp_mutex;
|
||||||
} hdcp;
|
} hdcp;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
/*
|
||||||
|
* HTI (aka HDPORT) state read during initial hw readout. Most
|
||||||
|
* platforms don't have HTI, so this will just stay 0. Those
|
||||||
|
* that do will use this later to figure out which PLLs and PHYs
|
||||||
|
* are unavailable for driver usage.
|
||||||
|
*/
|
||||||
|
u32 state;
|
||||||
|
} hti;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct i915_power_domains domains;
|
struct i915_power_domains domains;
|
||||||
|
|
||||||
|
|
|
@ -16,23 +16,23 @@ void intel_hti_init(struct drm_i915_private *i915)
|
||||||
* any display resources before we create our display outputs.
|
* any display resources before we create our display outputs.
|
||||||
*/
|
*/
|
||||||
if (INTEL_INFO(i915)->display.has_hti)
|
if (INTEL_INFO(i915)->display.has_hti)
|
||||||
i915->hti_state = intel_de_read(i915, HDPORT_STATE);
|
i915->display.hti.state = intel_de_read(i915, HDPORT_STATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool intel_hti_uses_phy(struct drm_i915_private *i915, enum phy phy)
|
bool intel_hti_uses_phy(struct drm_i915_private *i915, enum phy phy)
|
||||||
{
|
{
|
||||||
return i915->hti_state & HDPORT_ENABLED &&
|
return i915->display.hti.state & HDPORT_ENABLED &&
|
||||||
i915->hti_state & HDPORT_DDI_USED(phy);
|
i915->display.hti.state & HDPORT_DDI_USED(phy);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 intel_hti_dpll_mask(struct drm_i915_private *i915)
|
u32 intel_hti_dpll_mask(struct drm_i915_private *i915)
|
||||||
{
|
{
|
||||||
if (!(i915->hti_state & HDPORT_ENABLED))
|
if (!(i915->display.hti.state & HDPORT_ENABLED))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: This is subtle. The values must coincide with what's defined
|
* Note: This is subtle. The values must coincide with what's defined
|
||||||
* for the platform.
|
* for the platform.
|
||||||
*/
|
*/
|
||||||
return REG_FIELD_GET(HDPORT_DPLL_USED_MASK, i915->hti_state);
|
return REG_FIELD_GET(HDPORT_DPLL_USED_MASK, i915->display.hti.state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,14 +300,6 @@ struct drm_i915_private {
|
||||||
|
|
||||||
struct intel_l3_parity l3_parity;
|
struct intel_l3_parity l3_parity;
|
||||||
|
|
||||||
/*
|
|
||||||
* HTI (aka HDPORT) state read during initial hw readout. Most
|
|
||||||
* platforms don't have HTI, so this will just stay 0. Those that do
|
|
||||||
* will use this later to figure out which PLLs and PHYs are unavailable
|
|
||||||
* for driver usage.
|
|
||||||
*/
|
|
||||||
u32 hti_state;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* edram size in MB.
|
* edram size in MB.
|
||||||
* Cannot be determined by PCIID. You must always read a register.
|
* Cannot be determined by PCIID. You must always read a register.
|
||||||
|
|
Loading…
Add table
Reference in a new issue