Bug 105950 - radeonsi: OpenCL not working correctly on a big endian machine
Summary: radeonsi: OpenCL not working correctly on a big endian machine
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 17.3
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-09 10:52 UTC by Bas Vermeulen
Modified: 2018-09-09 22:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch for si_vgt_param_key endian fix (1.59 KB, patch)
2018-04-09 11:16 UTC, Bas Vermeulen
Details | Splinter Review
Patch for dispatch_packet endianness fix (2.77 KB, patch)
2018-04-09 11:17 UTC, Bas Vermeulen
Details | Splinter Review

Description Bas Vermeulen 2018-04-09 10:52:17 UTC
Running any OpenCL program on a big endian machine using a radeonsi card fails.

- union si_vgt_param_key uses a bitfield shared with a 32 bit value. This causes the index to be wrong on a big endian machine, and crashes any OpenCL program with a segfault.
- si_setup_user_sgprs_co_v2 in si_compute.c fills a dispatch_packet struct with values which are uploaded to the GPU. To ensure this works correctly, these values need to be converted to little endian.

I'll send patches to the mesa-dev list for both these issues.

Bas Vermeulen
Comment 1 Bas Vermeulen 2018-04-09 11:16:49 UTC
Created attachment 138697 [details] [review]
Patch for si_vgt_param_key endian fix
Comment 2 Bas Vermeulen 2018-04-09 11:17:19 UTC
Created attachment 138698 [details] [review]
Patch for dispatch_packet endianness fix
Comment 3 Timothy Arceri 2018-09-09 22:43:59 UTC
These patches were committed. Closing as fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.