[Bug 110602] i965 miptree MCS aux_buf allocation failure with old kernels

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 3 14:17:03 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110602

            Bug ID: 110602
           Summary: i965 miptree MCS aux_buf allocation failure with old
                    kernels
           Product: Mesa
           Version: git
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/DRI/i965
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: anssi.hannula at bitwise.fi
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Created attachment 144147
  --> https://bugs.freedesktop.org/attachment.cgi?id=144147&action=edit
glxinfo

intel_miptree_choose_aux_usage() selects ISL_AUX_USAGE_MCS if
intel_miptree_supports_mcs() returns true.

This will cause callchain intel_miptree_alloc_aux() => intel_alloc_aux_buffer()
=> brw_bo_map(x,y,MAP_RAW|MAP_WRITE) => brw_bo_map_wc(), which checks
bufmgr->has_mmap_wc and returns NULL on !bufmgr->has_mmap_wc. There is no
fallback in brw_bo_map() for the MAP_RAW case.

This will cause intel_miptree_create() to fail which causes
intel_miptree_create_for_renderbuffer() to fail.

I guess either either the miptree creation should be retried without MCS or
intel_miptree_supports_mcs() should detect the missing mmap_wc support and
return false.

Attached is a quick hack patch that adds mmap_wc check in
intel_miptree_supports_mcs(), and it seems to fix the testcase I used
(mesa-issue-qt3d.cc).
Without the patch the testcase either crashes (git master) or flashes rapidly
(git master + two patches from bug #110601 to workaround the crashes).

The testcase mesa-issue-qt3d.cc is also attached, plus an apitrace and glxinfo
with git master.

This was tested on a ValleyView Gen7 (8086:0f31) with kernel 3.10.35.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20190503/d9235d18/attachment.html>


More information about the intel-3d-bugs mailing list