aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2015-12-04 16:09:05 -0500
committerAlex Deucher <alexander.deucher@amd.com>2015-12-09 00:23:56 -0500
commit361c32d39087e7caa99e629c0d7fb00643cb2190 (patch)
treec5af46977fdc9a490098e6f7f459d960ba796a01 /drivers/gpu
parent687f4b98d1f4e27508f7ad4bcce787c1ba58b289 (diff)
radeon: Fix VCE IB test on Big-Endian systems
This patch makes the VCE IB test pass on Big-Endian systems. It converts to little-endian the contents of the VCE message. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_vce.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vce.c b/drivers/gpu/drm/radeon/radeon_vce.c
index 86f57e473a4e..7eb1ae758906 100644
--- a/drivers/gpu/drm/radeon/radeon_vce.c
+++ b/drivers/gpu/drm/radeon/radeon_vce.c
@@ -361,31 +361,31 @@ int radeon_vce_get_create_msg(struct radeon_device *rdev, int ring,
361 361
362 /* stitch together an VCE create msg */ 362 /* stitch together an VCE create msg */
363 ib.length_dw = 0; 363 ib.length_dw = 0;
364 ib.ptr[ib.length_dw++] = 0x0000000c; /* len */ 364 ib.ptr[ib.length_dw++] = cpu_to_le32(0x0000000c); /* len */
365 ib.ptr[ib.length_dw++] = 0x00000001; /* session cmd */ 365 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000001); /* session cmd */
366 ib.ptr[ib.length_dw++] = handle; 366 ib.ptr[ib.length_dw++] = cpu_to_le32(handle);
367 367
368 ib.ptr[ib.length_dw++] = 0x00000030; /* len */ 368 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000030); /* len */
369 ib.ptr[ib.length_dw++] = 0x01000001; /* create cmd */ 369 ib.ptr[ib.length_dw++] = cpu_to_le32(0x01000001); /* create cmd */
370 ib.ptr[ib.length_dw++] = 0x00000000; 370 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000000);
371 ib.ptr[ib.length_dw++] = 0x00000042; 371 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000042);
372 ib.ptr[ib.length_dw++] = 0x0000000a; 372 ib.ptr[ib.length_dw++] = cpu_to_le32(0x0000000a);
373 ib.ptr[ib.length_dw++] = 0x00000001; 373 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000001);
374 ib.ptr[ib.length_dw++] = 0x00000080; 374 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000080);
375 ib.ptr[ib.length_dw++] = 0x00000060; 375 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000060);
376 ib.ptr[ib.length_dw++] = 0x00000100; 376 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000100);
377 ib.ptr[ib.length_dw++] = 0x00000100; 377 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000100);
378 ib.ptr[ib.length_dw++] = 0x0000000c; 378 ib.ptr[ib.length_dw++] = cpu_to_le32(0x0000000c);
379 ib.ptr[ib.length_dw++] = 0x00000000; 379 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000000);
380 380
381 ib.ptr[ib.length_dw++] = 0x00000014; /* len */ 381 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000014); /* len */
382 ib.ptr[ib.length_dw++] = 0x05000005; /* feedback buffer */ 382 ib.ptr[ib.length_dw++] = cpu_to_le32(0x05000005); /* feedback buffer */
383 ib.ptr[ib.length_dw++] = upper_32_bits(dummy); 383 ib.ptr[ib.length_dw++] = cpu_to_le32(upper_32_bits(dummy));
384 ib.ptr[ib.length_dw++] = dummy; 384 ib.ptr[ib.length_dw++] = cpu_to_le32(dummy);
385 ib.ptr[ib.length_dw++] = 0x00000001; 385 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000001);
386 386
387 for (i = ib.length_dw; i < ib_size_dw; ++i) 387 for (i = ib.length_dw; i < ib_size_dw; ++i)
388 ib.ptr[i] = 0x0; 388 ib.ptr[i] = cpu_to_le32(0x0);
389 389
390 r = radeon_ib_schedule(rdev, &ib, NULL, false); 390 r = radeon_ib_schedule(rdev, &ib, NULL, false);
391 if (r) { 391 if (r) {
@@ -428,21 +428,21 @@ int radeon_vce_get_destroy_msg(struct radeon_device *rdev, int ring,
428 428
429 /* stitch together an VCE destroy msg */ 429 /* stitch together an VCE destroy msg */
430 ib.length_dw = 0; 430 ib.length_dw = 0;
431 ib.ptr[ib.length_dw++] = 0x0000000c; /* len */ 431 ib.ptr[ib.length_dw++] = cpu_to_le32(0x0000000c); /* len */
432 ib.ptr[ib.length_dw++] = 0x00000001; /* session cmd */ 432 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000001); /* session cmd */
433 ib.ptr[ib.length_dw++] = handle; 433 ib.ptr[ib.length_dw++] = cpu_to_le32(handle);
434 434
435 ib.ptr[ib.length_dw++] = 0x00000014; /* len */ 435 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000014); /* len */
436 ib.ptr[ib.length_dw++] = 0x05000005; /* feedback buffer */ 436 ib.ptr[ib.length_dw++] = cpu_to_le32(0x05000005); /* feedback buffer */
437 ib.ptr[ib.length_dw++] = upper_32_bits(dummy); 437 ib.ptr[ib.length_dw++] = cpu_to_le32(upper_32_bits(dummy));
438 ib.ptr[ib.length_dw++] = dummy; 438 ib.ptr[ib.length_dw++] = cpu_to_le32(dummy);
439 ib.ptr[ib.length_dw++] = 0x00000001; 439 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000001);
440 440
441 ib.ptr[ib.length_dw++] = 0x00000008; /* len */ 441 ib.ptr[ib.length_dw++] = cpu_to_le32(0x00000008); /* len */
442 ib.ptr[ib.length_dw++] = 0x02000001; /* destroy cmd */ 442 ib.ptr[ib.length_dw++] = cpu_to_le32(0x02000001); /* destroy cmd */
443 443
444 for (i = ib.length_dw; i < ib_size_dw; ++i) 444 for (i = ib.length_dw; i < ib_size_dw; ++i)
445 ib.ptr[i] = 0x0; 445 ib.ptr[i] = cpu_to_le32(0x0);
446 446
447 r = radeon_ib_schedule(rdev, &ib, NULL, false); 447 r = radeon_ib_schedule(rdev, &ib, NULL, false);
448 if (r) { 448 if (r) {