[Intel-gfx] [PATCH] drm/i915: save/restore fence registers across suspend/resume

Dan Nicholson dbn.lists at gmail.com
Thu Apr 30 23:01:55 CEST 2009


On Thu, Apr 30, 2009 at 1:58 PM, Keith Packard <keithp at keithp.com> wrote:
> This makes software fallbacks not do tiling wrong on i965 and later after
> resume. It also should fix 945 performance reduction after resume which
> would have disabled tiling without causing any visible effect.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h     |    7 +++++++
>  drivers/gpu/drm/i915/i915_suspend.c |   24 ++++++++++++++++++++++++
>  2 files changed, 31 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 2506592..aa90884 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -283,6 +283,7 @@ typedef struct drm_i915_private {
>        u8 saveAR[21];
>        u8 saveDACMASK;
>        u8 saveCR[37];
> +       uint64_t saveFENCE[16];
>
>        struct {
>                struct drm_mm gtt_space;
> @@ -712,6 +713,12 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
>                                 writel(upper_32_bits(val), dev_priv->regs + \
>                                        (reg) + 4))
>  #endif
> +#ifdef readq
> +#define I915_READ64(reg)       readq(dev_priv->regs + (reg))
> +#else
> +#define I915_READ64(reg, val)  (((uint64_t) readl(dev_priv->regs + (reg))) | \
> +                                ((uint64_t) readl(dev_priv->regs + (reg) + 4) << 32))
> +#endif

This still has an invalid "val" argument in the fallback READ64.

--
Dan



More information about the Intel-gfx mailing list