[Mesa-stable] [Mesa-dev] [PATCH] gallium/targets: fix bool setting on BE architectures
Ilia Mirkin
imirkin at alum.mit.edu
Tue Apr 18 12:52:39 UTC 2017
On Tue, Apr 18, 2017 at 2:21 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 18/04/17 01:02 PM, Ilia Mirkin wrote:
>> On Tue, Apr 18, 2017 at 12:00 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>> val_bool and val_int are in a union. val_bool gets the first byte, which
>>> happens to work on LE when setting via the int, but breaks on BE. By
>>> setting the value properly, we are able to use DRI3 on BE architectures.
>>> Tested by running glxgears with a NV34 in a G5 PPC.
>>>
>>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>>> Cc: mesa-stable at lists.freedesktop.org
>>> ---
>>> src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 8 ++++----
>>> src/gallium/targets/pipe-loader/pipe_i915.c | 2 +-
>>> src/gallium/targets/pipe-loader/pipe_msm.c | 2 +-
>>> src/gallium/targets/pipe-loader/pipe_nouveau.c | 2 +-
>>> src/gallium/targets/pipe-loader/pipe_r300.c | 2 +-
>>> src/gallium/targets/pipe-loader/pipe_r600.c | 2 +-
>>> src/gallium/targets/pipe-loader/pipe_radeonsi.c | 2 +-
>>> 7 files changed, 10 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
>>> index aba814b..a4f5cfc 100644
>>> --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
>>> +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
>>> @@ -64,13 +64,13 @@ static const struct pipe_loader_ops pipe_loader_drm_ops;
>>>
>>> #ifdef GALLIUM_STATIC_TARGETS
>>> static const struct drm_conf_ret throttle_ret = {
>>> - DRM_CONF_INT,
>>> - {2},
>>> + .type = DRM_CONF_INT,
>>> + .val.val_int = 2,
>>> };
>
> This (whole hunk?) looks unrelated, should be in a separate patch. For
> the rest,
It's stylistically related, since it's 2 lines above the share_fd_ret
definition, and I thought it'd look odd to have the two structs
defined in the two different styles. Please confirm that you want me
to leave this hunk out.
>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
>
>
> --
> Earthling Michel Dänzer | http://www.amd.com
> Libre software enthusiast | Mesa and X developer
More information about the mesa-stable
mailing list