tiling: Convert framebuffer helpers to use fb modifiers

This converts the IGT API only, underneath legacy set_tiling is still used.

v2: One got away in kms_flip.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Tvrtko Ursulin
2015-03-03 14:11:01 +00:00
committed by Damien Lespiau
parent 672e88acb7
commit e36091d1c7
23 changed files with 91 additions and 81 deletions
+14 -12
View File
@@ -285,7 +285,8 @@ static bool init_modeset_params_for_type(struct mode_set_data *data,
return false;
igt_create_fb(drm_fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888, I915_TILING_NONE, &params->fb);
DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE,
&params->fb);
cr = igt_get_cairo_ctx(drm_fd, &params->fb);
igt_paint_test_pattern(cr, mode->hdisplay, mode->vdisplay);
cairo_destroy(cr);
@@ -1508,12 +1509,12 @@ static void cursor_subtest(bool dpms)
igt_require(default_mode_params);
crtc_id = default_mode_params->crtc_id;
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
&cursor_fb1);
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_NONE,
&cursor_fb2);
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888, I915_TILING_X,
&cursor_fb3);
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
LOCAL_DRM_FORMAT_MOD_NONE, &cursor_fb1);
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
LOCAL_DRM_FORMAT_MOD_NONE, &cursor_fb2);
igt_create_fb(drm_fd, 64, 64, DRM_FORMAT_ARGB8888,
LOCAL_I915_FORMAT_MOD_X_TILED, &cursor_fb3);
fill_igt_fb(&cursor_fb1, 0xFF00FFFF);
fill_igt_fb(&cursor_fb2, 0xFF00FF00);
@@ -1620,7 +1621,7 @@ static void test_one_plane(bool dpms, uint32_t plane_id,
uint32_t crtc_id;
struct igt_fb plane_fb1, plane_fb2;
int32_t crtc_x = 0, crtc_y = 0;
unsigned int tiling;
uint64_t tiling;
disable_all_screens_and_wait(&ms_data);
@@ -1632,19 +1633,19 @@ static void test_one_plane(bool dpms, uint32_t plane_id,
plane_format = DRM_FORMAT_XRGB8888;
plane_w = 64;
plane_h = 64;
tiling = I915_TILING_X;
tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
break;
case PLANE_PRIMARY:
plane_format = DRM_FORMAT_XRGB8888;
plane_w = default_mode_params->mode->hdisplay;
plane_h = default_mode_params->mode->vdisplay;
tiling = I915_TILING_X;
tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
break;
case PLANE_CURSOR:
plane_format = DRM_FORMAT_ARGB8888;
plane_w = 64;
plane_h = 64;
tiling = I915_TILING_NONE;
tiling = LOCAL_DRM_FORMAT_MOD_NONE;
break;
default:
igt_assert(0);
@@ -1763,7 +1764,8 @@ static void fences_subtest(bool dpms)
params.connector_id = default_mode_params->connector_id;
params.mode = default_mode_params->mode;
igt_create_fb(drm_fd, params.mode->hdisplay, params.mode->vdisplay,
DRM_FORMAT_XRGB8888, I915_TILING_X, &params.fb);
DRM_FORMAT_XRGB8888, LOCAL_I915_FORMAT_MOD_X_TILED,
&params.fb);
/* Even though we passed "true" as the tiling argument, double-check
* that the fb is really tiled. */