[PATCH] drm/amd/amdgpu: change pptable output format from ASCII to binary

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

 



Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 07/30/2016 04:36 AM, Eric Huang wrote:
> Signed-off-by: Eric Huang <JinHuiEric.Huang at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index c4bb4ef..cded082 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -305,7 +305,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
>  	struct drm_device *ddev = dev_get_drvdata(dev);
>  	struct amdgpu_device *adev = ddev->dev_private;
>  	char *table = NULL;
> -	int size, i;
> +	int size;
>  
>  	if (adev->pp_enabled)
>  		size = amdgpu_dpm_get_pp_table(adev, &table);
> @@ -315,10 +315,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
>  	if (size >= PAGE_SIZE)
>  		size = PAGE_SIZE - 1;
>  
> -	for (i = 0; i < size; i++) {
> -		sprintf(buf + i, "%02x", table[i]);
> -	}
> -	sprintf(buf + i, "\n");
> +	memcpy(buf, table, size);
>  
>  	return size;
>  }
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20160730/5da65b0b/attachment.sig>


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

  Powered by Linux