diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-10-19 14:54:44 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2016-11-10 15:57:24 +0100 |
commit | 4f19d5d20a3a15fc43f52f1f18b5c94a69aac157 (patch) | |
tree | 04b4ed6ba67a84903da2263fed52823d7fe80132 /sys/kms/gstkmsallocator.c | |
parent | b52c39e1c75d70a7ed18faf69258ef8a4e6342d0 (diff) |
kmssink: do not get kms bo pitch for planar formats
The API is ill defined for planar formats in case of dumb BOs,
do not use the reported stride in those cases.
https://bugzilla.gnome.org/show_bug.cgi?id=773473
Diffstat (limited to 'sys/kms/gstkmsallocator.c')
-rw-r--r-- | sys/kms/gstkmsallocator.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kms/gstkmsallocator.c b/sys/kms/gstkmsallocator.c index e031848d0..bd8940014 100644 --- a/sys/kms/gstkmsallocator.c +++ b/sys/kms/gstkmsallocator.c @@ -320,8 +320,12 @@ gst_kms_allocator_add_fb (GstKMSAllocator * alloc, GstKMSMemory * kmsmem, bo_handles[i] = bo_handles[0]; /* Get the bo pitch calculated by the kms driver. - * If it's defined, it will overwrite the video info's stride */ - kms_bo_get_prop (kmsmem->bo, KMS_PITCH, &pitch); + * If it's defined, it will overwrite the video info's stride. + * Since the API is completely undefined for planar formats, + * only do this for interleaved formats. + */ + if (num_planes == 1) + kms_bo_get_prop (kmsmem->bo, KMS_PITCH, &pitch); } else { for (i = 0; i < num_planes; i++) bo_handles[i] = kmsmem->gem_handle[i]; |