[PATCH 1/8] include: Move ascii85 functions from i915 to linux/ascii85.h

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 8 17:50:06 UTC 2018


Quoting Jordan Crouse (2018-02-08 17:31:50)
> The i915 DRM driver very cleverly used ascii85 encoding for their
> GPU state file. Move the encode functions to a general header file to
> support other drivers that might be interested in the same
> functionality.
> 
> [v2 - Update the API to be cleaner for the caller suggested by
> Chris Wilson]
> 
> Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>
> ---
> @@ -545,19 +523,15 @@ static void print_error_obj(struct drm_i915_error_state_buf *m,
>  
>         err_compression_marker(m);
>         for (page = 0; page < obj->page_count; page++) {
> -               int i, len;
> +               int i;
> +               long len = PAGE_SIZE;

Please keep len = PAGE_SIZE below, so that the computation of len is
grouped. In fact, just ignore the s/int/long/ here as we know it is
bounded to int.

With that,
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Pick a tree where you want this applied...
-Chris


More information about the dri-devel mailing list