[RFC 3/6] drm/i915: Set up fb modifier on initial takeover

Tvrtko Ursulin
2015-01-30T17:37:24Z

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Initialize the simulated ioctl with the new modifier token so it can
be passed on in line with the new API usage.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3d220a6..4425e86 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2382,8 +2382,11 @@ intel_alloc_plane_obj(struct intel_crtc *crtc,
return false;

obj->tiling_mode = plane_config->tiling;
- if (obj->tiling_mode == I915_TILING_X)
+ if (obj->tiling_mode == I915_TILING_X) {
obj->stride = crtc->base.primary->fb->pitches[0];
+ mode_cmd.flags = DRM_MODE_FB_MODIFIERS;
+ mode_cmd.modifier[0] = I915_FORMAT_MOD_X_TILED;
+ }

mode_cmd.pixel_format = crtc->base.primary->fb->pixel_format;
mode_cmd.width = crtc->base.primary->fb->width;
--
2.2.2