Re: [PATCH 1/2] drm/i915: Stop lying about the WOPCM size

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

 



Quoting Ville Syrjala (2018-07-17 13:53:19)
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Most plattforms don't have a fixed 1MiB WOPCM so stop saying that they
> do.
> 
> Also toss in a FIXME about actually using the WOPCM size we probed from
> the hardware instead of assuming the fixed 1MiB size.
> 
> Cc: Jackie Li <yaodong.li@xxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Michał Winiarski <michal.winiarski@xxxxxxxxx>

Michał wrote a near identical patch

> ---
>  drivers/gpu/drm/i915/intel_wopcm.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
> index 74bf76f3fddc..75c7a2b0c869 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -71,6 +71,12 @@
>   */
>  void intel_wopcm_init_early(struct intel_wopcm *wopcm)
>  {
> +       struct drm_i915_private *i915 = wopcm_to_i915(wopcm);
> +
> +       if (!HAS_GUC(i915))
> +               return;
> +
> +       /* FIXME use the size we actually probed from the hardware */
>         wopcm->size = GEN9_WOPCM_SIZE;
>  
>         DRM_DEBUG_DRIVER("WOPCM size: %uKiB\n", wopcm->size / 1024);
> @@ -163,7 +169,8 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)
>         u32 guc_wopcm_rsvd;
>         int err;
>  
> -       GEM_BUG_ON(!wopcm->size);
> +       if (!wopcm->size)
> +               return 0;

...except he chose to keep the GEM_BUG_ON. My personal preference would
be to use the driver value (wopcm->size) here, so 

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

but if Michał et al feel strongly that they would rather keep the !size
sanity check, they need to speak up now :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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