[Nouveau] [Bug 73200] vdpau-GL interop fails due to different screen objects

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 6 08:36:06 PST 2014


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

--- Comment #7 from Emil Velikov <emil.l.velikov at gmail.com> ---
(In reply to comment #6)
> Created attachment 93520 [details] [review]
> cache dri fd
> 
> Based on the radeon version, cache inode major/minor to only create a single
> screen.
> 
> Does this fix things?

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()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140206/d2706105/attachment.html>


More information about the Nouveau mailing list