<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - gbm_bo_map fails on i915 when *map_data is not NULL before call"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110855#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - gbm_bo_map fails on i915 when *map_data is not NULL before call"
href="https://bugs.freedesktop.org/show_bug.cgi?id=110855">bug 110855</a>
from <span class="vcard"><a class="email" href="mailto:lemody@gmail.com" title="Tapani Pälli <lemody@gmail.com>"> <span class="fn">Tapani Pälli</span></a>
</span></b>
<pre>(In reply to M Stoeckl from <a href="show_bug.cgi?id=110855#c0">comment #0</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=144477" name="attach_144477" title="Test case, compile with gcc -lgbm">attachment 144477</a> <a href="attachment.cgi?id=144477&action=edit" title="Test case, compile with gcc -lgbm">[details]</a></span>
> Test case, compile with gcc -lgbm
>
> The documentation for the function gbm_bo_map in src/gbm/main/gbm.c states
> that the argument void** map_data is a "Returned opaque ptr for the mapped
> region". Contrary to convention for a return value, if *map_data is not
> NULL, and the DRI i965 driver is used, then gbm_bo_map fails.
>
> The value of *map_data is checked by intel_map_image in
> src/mesa/drivers/dri/i965/intel_screen.c (line 823 in today's git master).</span >
Notably this happens with gallium drivers as well as the same check is done in
dri2_map_image (src/gallium/state_trackers/dri/dri2.c) so the bug is against
all drivers. I'm not sure why the check is there, AFAICT dri interface does not
document anything special on such case.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>