From: François Tigeot Date: Sun, 22 Feb 2015 16:01:15 +0000 (+0100) Subject: drm/i915: Restore gcc 5.0 fixes X-Git-Tag: v4.2.0rc~765 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/b83b7d5d975bedc0a37be6d68f1b48a428e93813 drm/i915: Restore gcc 5.0 fixes They were originally added by John Marino in eecf6c3c3b6f7127edd8b8f8c2a83e2f882ed0da and overwritten by the Linux 3.11 update. Noticed-by: Rolinh --- diff --git a/sys/dev/drm/i915/i915_gem_tiling.c b/sys/dev/drm/i915/i915_gem_tiling.c index 64af0a1ace..83116af5da 100644 --- a/sys/dev/drm/i915/i915_gem_tiling.c +++ b/sys/dev/drm/i915/i915_gem_tiling.c @@ -485,7 +485,8 @@ i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj) for (i = 0; i < page_count; i++) { char new_bit_17 = VM_PAGE_TO_PHYS(obj->pages[i]) >> 17; if ((new_bit_17 & 0x1) != - (test_bit(i, obj->bit_17) != 0)) { + /* gcc5.0 -Werror=logical-not-parenthesis fix */ + (test_bit(i, obj->bit_17) ? 1 : 0)) { i915_gem_swizzle_page(obj->pages[i]); vm_page_dirty(obj->pages[i]); } diff --git a/sys/dev/drm/i915/intel_display.c b/sys/dev/drm/i915/intel_display.c index 9d462b0675..1e30fa3470 100644 --- a/sys/dev/drm/i915/intel_display.c +++ b/sys/dev/drm/i915/intel_display.c @@ -9695,7 +9695,8 @@ intel_check_plane_mapping(struct intel_crtc *crtc) val = I915_READ(reg); if ((val & DISPLAY_PLANE_ENABLE) && - (!!(val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe)) + /* gcc5.0 -Werror=logical-not-parenthesis fix */ + (!!( (val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe) )) return false; return true;