Skip to content
  • Emil Velikov's avatar
    pipe-loader: move dup(fd) within pipe_loader_drm_probe_fd · 6ccc435e
    Emil Velikov authored
    
    
    Currently pipe_loader_drm_probe_fd takes ownership of the fd given.
    To match that, pipe_loader_release closes it.
    
    Yet we have many instances which do not want the change of ownership,
    and thus duplicate the fd before passing it to the pipe-loader.
    
    Move the dup() within pipe-loader, explicitly document that and document
    all the cases through the codebase.
    
    A trivial git grep -2 pipe_loader_release makes things as obvious as it
    gets ;-)
    
    Cc: Leo Liu <leo.liu@amd.com>
    Cc: Thomas Hellstrom <thellstrom@vmware.com>
    Cc: Axel Davy <davyaxel0@gmail.com>
    Cc: Patrick Rudolph <siro@das-labor.org>
    Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
    Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Axel Davy <davyaxel0@gmail.com> (for nine)
    6ccc435e