On 05/29/2015 12:51 AM, Emil Velikov wrote: > Seems like I'm either too subtle and/or too stingy earlier. > > If drmAvailable() returns false, we have two options: > - opt for the old-schoold (dri1) and ask drm_server_info to load the > module for us, or > - bail out, as neither drmOpenByBusid() or drmOpenByName() will be > able to open the device considering that a DRM module is not loaded. > > So what I was hinting earlier was to make the above more obvious, > rather than reordering the arguments in the if clause. How does that > sound ? > I'm unhappy about to open DRM device always via drmAvailable(). IMHO it's enough to check DRM device can be open by drmOpenByBusid() or drmOpenByName() if don't load module and actually i expect DRM device is open only once when call drmOpenWithType(). > Thanks > Emil > > On 28 May 2015 at 15:15, Daniel Kurtz <djkurtz@xxxxxxxxxx> wrote: >> It's not necessary if we are about to skip the rest of the if clause anyway >> because name is NULL. >> >> On May 28, 2015 9:14 PM, "Emil Velikov" <emil.l.velikov@xxxxxxxxx> wrote: >>> >>> On 28 May 2015 at 00:57, Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> wrote: >>>> This is to remove to open the DRM device unnecessarily as call >>>> drmAvailable() when name is NULL or drm_server_info is NULL in >>>> drmOpenWithType function. >>>> >>> Why do you believe that calling drmAvailable() is not necessary ? If >>> that's the case should one just nuke the call all together ? >>> >>> -Emil >>> _______________________________________________ >>> dri-devel mailing list >>> dri-devel@xxxxxxxxxxxxxxxxxxxxx >>> http://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel