* Patch "drm/radeon: properly byte swap vce firmware setup" has been added to the 4.4-stable tree
@ 2016-03-01 20:01 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-03-01 20:01 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/radeon: properly byte swap vce firmware setup
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-properly-byte-swap-vce-firmware-setup.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From cc78eb22885bba64445cde438ba098de0104920f Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Fri, 22 Jan 2016 00:13:15 -0500
Subject: drm/radeon: properly byte swap vce firmware setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Alex Deucher <alexander.deucher@amd.com>
commit cc78eb22885bba64445cde438ba098de0104920f upstream.
Firmware is LE. Need to properly byteswap some of the fields
so they are interpreted correctly by the driver on BE systems.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/radeon/vce_v1_0.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/gpu/drm/radeon/vce_v1_0.c
+++ b/drivers/gpu/drm/radeon/vce_v1_0.c
@@ -178,12 +178,12 @@ int vce_v1_0_load_fw(struct radeon_devic
return -EINVAL;
}
- for (i = 0; i < sign->num; ++i) {
- if (sign->val[i].chip_id == chip_id)
+ for (i = 0; i < le32_to_cpu(sign->num); ++i) {
+ if (le32_to_cpu(sign->val[i].chip_id) == chip_id)
break;
}
- if (i == sign->num)
+ if (i == le32_to_cpu(sign->num))
return -EINVAL;
data += (256 - 64) / 4;
@@ -191,18 +191,18 @@ int vce_v1_0_load_fw(struct radeon_devic
data[1] = sign->val[i].nonce[1];
data[2] = sign->val[i].nonce[2];
data[3] = sign->val[i].nonce[3];
- data[4] = sign->len + 64;
+ data[4] = cpu_to_le32(le32_to_cpu(sign->len) + 64);
memset(&data[5], 0, 44);
memcpy(&data[16], &sign[1], rdev->vce_fw->size - sizeof(*sign));
- data += data[4] / 4;
+ data += le32_to_cpu(data[4]) / 4;
data[0] = sign->val[i].sigval[0];
data[1] = sign->val[i].sigval[1];
data[2] = sign->val[i].sigval[2];
data[3] = sign->val[i].sigval[3];
- rdev->vce.keyselect = sign->val[i].keyselect;
+ rdev->vce.keyselect = le32_to_cpu(sign->val[i].keyselect);
return 0;
}
Patches currently in stable-queue which might be from alexander.deucher@amd.com are
queue-4.4/drm-amdgpu-fix-s4-resume.patch
queue-4.4/drm-amdgpu-use-post-decrement-in-error-handling.patch
queue-4.4/drm-radeon-properly-byte-swap-vce-firmware-setup.patch
queue-4.4/drm-amdgpu-drop-topaz-support-from-gmc8-module.patch
queue-4.4/drm-amdgpu-remove-exp-hardware-support-from-iceland.patch
queue-4.4/drm-add-drm_fixp_from_fraction-and-drm_fixp2int_ceil.patch
queue-4.4/drm-amdgpu-fix-issue-with-overlapping-userptrs.patch
queue-4.4/drm-radeon-fix-dp-audio-support-for-apu-with-dce4.1-display-engine.patch
queue-4.4/drm-amdgpu-pull-topaz-gmc-bits-into-gmc_v7.patch
queue-4.4/drm-radeon-clean-up-fujitsu-quirks.patch
queue-4.4/drm-amdgpu-the-vi-specific-exe-bit-should-only-apply-to-gmc-v8.0-above.patch
queue-4.4/drm-radeon-cleaned-up-vco-output-settings-for-dp-audio.patch
queue-4.4/drm-radeon-call-hpd_irq_event-on-resume.patch
queue-4.4/drm-amdgpu-move-gmc7-support-out-of-cik-dependency.patch
queue-4.4/drm-amdgpu-iceland-use-ci-based-mc-ip.patch
queue-4.4/drm-dp-mst-process-broadcast-messages-correctly.patch
queue-4.4/drm-amdgpu-fix-amdgpu_bo_pin_restricted-vram-placing-v2.patch
queue-4.4/drm-radeon-mask-out-wc-from-bo-on-unsupported-arches.patch
queue-4.4/drm-dp-mst-fix-in-rad-element-access.patch
queue-4.4/drm-amdgpu-remove-unnecessary-forward-declaration.patch
queue-4.4/drm-dp-mst-move-guid-storage-from-mgr-port-to-only-mst-branch.patch
queue-4.4/drm-amdgpu-fix-tonga-smu-resume.patch
queue-4.4/drm-amdgpu-don-t-load-mec2-on-topaz.patch
queue-4.4/drm-amdgpu-no-need-to-load-mc-firmware-on-fiji.patch
queue-4.4/drm-amdgpu-pm-adjust-display-configuration-after-powerstate.patch
queue-4.4/drm-add-helper-to-check-for-wc-memory-support.patch
queue-4.4/drm-dp-mst-always-send-reply-for-up-request.patch
queue-4.4/drm-amdgpu-don-t-hang-in-amdgpu_flip_work_func-on-disabled-crtc.patch
queue-4.4/drm-amdgpu-call-hpd_irq_event-on-resume.patch
queue-4.4/drm-dp-mst-calculate-mst-pbn-with-31.32-fixed-point.patch
queue-4.4/drm-amdgpu-hold-reference-to-fences-in-amdgpu_sa_bo_new-v2.patch
queue-4.4/drm-radeon-fix-slow-audio-over-dp-on-dce8.patch
queue-4.4/drm-dp-mst-fix-in-mstb-rad-initialization.patch
queue-4.4/drm-dp-mst-reverse-order-of-mst-enable-and-clearing-vc-payload-table.patch
queue-4.4/drm-radeon-add-a-common-function-for-dfs-handling.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-01 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 20:01 Patch "drm/radeon: properly byte swap vce firmware setup" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.