Message ID | 1555734295-31015-4-git-send-email-john.stultz@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | libdrm: Patches from AOSP | expand |
On Sat, Apr 20, 2019 at 12:25 AM John Stultz <john.stultz@linaro.org> wrote: > > From: Prabhanjan Kandula <pkandula@codeaurora.org> > > Avoid additional drm device open and close. > > Cc: Emil Velikov <emil.velikov@collabora.com> > Cc: Sean Paul <seanpaul@chromium.org> > Cc: Alistair Strachan <astrachan@google.com> > Cc: Marissa Wall <marissaw@google.com> > Signed-off-by: John Stultz <john.stultz@linaro.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > xf86drm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xf86drm.c b/xf86drm.c > index fe822ca..2c19376 100644 > --- a/xf86drm.c > +++ b/xf86drm.c > @@ -750,8 +750,8 @@ drm_public int drmOpen(const char *name, const char *busid) > */ > drm_public int drmOpenWithType(const char *name, const char *busid, int type) > { > - if (!drmAvailable() && name != NULL && drm_server_info && > - drm_server_info->load_module) { > + if (name != NULL && drm_server_info && > + drm_server_info->load_module && !drmAvailable()) { > /* try to load the kernel module */ > if (!drm_server_info->load_module(name)) { > drmMsg("[drm] failed to load kernel module \"%s\"\n", name); > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/xf86drm.c b/xf86drm.c index fe822ca..2c19376 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -750,8 +750,8 @@ drm_public int drmOpen(const char *name, const char *busid) */ drm_public int drmOpenWithType(const char *name, const char *busid, int type) { - if (!drmAvailable() && name != NULL && drm_server_info && - drm_server_info->load_module) { + if (name != NULL && drm_server_info && + drm_server_info->load_module && !drmAvailable()) { /* try to load the kernel module */ if (!drm_server_info->load_module(name)) { drmMsg("[drm] failed to load kernel module \"%s\"\n", name);