Bug 89739

Summary: [HSW 3.19.2]igt/gem_mmap_wc/invalid-flags fails
Product: DRI Reporter: lu hua <huax.lu>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: christophe.prigent, intel-gfx-bugs, przanoni
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: HSW i915 features: GEM/Other
Attachments:
Description Flags
dmesg none

Description lu hua 2015-03-24 05:22:39 UTC
Created attachment 114571 [details]
dmesg

==System Environment==
--------------------------
Regression: not sure
It fails on 3.19.2 and 3.18.0, works well on the latest -fixes kernel and -nightly kernel.

Non-working platforms: HSW

==kernel==
--------------------------
commit 660613d1a4e94144490850b6c3d350331860fac4
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Mar 18 14:11:52 2015 +0100

    Linux 3.19.2

==Bug detailed description==
-----------------------------
It fails on 3.19.2 and 3.18.0 kernel, works well on the latest -fixes kernel and -nightly kernel.
Following cases also fails:
gem_mmap_wc/read-write
gem_mmap_wc/write-read

output:
IGT-Version: 1.10-ge7d26df (x86_64) (Linux: 3.19.2_v3.19.2+ x86_64)
Test assertion failure function test_invalid_flags, file gem_mmap_wc.c:107:
Failed assertion: drmIoctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0x40 + 0x06)) << 0) | ((((sizeof(drm_i915_getparam_t)))) << ((0+8)+8)))), (&gp)) == 0
Last errno: 22, Invalid argument
Subtest invalid-flags failed.
**** DEBUG ****
Test assertion failure function test_invalid_flags, file gem_mmap_wc.c:107:
Failed assertion: drmIoctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0x40 + 0x06)) << 0) | ((((sizeof(drm_i915_getparam_t)))) << ((0+8)+8)))), (&gp)) == 0
Last errno: 22, Invalid argument
****  END  ****
Subtest invalid-flags: FAIL (0.000s)

Reproduce steps:
-------------------------
1. ./gem_mmap_wc --run-subtest invalid-flags
Comment 1 Paulo Zanoni 2015-08-04 19:11:49 UTC
I suppose getparam returns -EINVAL because those Kernels don't support the feature.

I guess this bug is not HSW-specific.
Comment 2 Paulo Zanoni 2015-08-04 19:54:40 UTC
Please test the following patch:

http://patchwork.freedesktop.org/patch/56226/

Thanks,
Paulo
Comment 3 Paulo Zanoni 2015-08-05 20:40:27 UTC
We merged the IGT patch:

"tests/gem_mmap_wc: don't fail if the Kernel is too old for the getparam flag"
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/commit/?id=cd33b47a47251eadd21815bfd2ecc8529c7bcf6d

Please reopen the bug if it still happens.
Comment 4 Armando Antonio 2017-07-13 19:06:56 UTC
I tested this test case with the latest kernel and it working well. 

======================================
             Software
======================================
kernel version              : 4.12.0-drm-tip-ww28-commit-7b50499+
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 4.6
bios release date           : 03/02/2017

======================================
        Graphic drivers
======================================
mesa                        : 17.0.3
modesetting                 : modesetting_drv.so
xorg-xserver                : 1.19.3
libdrm                      : 2.4.81
cairo                       : 1.14.8
xserver                     : X.Org X Server 1.19.99.1
intel-gpu-tools (tag)       : intel-gpu-tools-1.18-211-g00ce341b
intel-gpu-tools (commit)    : 00ce341b

======================================
             Hardware
======================================
platform                   : HSW-Nuc
motherboard id             : D54250WYK
form factor                : Desktop
cpu family                 : Core i5
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
gpu card                   : Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 3.79 GB
max memory ram             : 16 GB
display resolution         : 4800x1080
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 69
cpu stepping               : 1
socket                     : Socket LGA1150
signature                  : Type 0, Family 6, Model 69, Stepping 1
hard drive                 : 223GiB (240GB)
current cd clock frequency : 450000 kHz
maximum cd clock frequency : 450000 kHz
displays connected         : DP-1

======================================
             Firmware
======================================

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.