New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642410 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Allocating a YV12 buffer via minigbm and importing it as an image on Intel mesa doesn't work.

Project Member Reported by dcasta...@chromium.org, Aug 30 2016

Issue description

We were trying to get a YV12 image test going on intel with crrev.com/2272153002 and crrev.com/2296433002.

The problem I'm noticing is that while minigbm returns one fd per plane (dup fds) Intel mesa expects the very same fd for all the planes passed to createImage.

Passing different fds per plane results in eglCreateImageKHR causing an EGL_BAD_ALLOC.


 
Cc: dcasta...@chromium.org
.VaultLog.txt
376 bytes View Download
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0b7987489519adf61ebeab46274633b33067b629

commit 0b7987489519adf61ebeab46274633b33067b629
Author: Kristian H. Kristensen <hoegsberg@chromium.org>
Date: Thu Jun 22 06:38:11 2017

i965: Improve same-buffer restriction for imports

Intel hardware requires that all planes of an image come from the same
buffer, which is currently implemented by testing that all FDs are
numerically the same.

However, when going through a winsys (e.g.) or anything which transits
FDs individually, the FDs may be different even if the underlying buffer
is the same.

Instead of checking the FDs for equality, we must check if they actually
point to the same buffer (Jason).

Link: https://lists.freedesktop.org/archives/mesa-dev/2017-June/158095.html
(cherry picked from commit f58e6358bf775e21d49f7a0ea0007f1940c48217)

BUG= chromium:642410 
TEST=run 'mapped_texture_test -f NV12' of drm-tests on amd64-generic

Change-Id: Iff21ab2ed98894d0108b214329afdd2e113309dd
Signed-off-by: Dongseong Hwang <dongseong.hwang@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/378198
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[add] https://crrev.com/0b7987489519adf61ebeab46274633b33067b629/media-libs/mesa/files/17.1-i965-Improve-same-buffer-restriction-for-imports.patch
[rename] https://crrev.com/0b7987489519adf61ebeab46274633b33067b629/media-libs/mesa/mesa-17.1.0-r12.ebuild
[modify] https://crrev.com/0b7987489519adf61ebeab46274633b33067b629/media-libs/mesa/mesa-17.1.0.ebuild
[modify] https://crrev.com/0b7987489519adf61ebeab46274633b33067b629/media-libs/mesa/mesa-9999.ebuild

Status: Verified (was: Untriaged)
This works now.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 17 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/46eb9e2770083a3789d4bde29645f905a5a9c417

commit 46eb9e2770083a3789d4bde29645f905a5a9c417
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Thu Jan 17 15:09:36 2019

ozone: Remove mesa i965 same-fd workaround restriction

NOTE: This is based on crrev.com/c/549576.

After Mesa same-fd for eglCreateImageKHR restriction was relaxed in
crrev.com/c/378198/, it is now possible to remove the workaround in chromium.

The changes are as follows:
1. ClientNativePixmapDmaBuf can map multiple plane using multiple FDs.
2. GLImageNativePixmap can create EGLImage using multiple FDs.
3. GbmBuffer/GbmPixmap manages multiple FDs.

BUG= 642410 , 911370
TEST=VDA unittest and VEA unittest
TEST=Playback with Chrome ARC++ and ARC++ DRM L1 on kevin, hana, eve
TEST=Playback with Chrome on peach_pit and nyan_big

Change-Id: I23848b8bcd0e240307633a5201b4b8e58b374282
Reviewed-on: https://chromium-review.googlesource.com/c/1362777
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623686}
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/media/gpu/v4l2/generic_v4l2_device.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/gfx/linux/client_native_pixmap_dmabuf.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/gfx/linux/client_native_pixmap_dmabuf.h
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/gfx/native_pixmap.h
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/gl/gl_image_native_pixmap.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/gl/test/gl_image_test_template.h
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/ozone/common/linux/gbm_buffer.h
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/ozone/common/linux/gbm_wrapper.cc
[modify] https://crrev.com/46eb9e2770083a3789d4bde29645f905a5a9c417/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 17 (6 days ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ae71818cf945bea9f803e8a539e050da37ba054

commit 8ae71818cf945bea9f803e8a539e050da37ba054
Author: Ben Pastene <bpastene@chromium.org>
Date: Thu Jan 17 18:29:12 2019

Revert "ozone: Remove mesa i965 same-fd workaround restriction"

This reverts commit 46eb9e2770083a3789d4bde29645f905a5a9c417.

Reason for revert: causing tast failures on amd64-generic VM bot

See https://bugs.chromium.org/p/chromium/issues/detail?id=923061#c2

Original change's description:
> ozone: Remove mesa i965 same-fd workaround restriction
> 
> NOTE: This is based on crrev.com/c/549576.
> 
> After Mesa same-fd for eglCreateImageKHR restriction was relaxed in
> crrev.com/c/378198/, it is now possible to remove the workaround in chromium.
> 
> The changes are as follows:
> 1. ClientNativePixmapDmaBuf can map multiple plane using multiple FDs.
> 2. GLImageNativePixmap can create EGLImage using multiple FDs.
> 3. GbmBuffer/GbmPixmap manages multiple FDs.
> 
> BUG= 642410 , 911370
> TEST=VDA unittest and VEA unittest
> TEST=Playback with Chrome ARC++ and ARC++ DRM L1 on kevin, hana, eve
> TEST=Playback with Chrome on peach_pit and nyan_big
> 
> Change-Id: I23848b8bcd0e240307633a5201b4b8e58b374282
> Reviewed-on: https://chromium-review.googlesource.com/c/1362777
> Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
> Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
> Reviewed-by: Pawel Osciak <posciak@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#623686}

TBR=rjkroege@chromium.org,posciak@chromium.org,dcheng@chromium.org,dcastagna@chromium.org,hiroh@chromium.org

Change-Id: Ie9620b2022ec37ca5e55613d4fbe63247d357862
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  642410 , 911370, 923061
Reviewed-on: https://chromium-review.googlesource.com/c/1418124
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623761}
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/media/gpu/v4l2/generic_v4l2_device.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/gfx/linux/client_native_pixmap_dmabuf.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/gfx/linux/client_native_pixmap_dmabuf.h
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/gfx/native_pixmap.h
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/gl/gl_image_native_pixmap.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/gl/test/gl_image_test_template.h
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/ozone/common/linux/gbm_buffer.h
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/ozone/common/linux/gbm_wrapper.cc
[modify] https://crrev.com/8ae71818cf945bea9f803e8a539e050da37ba054/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Sign in to add a comment