• Dave Airlie's avatar
    drm/udl: move to embedding drm device inside udl device. · a5fb6a7e
    Dave Airlie authored
    commit 6ecac85eadb9d4065b9038fa3d3c66d49038e14b upstream.
    
    This should help with some of the lifetime issues, and move us away
    from load/unload.
    
    [rez] Regarding the backport to v4.14.y, the only difference is due to
    the fact that in v4.14.y the udl_usb_probe() function still uses
    drm_dev_unref() instead of drm_dev_put().
    
    Backport notes:
    
    On Mon, Jul 15, 2019 at 09:13:08PM -0400, Sasha Levin wrote:
    > Hm, we don't need ac3b35f11a06 here? Why not? I'd love to document that
    > with the backport.
    
    Nope, we don't need that patch in the v4.14 backport.
    
    In v4.19.y we have two functions, drm_dev_put() and drm_dev_unref(), which are
    aliases for one another (drm_dev_unref() just calls drm_dev_put()).
    drm_dev_unref() is the older of the two, and was introduced back in v4.0.
    drm_dev_put() was introduced in v4.15 with
    
    9a96f550 drm: introduce drm_dev_{get/put} functions
    
    and slowly callers were moved from the old name (_unref) to the new name
    (_put).  The patch you mentioned, ac3b35f11a06, is one such patch where we are
    replacing a drm_dev_unref() call with a drm_dev_put() call.  This doesn't have
    a functional change, but was necessary so that the third patch in the v4.19.y
    series I sent would apply cleanly.
    
    For the v4.14.y series, though, the drm_dev_put() function hasn't yet been
    defined and everyone is still using drm_dev_unref().  So, we don't need a
    backport of ac3b35f11a06, and I also had a small backport change in the last
    patch of the v4.14.y series where I had to change a drm_dev_put() call with a
    drm_dev_unref() call.
    
    Just for posterity, the drm_dev_unref() calls were eventually all changed to
    drm_dev_put() in v5.0, and drm_dev_unref() was removed entirely.  That
    happened with the following two patches:
    
    808bad32ea423 drm: replace "drm_dev_unref" function with "drm_dev_put"
    ba1d345401476 drm: remove deprecated "drm_dev_unref" function
    Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190405031715.5959-4-airlied@gmail.comSigned-off-by: default avatarRoss Zwisler <zwisler@google.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    a5fb6a7e
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...