tests/pm_pc8: fix compilation errors
PATCH 1/2 tests/pm_pc8: fix compilation errors
--- tests/pm_pc8.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
tests/pm_pc8.c +6 -7
@@ -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 ;
Signature · 1 line
1.7.9.5
2013/11/12 Mika Kuoppala <[email protected]>:
Quoted 1 line
Signed-off-by Mika Kuoppala <[email protected]>
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
Quoted 64 lines
--- tests/pm_pc8.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)tests/pm_pc8.c +6
-8@@ -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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Paulo Zanoni
Quoted 7 lines · Paulo Zanoni
2013/11/12 Mika Kuoppala <[email protected]>:
Quoted 1 line
Signed-off-by Mika Kuoppala <[email protected]>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]
Quoted 4 lines
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
Quoted 72 lines
Thanks,
PauloQuoted 64 lines
--- tests/pm_pc8.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)tests/pm_pc8.c +6
-8@@ -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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Paulo Zanoni
2013/11/12 Mika Kuoppala <[email protected]>:
Quoted 16 lines
Quoted 7 lines · Paulo Zanoni
2013/11/12 Mika Kuoppala <[email protected]>:
Quoted 1 line
Signed-off-by Mika Kuoppala <[email protected]>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]
Quoted 6 lines
Quoted 4 lines
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
Quoted 75 lines
-Mika
Quoted 72 lines
Thanks,
PauloQuoted 60 lines
--- tests/pm_pc8.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)tests/pm_pc8.c +6
-8@@ -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
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx--
Paulo Zanoni
Signature · 1 line
Paulo Zanoni