<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - vdpau-GL interop fails due to different screen objects"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73200#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - vdpau-GL interop fails due to different screen objects"
href="https://bugs.freedesktop.org/show_bug.cgi?id=73200">bug 73200</a>
from <span class="vcard"><a class="email" href="mailto:emil.l.velikov@gmail.com" title="Emil Velikov <emil.l.velikov@gmail.com>"> <span class="fn">Emil Velikov</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=73200#c6">comment #6</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=93520" name="attach_93520" title="cache dri fd">attachment 93520</a> <a href="attachment.cgi?id=93520&action=edit" title="cache dri fd">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=73200&attachment=93520'>[review]</a> [review]
> cache dri fd
>
> Based on the radeon version, cache inode major/minor to only create a single
> screen.
>
> Does this fix things?</span >
Haven't tested it, but noticed a couple of interesting things
* util_hash_table_create can fail
fd_tab = util_hash_table_create(hash_fd, compare_fd);
+ assert(fd_tab);
* if screen fails, we are at the mercy of the compiler if we null ptr deref or
not
+ if (screen)
+ util_hash_table_set(fd_tab, intptr_to_pointer(fd), screen);
+ return &screen->base;
+ if (!screen)
+ return NULL;
+ util_hash_table_set(fd_tab, intptr_to_pointer(fd), screen);
+ return &screen->base;
* nouveau_drm_screen_unref might need a prototype to build.
* drop the fd_tab check in nouveau_drm_screen_unref. it must be non NULL at
this point
* fold nouveau_drm_screen_unref uses into nouveau_screen_fini()</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>