[Mesa-dev] [PATCH 5/5] loader: Factor out the common driver opening logic from each loader.

Eric Anholt eric at anholt.net
Fri Nov 16 21:50:26 UTC 2018


Eric Engestrom <eric.engestrom at intel.com> writes:

> On Thursday, 2018-11-15 15:05:27 -0800, Eric Anholt wrote:
>> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
>> index f32c0cd9885f..8f035b7c7d84 100644
>> --- a/src/gbm/backends/dri/gbm_dri.c
>> +++ b/src/gbm/backends/dri/gbm_dri.c
>> @@ -301,31 +301,21 @@ dri_bind_extensions(struct gbm_dri_device *dri,
>>     return ret;
>>  }
>>  
>> +static void
>> +gbm_loader_log(int level, const char *fmt, ...)
>> +{
>> +   if (level > _LOADER_WARNING)
>> +      return;
>> +
>> +   va_list ap;
>> +   va_start(ap, fmt);
>> +   vfprintf(stderr, fmt, ap);
>> +   va_end(ap);
>> +}
>
> Why? This is the exact behaviour of the default_logger() :)
>
> If you still want to add it, I'd do it in a separate commit, since it
> has nothing to do with the rest of this patch.
>
> With gbm_loader_log() split out, this is:
> Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>

Thanks.  I wrote this when confused by my dlopen() information not
printing in the gbm case (because the useful debug is at a lower level
and can't be upgraded in severity because we expect some dlopen()s to
fail in the normal case).  I ended up cutting out the level check while
debugging, and never went back and confirmed that it was useful with the
check in at all!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181116/f873500f/attachment.sig>


More information about the mesa-dev mailing list