mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
drm/i915/cdclk: abstract intel_cdclk_read_hw()
Add intel_cdclk_read_hw() function to avoid looking at struct intel_cdclk_state internals outside of intel_cdclk.c. intel_cdclk_init_hw() would be a better name, but we already have that. Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://lore.kernel.org/r/ef720d37bfeee933d59b64e382dc976f3c9fade1.1750847509.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
082fe699af
commit
f0bb81b275
|
|
@ -3869,3 +3869,15 @@ void intel_cdclk_force_min_cdclk(struct intel_cdclk_state *cdclk_state, int forc
|
|||
{
|
||||
cdclk_state->force_min_cdclk = force_min_cdclk;
|
||||
}
|
||||
|
||||
void intel_cdclk_read_hw(struct intel_display *display)
|
||||
{
|
||||
struct intel_cdclk_state *cdclk_state;
|
||||
|
||||
cdclk_state = to_intel_cdclk_state(display->cdclk.obj.state);
|
||||
|
||||
intel_update_cdclk(display);
|
||||
intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");
|
||||
cdclk_state->actual = display->cdclk.hw;
|
||||
cdclk_state->logical = display->cdclk.hw;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,5 +102,6 @@ int intel_cdclk_min_cdclk(const struct intel_cdclk_state *cdclk_state, enum pipe
|
|||
int intel_cdclk_bw_min_cdclk(const struct intel_cdclk_state *cdclk_state);
|
||||
bool intel_cdclk_pmdemand_needs_update(struct intel_atomic_state *state);
|
||||
void intel_cdclk_force_min_cdclk(struct intel_cdclk_state *cdclk_state, int force_min_cdclk);
|
||||
void intel_cdclk_read_hw(struct intel_display *display);
|
||||
|
||||
#endif /* __INTEL_CDCLK_H__ */
|
||||
|
|
|
|||
|
|
@ -84,16 +84,10 @@ bool intel_display_driver_probe_defer(struct pci_dev *pdev)
|
|||
|
||||
void intel_display_driver_init_hw(struct intel_display *display)
|
||||
{
|
||||
struct intel_cdclk_state *cdclk_state;
|
||||
|
||||
if (!HAS_DISPLAY(display))
|
||||
return;
|
||||
|
||||
cdclk_state = to_intel_cdclk_state(display->cdclk.obj.state);
|
||||
|
||||
intel_update_cdclk(display);
|
||||
intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");
|
||||
cdclk_state->logical = cdclk_state->actual = display->cdclk.hw;
|
||||
intel_cdclk_read_hw(display);
|
||||
|
||||
intel_display_wa_apply(display);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user