[Intel-gfx] [PATCH i-g-t] core_prop_blob ioctl_wrappers: Fix new tests/benchmarks for android

Daniel Stone daniel at fooishbar.org
Tue Oct 13 09:56:21 PDT 2015


Hi,

On 13 October 2015 at 16:35, Daniel Vetter <daniel at ffwll.ch> wrote:
>> +void igt_require_propblob(int fd)
>> +{
>> +     struct local_drm_mode_create_blob c;
>> +     struct local_drm_mode_destroy_blob d;
>> +     uint32_t blob_data;
>> +     c.data = &blob_data;
>> +     c.length = sizeof(blob_data);
>> +
>> +     igt_require(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_CREATEPROPBLOB, &c) == 0);
>> +     d.blob_id = c.blob_id;
>> +     igt_require(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_DESTROYPROPBLOB, &d) == 0);
>> +}
>
> If you want to do this in the library the usual way is to wrap the ioctls
> as functions and put the relevant -ENOTTY check in there as an
> igt_require, followed by an igt_assert for anything else that might have
> gone wrong.
>
> I'd just keep this in the test as a static function though, since then you
> don't have to write api docs ;-)

I have no real opinion either way; apologies for breaking the build!
Is Android up-to-date with libdrm, or? If it's not, I suspect
kms_atomic.c should just be excluded from the Android build
altogether.

Cheers,
Daniel


More information about the Intel-gfx mailing list