<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_external_minigbm/mediatek.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/'/>
<entry>
<title>minigbm: Use NV12 for video decoder on MT8183 only</title>
<updated>2020-08-13T03:13:55+00:00</updated>
<author>
<name>Wei Lee</name>
<email>wtlee@google.com</email>
</author>
<published>2020-08-05T09:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=2f02cfbe4434410886a70c06b1508e63e886e405'/>
<id>2f02cfbe4434410886a70c06b1508e63e886e405</id>
<content type='text'>
To unblock the HALv3 camera migration for MT8173 platform, we changed to
use NV12 for camera read/write, video hw encoder/decoder for
DRM_FORMAT_FLEX_YCbCr_420_888 format on MT8173 in crrev.com/c/2317328.

However, it broke V4L2 VDA since it does not support NV12, as per
b:162698479.

Since camera will not use video decoder actually, change MT8173
back to use YVU420 for video decoder.

BUG=b:162698479
TEST=tast run [DUT] arc.VideoDecodeAccel.h264

Change-Id: Iee83ab0184541b24ecc9e4fb07138c09228e5440
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2336352
Tested-by: Wei Lee &lt;wtlee@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Wei Lee &lt;wtlee@chromium.org&gt;
Auto-Submit: Wei Lee &lt;wtlee@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To unblock the HALv3 camera migration for MT8173 platform, we changed to
use NV12 for camera read/write, video hw encoder/decoder for
DRM_FORMAT_FLEX_YCbCr_420_888 format on MT8173 in crrev.com/c/2317328.

However, it broke V4L2 VDA since it does not support NV12, as per
b:162698479.

Since camera will not use video decoder actually, change MT8173
back to use YVU420 for video decoder.

BUG=b:162698479
TEST=tast run [DUT] arc.VideoDecodeAccel.h264

Change-Id: Iee83ab0184541b24ecc9e4fb07138c09228e5440
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2336352
Tested-by: Wei Lee &lt;wtlee@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Wei Lee &lt;wtlee@chromium.org&gt;
Auto-Submit: Wei Lee &lt;wtlee@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>minigbm: Enable NV12 for camera usage on MT8173</title>
<updated>2020-07-29T03:06:39+00:00</updated>
<author>
<name>Wei Lee</name>
<email>wtlee@google.com</email>
</author>
<published>2020-07-21T03:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=e03625b24ba1548558319af24c54e27b7fd3e87c'/>
<id>e03625b24ba1548558319af24c54e27b7fd3e87c</id>
<content type='text'>
BUG=b:141517606
TEST=tast run [DUT] camera.CCAUI* camera.HAL3*
TEST=Run CtsCameraTestCases

Change-Id: I908f4a9896e716f460325abb741ace4ee8547ad7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2317328
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Wei Lee &lt;wtlee@chromium.org&gt;
Tested-by: Wei Lee &lt;wtlee@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG=b:141517606
TEST=tast run [DUT] camera.CCAUI* camera.HAL3*
TEST=Run CtsCameraTestCases

Change-Id: I908f4a9896e716f460325abb741ace4ee8547ad7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2317328
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Wei Lee &lt;wtlee@chromium.org&gt;
Tested-by: Wei Lee &lt;wtlee@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Modify NV12 allowed buffer usages for camera capture use case</title>
<updated>2020-06-25T14:17:05+00:00</updated>
<author>
<name>Hirokazu Honda</name>
<email>hiroh@chromium.org</email>
</author>
<published>2020-06-23T08:52:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=3bd681c62cbfff9a96cf0e74407f67a15dbc48da'/>
<id>3bd681c62cbfff9a96cf0e74407f67a15dbc48da</id>
<content type='text'>
We use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE for camera
capture use scenario in Chrome. Therefore, NV12 format must be
allowed for all those usage masks. This CL modifies the usages on
all platforms.

BUG=chromium:982201
TEST=video.EncodeAccel.vp8_720p_i420 on eve

Change-Id: I7880e64049f3bbf9dd1c177619e41362baf641f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2240995
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Commit-Queue: Hirokazu Honda &lt;hiroh@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE for camera
capture use scenario in Chrome. Therefore, NV12 format must be
allowed for all those usage masks. This CL modifies the usages on
all platforms.

BUG=chromium:982201
TEST=video.EncodeAccel.vp8_720p_i420 on eve

Change-Id: I7880e64049f3bbf9dd1c177619e41362baf641f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2240995
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Commit-Queue: Hirokazu Honda &lt;hiroh@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove HW_VIDEO_ENCODER usage of YVU420</title>
<updated>2020-06-18T06:10:36+00:00</updated>
<author>
<name>Hirokazu Honda</name>
<email>hiroh@chromium.org</email>
</author>
<published>2020-06-16T06:28:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=fd8b8abd7f965d4b07b518c8812d71d34758c106'/>
<id>fd8b8abd7f965d4b07b518c8812d71d34758c106</id>
<content type='text'>
minigbm has allowed HW_VIDEO_ENCODER usage to YVU420 so that
chrome can allocate YVU420 with HW_VIDEO_ENCODER. But this
format is no longer allocated by chrome with the usage. Let's
delete the code.

BUG=chromium:982201
TEST=None

Change-Id: Ia6bbc24e7782e3e73c2eb00c00127af212ddf486
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245967
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Auto-Submit: Hirokazu Honda &lt;hiroh@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
minigbm has allowed HW_VIDEO_ENCODER usage to YVU420 so that
chrome can allocate YVU420 with HW_VIDEO_ENCODER. But this
format is no longer allocated by chrome with the usage. Let's
delete the code.

BUG=chromium:982201
TEST=None

Change-Id: Ia6bbc24e7782e3e73c2eb00c00127af212ddf486
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245967
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Auto-Submit: Hirokazu Honda &lt;hiroh@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>minigbm: add encoder/decoder blob combination</title>
<updated>2020-06-16T07:27:24+00:00</updated>
<author>
<name>David Stevens</name>
<email>stevensd@chromium.org</email>
</author>
<published>2020-06-15T04:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=495181462f8e03da306351c1075afedc50b3d2ae'/>
<id>495181462f8e03da306351c1075afedc50b3d2ae</id>
<content type='text'>
ARCVM sets encoder/decoder usage on the blob output/input buffers, so
that virtio_gpu knows to perform transfers from/to the host where
appropriate. Recently, virtio_gpu started passing all bind flags to the
host, instead of reducing them in the guest. These factors combined
means that the host backends now need to support encoder/decoder usage
with R8 format.

Test: manually verify ARCVM YouTube
Bug: b:158957350
Change-Id: I58bf657496647f8002c693d17a1186f4cf527b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245540
Tested-by: David Stevens &lt;stevensd@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: David Stevens &lt;stevensd@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ARCVM sets encoder/decoder usage on the blob output/input buffers, so
that virtio_gpu knows to perform transfers from/to the host where
appropriate. Recently, virtio_gpu started passing all bind flags to the
host, instead of reducing them in the guest. These factors combined
means that the host backends now need to support encoder/decoder usage
with R8 format.

Test: manually verify ARCVM YouTube
Bug: b:158957350
Change-Id: I58bf657496647f8002c693d17a1186f4cf527b01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2245540
Tested-by: David Stevens &lt;stevensd@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: David Stevens &lt;stevensd@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>minigbm: mediatek: fix SCANOUT flag</title>
<updated>2020-03-26T21:48:43+00:00</updated>
<author>
<name>Gurchetan Singh</name>
<email>gurchetansingh@chromium.org</email>
</author>
<published>2020-03-24T20:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=1914f989418995f24e5a8ce32a2f182db576896d'/>
<id>1914f989418995f24e5a8ce32a2f182db576896d</id>
<content type='text'>
All renderer target works are eligible for scanout, after looking
at mtk_plane_init.

BUG=b:151064316
TEST=Mirror mode works again on Kukui

Change-Id: Ife8948c167c1d75622404af573f8cc92b3516416
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2118463
Reviewed-by: David Stevens &lt;stevensd@chromium.org&gt;
Tested-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All renderer target works are eligible for scanout, after looking
at mtk_plane_init.

BUG=b:151064316
TEST=Mirror mode works again on Kukui

Change-Id: Ife8948c167c1d75622404af573f8cc92b3516416
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2118463
Reviewed-by: David Stevens &lt;stevensd@chromium.org&gt;
Tested-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mediatek: get prime fd with drv_bo_get_plane_fd</title>
<updated>2020-03-16T05:55:18+00:00</updated>
<author>
<name>David Stevens</name>
<email>stevensd@chromium.org</email>
</author>
<published>2020-03-13T06:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=ddb56b5eac4a659d8343acc59cfaef632f6b85b6'/>
<id>ddb56b5eac4a659d8343acc59cfaef632f6b85b6</id>
<content type='text'>
Instead of calling drmPrimeHandleToFD directly, call drv_bo_get_plane_fd
so that the FD is exported with DRM_RDWR if possible.

When a handle is exported, the drm framework caches the underlying
dma_buf struct, even if all fd references are closed. This means that
the flags from the first export operation end up being the primary flags
for all subsequent export attempts. This change ensures that the O_RDWR
flag is set on the first call, to prevent permission checks in
PlatformSharedMemoryRegion from failing.

BUG=b:151394062
TEST=youtube on arcvm on kukui

Change-Id: I9de7bb67b45b3669704f3487889b10ed62493418
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2101054
Tested-by: David Stevens &lt;stevensd@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: David Stevens &lt;stevensd@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of calling drmPrimeHandleToFD directly, call drv_bo_get_plane_fd
so that the FD is exported with DRM_RDWR if possible.

When a handle is exported, the drm framework caches the underlying
dma_buf struct, even if all fd references are closed. This means that
the flags from the first export operation end up being the primary flags
for all subsequent export attempts. This change ensures that the O_RDWR
flag is set on the first call, to prevent permission checks in
PlatformSharedMemoryRegion from failing.

BUG=b:151394062
TEST=youtube on arcvm on kukui

Change-Id: I9de7bb67b45b3669704f3487889b10ed62493418
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2101054
Tested-by: David Stevens &lt;stevensd@chromium.org&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: David Stevens &lt;stevensd@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mediatek: Align height to 16 bytes for NV12</title>
<updated>2020-01-08T04:44:25+00:00</updated>
<author>
<name>Moja Hsu</name>
<email>mojahsu@google.com</email>
</author>
<published>2019-10-02T06:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=059ac08b0b3ad075b741fe090c031be63fc5a1e7'/>
<id>059ac08b0b3ad075b741fe090c031be63fc5a1e7</id>
<content type='text'>
We want to use the same buffer from camera to JPEG hardware encoder so
align the height of camera usage buffer 16 that is required by the JPEG
hardware encoder.

BUG=b:141516308
TEST=Check if data offset is correct. Take picture with CCA.

Change-Id: I0db10762494423f7c4a340725015839803b40af4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1984211
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Tested-by: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
Commit-Queue: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to use the same buffer from camera to JPEG hardware encoder so
align the height of camera usage buffer 16 that is required by the JPEG
hardware encoder.

BUG=b:141516308
TEST=Check if data offset is correct. Take picture with CCA.

Change-Id: I0db10762494423f7c4a340725015839803b40af4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1984211
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Tested-by: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
Commit-Queue: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mediatek: Allocate a buffer expected by encoder if BO_USE_HW_VIDEO_ENCODER</title>
<updated>2019-12-25T08:26:11+00:00</updated>
<author>
<name>Hirokazu Honda</name>
<email>hiroh@chromium.org</email>
</author>
<published>2019-10-11T06:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=2a2bfc25bb4eaf53d6d1d9e1990c6b2888d4d3fb'/>
<id>2a2bfc25bb4eaf53d6d1d9e1990c6b2888d4d3fb</id>
<content type='text'>
MediaTek driver expects 16 aligned width and 32 aligned height for an input
buffer on encoding [1]. Besides, there is an extra data between planes.
This changes the minigbm allocation to match the expectation though width
is aligned by 64 for the AMD cache-width optimization.

[1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3c551224d8600b956ed53097520501d58f31cf59/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c#278
BUG=b:144135251
TEST=ARC++ encoder on kukui
Change-Id: Id330a8a6b0a40040098920427e6e29f05fcb64d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1855520
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Auto-Submit: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Commit-Queue: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MediaTek driver expects 16 aligned width and 32 aligned height for an input
buffer on encoding [1]. Besides, there is an extra data between planes.
This changes the minigbm allocation to match the expectation though width
is aligned by 64 for the AMD cache-width optimization.

[1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3c551224d8600b956ed53097520501d58f31cf59/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c#278
BUG=b:144135251
TEST=ARC++ encoder on kukui
Change-Id: Id330a8a6b0a40040098920427e6e29f05fcb64d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1855520
Reviewed-by: Tomasz Figa &lt;tfiga@chromium.org&gt;
Tested-by: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Auto-Submit: Hirokazu Honda &lt;hiroh@chromium.org&gt;
Commit-Queue: Hsu Wei-Cheng &lt;mojahsu@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add MediaTek private format for reprocessing</title>
<updated>2019-12-05T07:56:40+00:00</updated>
<author>
<name>Jasmine Chen</name>
<email>lnishan@google.com</email>
</author>
<published>2019-08-14T07:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_external_minigbm/commit/?id=c7aa974dd383680ce8b1384785416bc77fa2c145'/>
<id>c7aa974dd383680ce8b1384785416bc77fa2c145</id>
<content type='text'>
In this CL, we add DRM_FORMAT_MTISP_SXYZW10, a 10-bit private bayer
format for private reprocessing on MediaTek ISP P1. We change the logic
around resolving the DRM format for IMPLEMENTATION_DEFINED buffers. When
CAMERA_READ usage flag is present, we consider it to be a buffer for
reprocessing and resolve the format to our private format.

BUG=b:130851309
TEST=Emerge and deploy minigbm cros-camera-libcbm cros-camera
cros-camera-hal-mtk, then verify that ZSL is working.

Change-Id: I8d9fd4e6a20c284751915e136bef0b4ceb143d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1753902
Tested-by: Jasmine Chen &lt;lnishan@google.com&gt;
Auto-Submit: Jasmine Chen &lt;lnishan@google.com&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Jasmine Chen &lt;lnishan@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this CL, we add DRM_FORMAT_MTISP_SXYZW10, a 10-bit private bayer
format for private reprocessing on MediaTek ISP P1. We change the logic
around resolving the DRM format for IMPLEMENTATION_DEFINED buffers. When
CAMERA_READ usage flag is present, we consider it to be a buffer for
reprocessing and resolve the format to our private format.

BUG=b:130851309
TEST=Emerge and deploy minigbm cros-camera-libcbm cros-camera
cros-camera-hal-mtk, then verify that ZSL is working.

Change-Id: I8d9fd4e6a20c284751915e136bef0b4ceb143d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1753902
Tested-by: Jasmine Chen &lt;lnishan@google.com&gt;
Auto-Submit: Jasmine Chen &lt;lnishan@google.com&gt;
Reviewed-by: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Commit-Queue: Jasmine Chen &lt;lnishan@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
