Re: [PATCH 01/15] drm/i915: vlv: clean up GTLC wake control/status register macros

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

 



Well, first of all I couldn't find the regs definitions. I decided to
do this review during fly but I didn't had this regs definitions on
VLV docs I have here with me. Could you please point me to the correct
docs?

Anyway this patch isn't really modifying any behaviour. So I would
tend to let my Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> here
anyway. Considering that the original author of changes plus the first
reviewer already agreed with you.

On Tue, Apr 8, 2014 at 1:57 PM, Imre Deak <imre.deak@xxxxxxxxx> wrote:
> These will be needed by the upcoming VLV RPM helpers.
>
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem.c |  5 +++--
>  drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++--
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 6370a76..d000d0f 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4458,8 +4458,9 @@ int i915_gem_init(struct drm_device *dev)
>
>         if (IS_VALLEYVIEW(dev)) {
>                 /* VLVA0 (potential hack), BIOS isn't actually waking us */
> -               I915_WRITE(VLV_GTLC_WAKE_CTRL, 1);
> -               if (wait_for((I915_READ(VLV_GTLC_PW_STATUS) & 1) == 1, 10))
> +               I915_WRITE(VLV_GTLC_WAKE_CTRL, VLV_GTLC_ALLOWWAKEREQ);
> +               if (wait_for((I915_READ(VLV_GTLC_PW_STATUS) &
> +                             VLV_GTLC_ALLOWWAKEACK), 10))
>                         DRM_DEBUG_DRIVER("allow wake ack timed out\n");
>         }
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 8e60737..0997da3 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -4985,9 +4985,15 @@ enum punit_power_well {
>  #define  FORCEWAKE_ACK_HSW                     0x130044
>  #define  FORCEWAKE_ACK                         0x130090
>  #define  VLV_GTLC_WAKE_CTRL                    0x130090
> +#define   VLV_GTLC_RENDER_CTX_EXISTS           (1 << 25)
> +#define   VLV_GTLC_MEDIA_CTX_EXISTS            (1 << 24)
> +#define   VLV_GTLC_ALLOWWAKEREQ                        (1 << 0)
> +
>  #define  VLV_GTLC_PW_STATUS                    0x130094
> -#define VLV_GTLC_PW_RENDER_STATUS_MASK         0x80
> -#define VLV_GTLC_PW_MEDIA_STATUS_MASK          0x20
> +#define   VLV_GTLC_ALLOWWAKEACK                        (1 << 0)
> +#define   VLV_GTLC_ALLOWWAKEERR                        (1 << 1)
> +#define   VLV_GTLC_PW_MEDIA_STATUS_MASK                (1 << 5)
> +#define   VLV_GTLC_PW_RENDER_STATUS_MASK       (1 << 7)
>  #define  FORCEWAKE_MT                          0xa188 /* multi-threaded */
>  #define   FORCEWAKE_KERNEL                     0x1
>  #define   FORCEWAKE_USER                       0x2
> --
> 1.8.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




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