[Bug 110774] Xorg segfault on cpu which does not support PAT

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 28 18:52:40 UTC 2019


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

--- Comment #4 from Kenneth Graunke <kenneth at whitecape.org> ---
(In reply to Snir Sheriber from comment #3)
> The kernel is already failing DRM_IOCTL_I915_GEM_MMAP with I915_MMAP_WC flag
> if PAT is not supported so that brw_bo_map_wc returns null.
> 
> I'm not familiar with this code nor the graphical stack but as i saw on
> other code parts usually when brw_bo_map is called the returned value is
> checked, in this case calling brw_bo_map assumes success, which results in
> segfault.

No, in almost all cases we assume maps work.  In a few cases we do the bare
minimum of punting the problem up to the caller, but in almost no case will it
actually work out well.

> (BTW is it possible to somehow not to avoid the gtt_map in this case?)

In theory, we could blit everything via the 3D pipe every time we wanted to map
a buffer, but that's expensive and impractical...in general, no, it's not
really plausible to avoid mapping.

I could certainly detect this case and fail to load the driver with a message,
which is probably preferable to crashing...but do you need this case to work?

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


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