drm/i915: Restore gcc 5.0 fixes
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 22 Feb 2015 16:01:15 +0000 (17:01 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 22 Feb 2015 16:08:29 +0000 (17:08 +0100)
They were originally added by John Marino in
eecf6c3c3b6f7127edd8b8f8c2a83e2f882ed0da and overwritten
by the Linux 3.11 update.

Noticed-by: Rolinh
sys/dev/drm/i915/i915_gem_tiling.c
sys/dev/drm/i915/intel_display.c

index 64af0a1..83116af 100644 (file)
@@ -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]);
                }
index 9d462b0..1e30fa3 100644 (file)
@@ -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;