* [PATCH 1/2] tests/pm_pc8: fix compilation errors
@ 2013-11-12 16:10 Mika Kuoppala
2013-11-12 16:32 ` Paulo Zanoni
0 siblings, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2013-11-12 16:10 UTC (permalink / raw)
To: intel-gfx
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] tests/pm_pc8: fix compilation errors
2013-11-12 16:10 [PATCH 1/2] tests/pm_pc8: fix compilation errors Mika Kuoppala
@ 2013-11-12 16:32 ` Paulo Zanoni
2013-11-12 17:00 ` Mika Kuoppala
0 siblings, 1 reply; 4+ messages in thread
From: Paulo Zanoni @ 2013-11-12 16:32 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: Intel Graphics Development
2013/11/12 Mika Kuoppala <mika.kuoppala@linux.intel.com>:
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Hi
My compiler doesn't give me these errors. Do you use some special
compilation flags?
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.
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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Paulo Zanoni
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] tests/pm_pc8: fix compilation errors
2013-11-12 16:32 ` Paulo Zanoni
@ 2013-11-12 17:00 ` Mika Kuoppala
2013-11-12 17:07 ` Paulo Zanoni
0 siblings, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2013-11-12 17:00 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: Intel Graphics Development
Paulo Zanoni <przanoni@gmail.com> writes:
> 2013/11/12 Mika Kuoppala <mika.kuoppala@linux.intel.com>:
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@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@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
>
> --
> Paulo Zanoni
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] tests/pm_pc8: fix compilation errors
2013-11-12 17:00 ` Mika Kuoppala
@ 2013-11-12 17:07 ` Paulo Zanoni
0 siblings, 0 replies; 4+ messages in thread
From: Paulo Zanoni @ 2013-11-12 17:07 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: Intel Graphics Development
2013/11/12 Mika Kuoppala <mika.kuoppala@linux.intel.com>:
> Paulo Zanoni <przanoni@gmail.com> writes:
>
>> 2013/11/12 Mika Kuoppala <mika.kuoppala@linux.intel.com>:
>>> Signed-off-by: Mika Kuoppala <mika.kuoppala@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.
Oh I was thinking they were just warnings. If they're real errors,
please push and I'll deal with the rebase.
Thanks,
Paulo
>
> -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@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>>
>>
>> --
>> Paulo Zanoni
--
Paulo Zanoni
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-12 17:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-12 16:10 [PATCH 1/2] tests/pm_pc8: fix compilation errors Mika Kuoppala
2013-11-12 16:32 ` Paulo Zanoni
2013-11-12 17:00 ` Mika Kuoppala
2013-11-12 17:07 ` Paulo Zanoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.