diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-07-01 12:46:52 +1000 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-08-12 10:43:36 +1000 |
commit | b23c19d7ea84326ca6216e591e6bf1de6ca94f06 (patch) | |
tree | a16130590ba8cff2fa9b192cacd915fab20f6485 /sys/dev | |
parent | af828e3320436aa4da7339a4879d61a0b48c704d (diff) |
drm/radeon: fix endian bugs in atom_allocate_fb_scratch(), from 3.8.13
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/radeon/atom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/radeon/atom.c b/sys/dev/pci/drm/radeon/atom.c index ff22cf0851a..caddef7eb88 100644 --- a/sys/dev/pci/drm/radeon/atom.c +++ b/sys/dev/pci/drm/radeon/atom.c @@ -1390,10 +1390,10 @@ int atom_allocate_fb_scratch(struct atom_context *ctx) firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset); DRM_DEBUG("atom firmware requested %08x %dkb\n", - firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, - firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); + le32_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware), + le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb)); - usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; + usage_bytes = le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb) * 1024; } ctx->scratch_size_bytes = 0; if (usage_bytes == 0) |