[PATCH] drm/amdgpu: fix missing endian-safe guard
Deucher, Alexander
Alexander.Deucher at amd.com
Thu Aug 10 13:50:48 UTC 2017
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Evan Quan
> Sent: Thursday, August 10, 2017 3:20 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Quan, Evan
> Subject: [PATCH] drm/amdgpu: fix missing endian-safe guard
>
> Change-Id: I84a838d2d14318c1514f5146ae81ab58560b767b
> Signed-off-by: Evan Quan <evan.quan at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> index 92b925e..d450a96 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> @@ -659,7 +659,7 @@ static int amdgpu_cgs_get_firmware_info(struct
> cgs_device *cgs_device,
> info->version = (uint16_t)le32_to_cpu(header-
> >header.ucode_version);
>
> if (CGS_UCODE_ID_CP_MEC == type)
> - info->image_size = (header->jt_offset) << 2;
> + info->image_size = le32_to_cpu(header->jt_offset)
> << 2;
>
> info->fw_version =
> amdgpu_get_firmware_version(cgs_device, type);
> info->feature_version = (uint16_t)le32_to_cpu(header-
> >ucode_feature_version);
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list