Commit 0bc12bcb authored by Rodrigo Vivi's avatar Rodrigo Vivi Committed by Daniel Vetter

drm/i915: Introduce intel_psr.c

No functional changes. Just cleaning and reorganizing it.

v2: Rebase it puting it to begin of psr rework. This helps to blame easily
at least latest changes.
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a4f1289e
...@@ -51,6 +51,7 @@ i915-y += intel_audio.o \ ...@@ -51,6 +51,7 @@ i915-y += intel_audio.o \
intel_frontbuffer.o \ intel_frontbuffer.o \
intel_modes.o \ intel_modes.o \
intel_overlay.o \ intel_overlay.o \
intel_psr.o \
intel_sideband.o \ intel_sideband.o \
intel_sprite.o intel_sprite.o
i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
......
...@@ -1583,7 +1583,7 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder) ...@@ -1583,7 +1583,7 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)
intel_dp_stop_link_train(intel_dp); intel_dp_stop_link_train(intel_dp);
intel_edp_backlight_on(intel_dp); intel_edp_backlight_on(intel_dp);
intel_edp_psr_enable(intel_dp); intel_psr_enable(intel_dp);
} }
if (intel_crtc->config.has_audio) { if (intel_crtc->config.has_audio) {
...@@ -1609,7 +1609,7 @@ static void intel_disable_ddi(struct intel_encoder *intel_encoder) ...@@ -1609,7 +1609,7 @@ static void intel_disable_ddi(struct intel_encoder *intel_encoder)
if (type == INTEL_OUTPUT_EDP) { if (type == INTEL_OUTPUT_EDP) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder); struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
intel_edp_psr_disable(intel_dp); intel_psr_disable(intel_dp);
intel_edp_backlight_off(intel_dp); intel_edp_backlight_off(intel_dp);
} }
} }
......
...@@ -12449,7 +12449,7 @@ static void intel_setup_outputs(struct drm_device *dev) ...@@ -12449,7 +12449,7 @@ static void intel_setup_outputs(struct drm_device *dev)
if (SUPPORTS_TV(dev)) if (SUPPORTS_TV(dev))
intel_tv_init(dev); intel_tv_init(dev);
intel_edp_psr_init(dev); intel_psr_init(dev);
for_each_intel_encoder(dev, encoder) { for_each_intel_encoder(dev, encoder) {
encoder->base.possible_crtcs = encoder->crtc_mask; encoder->base.possible_crtcs = encoder->crtc_mask;
......
This diff is collapsed.
...@@ -999,21 +999,16 @@ void intel_edp_backlight_off(struct intel_dp *intel_dp); ...@@ -999,21 +999,16 @@ void intel_edp_backlight_off(struct intel_dp *intel_dp);
void intel_edp_panel_vdd_on(struct intel_dp *intel_dp); void intel_edp_panel_vdd_on(struct intel_dp *intel_dp);
void intel_edp_panel_on(struct intel_dp *intel_dp); void intel_edp_panel_on(struct intel_dp *intel_dp);
void intel_edp_panel_off(struct intel_dp *intel_dp); void intel_edp_panel_off(struct intel_dp *intel_dp);
void intel_edp_psr_enable(struct intel_dp *intel_dp);
void intel_edp_psr_disable(struct intel_dp *intel_dp);
void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate); void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate);
void intel_edp_psr_invalidate(struct drm_device *dev,
unsigned frontbuffer_bits);
void intel_edp_psr_flush(struct drm_device *dev,
unsigned frontbuffer_bits);
void intel_edp_psr_init(struct drm_device *dev);
void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connector); void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connector);
void intel_dp_mst_suspend(struct drm_device *dev); void intel_dp_mst_suspend(struct drm_device *dev);
void intel_dp_mst_resume(struct drm_device *dev); void intel_dp_mst_resume(struct drm_device *dev);
int intel_dp_max_link_bw(struct intel_dp *intel_dp); int intel_dp_max_link_bw(struct intel_dp *intel_dp);
void intel_dp_hot_plug(struct intel_encoder *intel_encoder); void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv); void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv);
uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes);
void intel_dp_unpack_aux(uint32_t src, uint8_t *dst, int dst_bytes);
/* intel_dp_mst.c */ /* intel_dp_mst.c */
int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port); void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port);
...@@ -1117,6 +1112,16 @@ void intel_backlight_register(struct drm_device *dev); ...@@ -1117,6 +1112,16 @@ void intel_backlight_register(struct drm_device *dev);
void intel_backlight_unregister(struct drm_device *dev); void intel_backlight_unregister(struct drm_device *dev);
/* intel_psr.c */
bool intel_psr_is_enabled(struct drm_device *dev);
void intel_psr_enable(struct intel_dp *intel_dp);
void intel_psr_disable(struct intel_dp *intel_dp);
void intel_psr_invalidate(struct drm_device *dev,
unsigned frontbuffer_bits);
void intel_psr_flush(struct drm_device *dev,
unsigned frontbuffer_bits);
void intel_psr_init(struct drm_device *dev);
/* intel_runtime_pm.c */ /* intel_runtime_pm.c */
int intel_power_domains_init(struct drm_i915_private *); int intel_power_domains_init(struct drm_i915_private *);
void intel_power_domains_fini(struct drm_i915_private *); void intel_power_domains_fini(struct drm_i915_private *);
......
...@@ -156,7 +156,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj, ...@@ -156,7 +156,7 @@ void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
intel_mark_fb_busy(dev, obj->frontbuffer_bits, ring); intel_mark_fb_busy(dev, obj->frontbuffer_bits, ring);
intel_edp_psr_invalidate(dev, obj->frontbuffer_bits); intel_psr_invalidate(dev, obj->frontbuffer_bits);
} }
/** /**
...@@ -182,7 +182,7 @@ void intel_frontbuffer_flush(struct drm_device *dev, ...@@ -182,7 +182,7 @@ void intel_frontbuffer_flush(struct drm_device *dev,
intel_mark_fb_busy(dev, frontbuffer_bits, NULL); intel_mark_fb_busy(dev, frontbuffer_bits, NULL);
intel_edp_psr_flush(dev, frontbuffer_bits); intel_psr_flush(dev, frontbuffer_bits);
/* /*
* FIXME: Unconditional fbc flushing here is a rather gross hack and * FIXME: Unconditional fbc flushing here is a rather gross hack and
......
This diff is collapsed.
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