[Mesa-dev] [PATCH 11/27] gbm: Get modifiers from DRI

Ben Widawsky ben at bwidawsk.net
Mon Dec 26 16:24:19 UTC 2016


On 16-12-02 09:43:07, Daniel Stone wrote:
>Hi Ben,
>
>On 1 December 2016 at 22:09, Ben Widawsky <benjamin.widawsky at intel.com> wrote:
>> @@ -678,6 +679,28 @@ gbm_dri_bo_get_offset(struct gbm_bo *_bo, int plane)
>>     return (uint32_t)offset;
>>  }
>>
>> +static uint64_t
>> +gbm_dri_bo_get_modifier(struct gbm_bo *_bo)
>> +{
>> +   struct gbm_dri_device *dri = gbm_dri_device(_bo->gbm);
>> +   struct gbm_dri_bo *bo = gbm_dri_bo(_bo);
>> +
>> +   if (!dri->image || dri->image->base.version < 14) {
>> +      errno = ENOSYS;
>> +      return 0;
>> +   }
>
>Sticking this here prevents my cursor crash:
>+   /* Dumb buffers have no modifiers */
>+   if (!bo->image)
>+      return 0;
>
>Cheers,
>Daniel

Got it. Thanks.


More information about the mesa-dev mailing list