[PATCH 11/11] drm/i915: Hook PSR functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/6/26 Rodrigo Vivi <rodrigo.vivi at gmail.com>:
> PSR must be enabled after transcoder and port are running.
> And it is only available for HSW.
>
> v2: move enable/disable to intel_ddi
> v3: The spec suggests PSR should be disabled even before backlight (by pzanoni)
> v4: also disabling and enabling whenever panel is disabled/enabled.
> v5: make it last patch to avoid breaking whenever bisecting. So calling for
>     update and force exit came to this patch along with enable/disable calls.
>
> CC: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c      | 2 ++
>  drivers/gpu/drm/i915/intel_ddi.c     | 2 ++
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  drivers/gpu/drm/i915/intel_dp.c      | 2 ++
>  4 files changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index c68b90f..f2e135b 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3786,6 +3786,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
>                 goto unlock;
>         }
>
> +       intel_edp_psr_force_exit(dev);
> +
>         /* Count all active objects as busy, even if they are currently not used
>          * by the gpu. Users of this interface expect objects to eventually
>          * become non-busy without any further actions, therefore emit any
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 324211a..4211925 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1117,6 +1117,7 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)
>                         intel_dp_stop_link_train(intel_dp);
>
>                 ironlake_edp_backlight_on(intel_dp);
> +               intel_edp_psr_enable(intel_dp);
>         }
>
>         if (intel_crtc->eld_vld && type != INTEL_OUTPUT_EDP) {
> @@ -1147,6 +1148,7 @@ static void intel_disable_ddi(struct intel_encoder *intel_encoder)
>         if (type == INTEL_OUTPUT_EDP) {
>                 struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>
> +               intel_edp_psr_disable(intel_dp);
>                 ironlake_edp_backlight_off(intel_dp);
>         }
>  }
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 6fafa43..5bbfed0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2236,6 +2236,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>         }
>
>         intel_update_fbc(dev);
> +       intel_edp_psr_update(dev);
>         mutex_unlock(&dev->struct_mutex);
>
>         intel_crtc_update_sarea_pos(crtc, x, y);
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 9986484..019b1ff 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1668,6 +1668,7 @@ static void intel_disable_dp(struct intel_encoder *encoder)
>         /* Make sure the panel is off before trying to change the mode. But also
>          * ensure that we have vdd while we switch off the panel. */
>         ironlake_edp_panel_vdd_on(intel_dp);
> +       intel_edp_psr_disable(intel_dp);
>         ironlake_edp_backlight_off(intel_dp);
>         intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
>         ironlake_edp_panel_off(intel_dp);
> @@ -1708,6 +1709,7 @@ static void intel_enable_dp(struct intel_encoder *encoder)
>         intel_dp_complete_link_train(intel_dp);
>         intel_dp_stop_link_train(intel_dp);
>         ironlake_edp_backlight_on(intel_dp);
> +       intel_edp_psr_enable(intel_dp);
>
>         if (IS_VALLEYVIEW(dev)) {
>                 struct intel_digital_port *dport =

Functions intel_enable_dp and intel_disable_dp are not used on
Haswell, so I guess we don't need those calls, right?

> --
> 1.8.1.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Paulo Zanoni


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux