[Intel-gfx] [PATCH i-g-t 3/6] lib/igt_kms: don't store rotation property id twice
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Thu May 12 12:58:09 UTC 2016
Now that we load all properties regardless of atomic, the rotation
property id is redundant.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
lib/igt_kms.c | 9 ++++-----
lib/igt_kms.h | 4 +---
tests/kms_rotation_crc.c | 4 ++--
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index bccf148..d932b3b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1286,9 +1286,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
get_plane_property(display->drm_fd, drm_plane->plane_id,
"rotation",
- &plane->rotation_property,
- &prop_value,
- NULL);
+ NULL, &prop_value, NULL);
plane->rotation = (igt_rotation_t)prop_value;
}
@@ -1728,8 +1726,9 @@ static int igt_drm_plane_commit(igt_plane_t *plane,
plane->size_changed = false;
if (plane->rotation_changed) {
- ret = igt_plane_set_property(plane, plane->rotation_property,
- plane->rotation);
+ ret = igt_plane_set_property(plane,
+ plane->properties[IGT_PLANE_ROTATION],
+ plane->rotation);
plane->rotation_changed = false;
CHECK_RETURN(ret, fail_on_error);
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index d6b92cf..7ce554f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -242,8 +242,6 @@ typedef struct {
drmModePlane *drm_plane;
struct igt_fb *fb;
- uint32_t rotation_property;
-
/* position within pipe_src_w x pipe_src_h */
int crtc_x, crtc_y;
/* size within pipe_src_w x pipe_src_h */
@@ -328,7 +326,7 @@ bool igt_pipe_get_property(igt_pipe_t *pipe, const char *name,
static inline bool igt_plane_supports_rotation(igt_plane_t *plane)
{
- return plane->rotation_property != 0;
+ return plane->properties[IGT_PLANE_ROTATION] != 0;
}
void igt_pipe_set_degamma_lut(igt_pipe_t *pipe, void *ptr, size_t length);
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 6cc1533..c70fb8b 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -377,7 +377,7 @@ static void test_plane_rotation_ytiled_obj(data_t *data, enum igt_plane plane_ty
drmModeObjectSetProperty(fd, plane->drm_plane->plane_id,
DRM_MODE_OBJECT_PLANE,
- plane->rotation_property,
+ plane->properties[IGT_PLANE_ROTATION],
plane->rotation);
ret = igt_display_try_commit2(display, commit);
@@ -469,7 +469,7 @@ static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan
drmModeObjectSetProperty(fd, plane->drm_plane->plane_id,
DRM_MODE_OBJECT_PLANE,
- plane->rotation_property,
+ plane->properties[IGT_PLANE_ROTATION],
plane->rotation);
ret = igt_display_try_commit2(display, commit);
if (ret) {
--
2.8.1
More information about the Intel-gfx
mailing list