summaryrefslogtreecommitdiff
path: root/tests/kms_rotation_crc.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-07-08 11:55:20 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-11 15:12:21 +0100
commit0506f106233552b7b19c89d851f004a5bf236828 (patch)
tree3eb8961b36402ec1857fbcac5e085b87aeee0051 /tests/kms_rotation_crc.c
parente3611394cc72540cfa7c8cd39339bd405336ba1f (diff)
kms_rotation_crc: Make check_plane_type() static
Clearly, someone tried to solve the following warning: kms_rotation_crc.c:189:6: warning: no previous prototype for ‘check_plane_type’ [-Wmissing-prototypes] Without really understanding what was the warning about. Make check_plane_type() static and move it before its user to get rid of the forward declaration. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/kms_rotation_crc.c')
-rw-r--r--tests/kms_rotation_crc.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 74a52cdb..6249e0f0 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -65,7 +65,6 @@ typedef struct {
int rotate;
} data_t;
-bool check_plane_type(int drm_fd, uint32_t plane_id, uint32_t type);
int set_plane_property(data_t *data, int plane_id, const char *prop_name, int
val, igt_crc_t *crc_output);
void test_sprite_rotation(data_t *data);
@@ -187,6 +186,28 @@ bool prepare_crtc(data_t *data)
return true;
}
+static bool check_plane_type(int drm_fd, uint32_t plane_id, uint32_t type)
+{
+ int i = 0;
+ drmModeObjectPropertiesPtr props = NULL;
+
+ props = drmModeObjectGetProperties(drm_fd, plane_id, DRM_MODE_OBJECT_PLANE);
+
+ for (i = 0; i < props->count_props; i++)
+ {
+ drmModePropertyPtr prop = drmModeGetProperty(drm_fd, props->props[i]);
+
+ if (strcmp(prop->name, "type") == 0)
+ {
+ if (props->prop_values[i] == type) {
+ return true;
+ }
+ igt_info("Didn't find the requested type:%u\n", (unsigned int)props->prop_values[i]);
+ }
+ }
+ return false;
+}
+
static int connector_find_plane(int gfx_fd, uint32_t pipe, uint32_t type)
{
drmModePlaneRes *plane_resources;
@@ -228,28 +249,6 @@ static int connector_find_plane(int gfx_fd, uint32_t pipe, uint32_t type)
return 0;
}
-bool check_plane_type(int drm_fd, uint32_t plane_id, uint32_t type)
-{
- int i = 0;
- drmModeObjectPropertiesPtr props = NULL;
-
- props = drmModeObjectGetProperties(drm_fd, plane_id, DRM_MODE_OBJECT_PLANE);
-
- for (i = 0; i < props->count_props; i++)
- {
- drmModePropertyPtr prop = drmModeGetProperty(drm_fd, props->props[i]);
-
- if (strcmp(prop->name, "type") == 0)
- {
- if (props->prop_values[i] == type) {
- return true;
- }
- igt_info("Didn't find the requested type:%u\n", (unsigned int)props->prop_values[i]);
- }
- }
- return false;
-}
-
int set_plane_property(data_t *data, int plane_id, const char *prop_name, int
val, igt_crc_t *crc_output)
{