The non-gbm path in virglrenderer does not need this hack
BUG=b:
142364535
TEST=Run these CTS tests
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R8G8B8A8_UNORM
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R8G8B8X8_UNORM
android.hardware.nativehardware.cts.AHardwareBufferNativeTests#SingleLayer_ColorTest_GpuColorOutputCpuRead_R5G6B5_UNORM
Change-Id: I672dcec7e3bb5d9e6841e6ea48f56f26a4130df2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/
2007028
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Woody Chow <woodychow@chromium.org>
Commit-Queue: Woody Chow <woodychow@chromium.org>
xfer.box.h = mapping->rect.height;
xfer.box.d = 1;
- // Unfortunately, the kernel doesn't actually pass the guest layer_stride and
- // guest stride to the host (compare virtio_gpu.h and virtgpu_drm.h). We can use
- // the level to work around this.
- xfer.level = bo->meta.strides[0];
+ // TODO(b/145993887): Send also stride when the patches are landed
+ // When BO_USE_RENDERING is set, the level=stride hack is not needed
ret = drmIoctl(bo->drv->fd, DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST, &xfer);
if (ret) {