[Intel-gfx] [PATCH 1/2] tests/pm_pc8: fix compilation errors
Mika Kuoppala
mika.kuoppala at linux.intel.com
Tue Nov 12 18:00:55 CET 2013
Paulo Zanoni <przanoni at gmail.com> writes:
> 2013/11/12 Mika Kuoppala <mika.kuoppala at linux.intel.com>:
>> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
>
> Hi
>
> My compiler doesn't give me these errors. Do you use some special
> compilation flags?
No special flags.
Compiler is upset with these:
pm_pc8.c:1018:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
pm_pc8.c:1020:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> I'm still doing a lot of changes to this file this week, can you
> please wait a few days before pushing these? Otherwise they will
> conflict with my local patches.
>
Sure, just do casts in your local tree and drop this patch.
-Mika
> Thanks,
> Paulo
>
>> ---
>> tests/pm_pc8.c | 13 ++++++-------
>> 1 file changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c
>> index e17be1b..75f30cf 100644
>> --- a/tests/pm_pc8.c
>> +++ b/tests/pm_pc8.c
>> @@ -248,8 +248,7 @@ static void enable_one_screen(struct mode_set_data *data)
>> igt_assert(enable_one_screen_with_type(data, SCREEN_TYPE_ANY));
>> }
>>
>> -static drmModePropertyBlobPtr get_connector_edid(drmModeConnectorPtr connector,
>> - int index)
>> +static drmModePropertyBlobPtr get_connector_edid(drmModeConnectorPtr connector)
>> {
>> unsigned int i;
>> drmModeObjectPropertiesPtr props;
>> @@ -287,7 +286,7 @@ static void init_mode_set_data(struct mode_set_data *data)
>> for (i = 0; i < data->res->count_connectors; i++) {
>> data->connectors[i] = drmModeGetConnector(drm_fd,
>> data->res->connectors[i]);
>> - data->edids[i] = get_connector_edid(data->connectors[i], i);
>> + data->edids[i] = get_connector_edid(data->connectors[i]);
>> }
>>
>> data->devid = intel_get_drm_devid(drm_fd);
>> @@ -320,7 +319,7 @@ static void get_drm_info(struct compare_data *data)
>> for (i = 0; i < data->res->count_connectors; i++) {
>> data->connectors[i] = drmModeGetConnector(drm_fd,
>> data->res->connectors[i]);
>> - data->edids[i] = get_connector_edid(data->connectors[i], i);
>> + data->edids[i] = get_connector_edid(data->connectors[i]);
>> }
>> for (i = 0; i < data->res->count_encoders; i++)
>> data->encoders[i] = drmModeGetEncoder(drm_fd,
>> @@ -1015,9 +1014,9 @@ static void submit_blt_cmd(uint32_t dst_handle, uint32_t x, uint32_t y,
>>
>> objs[1].handle = batch_handle;
>> objs[1].relocation_count = 1;
>> - objs[1].relocs_ptr = (uint64_t) relocs;
>> + objs[1].relocs_ptr = (uintptr_t) relocs;
>>
>> - execbuf.buffers_ptr = (uint64_t) objs;
>> + execbuf.buffers_ptr = (uintptr_t) objs;
>> execbuf.buffer_count = 2;
>> execbuf.batch_len = batch_size;
>> execbuf.flags = I915_EXEC_BLT;
>> @@ -1160,7 +1159,7 @@ static void gem_execbuf_stress_subtest(void)
>>
>> objs[0].handle = handle;
>>
>> - execbuf.buffers_ptr = (uint64_t) objs;
>> + execbuf.buffers_ptr = (uintptr_t) objs;
>> execbuf.buffer_count = 1;
>> execbuf.batch_len = batch_size;
>> execbuf.flags = I915_EXEC_RENDER;
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
More information about the Intel-gfx
mailing list