sna/video: Add tiling modifiers for addfb2
In case we do end up with a tiled buffer, create the framebuffer appropriately. Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f3809df493
commit
6d7e13f78b
|
|
@ -282,15 +282,30 @@ sna_video_sprite_show(struct sna *sna,
|
|||
uint32_t handles[4];
|
||||
uint32_t pitches[4]; /* pitch for each plane */
|
||||
uint32_t offsets[4]; /* offset of each plane */
|
||||
uint64_t modifiers[4];
|
||||
} f;
|
||||
bool purged = true;
|
||||
|
||||
memset(&f, 0, sizeof(f));
|
||||
f.width = frame->width;
|
||||
f.height = frame->height;
|
||||
f.flags = 1 << 1; /* +modifiers */
|
||||
f.handles[0] = frame->bo->handle;
|
||||
f.pitches[0] = frame->pitch[0];
|
||||
|
||||
switch (frame->bo->tiling) {
|
||||
case I915_TILING_NONE:
|
||||
break;
|
||||
case I915_TILING_X:
|
||||
/* I915_FORMAT_MOD_X_TILED */
|
||||
f.modifiers[0] = (uint64_t)1 << 56 | 1;
|
||||
break;
|
||||
case I915_TILING_Y:
|
||||
/* I915_FORMAT_MOD_X_TILED */
|
||||
f.modifiers[0] = (uint64_t)1 << 56 | 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (frame->id) {
|
||||
case FOURCC_RGB565:
|
||||
f.pixel_format = DRM_FORMAT_RGB565;
|
||||
|
|
|
|||
Loading…
Reference in New Issue