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

Issue 777706 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Bug
GPU



Sign in to add a comment

Add use flags to mini gbm alloc entry point

Project Member Reported by dbehr@chromium.org, Oct 24 2017

Issue description

So we can enforce CPU access required and other use flags.

- change minigbm API, add use flags
- make all our clients use new API
- enforce flags in minigbm

- also, consider renaming minigbm to something else, since it is becoming incompatible with gbm.
Stephane suggests something with acronym ICBM "I Chrome Buffer Manager". What does I stand for? We need to come up with something good ;-)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/minigbm/+/355b156a78aa17211b77730dade28f02b64752a1

commit 355b156a78aa17211b77730dade28f02b64752a1
Author: Shirish S <shirish.s@amd.com>
Date: Thu Nov 16 21:52:03 2017

minigbm: add GBM_BO_USE_SW_{READ,WRITE}_{OFTEN,RARELY} usage flags

Need for these flags has arisen because buffer's allocated
BO_USE_SCANOUT flag is not mmapable in amd, whereas going further
for ensuring atomictity related operations are functional, one
needs buffer to be mmap'd.

These flags shall be used to strike balance in enabling
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED on amd and mmap X-tiled buffers
on Intel platforms.

BUG=b:65297611,  chromium:777706 
TEST=On Kahlee,
     UI comes up.
     GLMark2 & GLbench autotests show no performance regression
     atomictest -t multiplanes passes
     WebGL Aquarium

Change-Id: I582452d331f4a05106939447784a76eba06d13c2
Reviewed-on: https://chromium-review.googlesource.com/758618
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/355b156a78aa17211b77730dade28f02b64752a1/gbm_helpers.c
[modify] https://crrev.com/355b156a78aa17211b77730dade28f02b64752a1/gbm.h

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/5cd7d73b5f13248d43f7841ae58a16a59856d832

commit 5cd7d73b5f13248d43f7841ae58a16a59856d832
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date: Sat Nov 18 04:18:25 2017

gbmtest: use new buffer creation flags

CL:758618 adds GBM_BO_USE_SW_{READ,WRITE}_{OFTEN,RARELY} flags.
This is distinct from GBM_BO_USE_LINEAR -- which means the buffer
must be dma-buf mmap-able. The new flags just mean the buffer will
seem linear when accessed by gbm_bo_map().

Let's modify our various tests to reflect this distinction.

The biggest change in this case is adding explicit flags to the buffers
we map in test_gem_map, test_gem_map_tiling and test_gem_map_format.

BUG= chromium:777706 
TEST=graphics_Gbm passes on Kevin
CQ-DEPEND=CL:758618

Change-Id: I9f5c2fb90a33be4389ba760ab8432ae79c6b70ce
Reviewed-on: https://chromium-review.googlesource.com/759320
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/5cd7d73b5f13248d43f7841ae58a16a59856d832/client/site_tests/graphics_Gbm/src/gbmtest.c

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/241e0e8888f6678adea98a5f1805966041e503f7

commit 241e0e8888f6678adea98a5f1805966041e503f7
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date: Sat Nov 18 04:18:26 2017

gbmtest: add test_dmabuf_map()

There is a desire to test dma-buf mmap() in the gbmtest, since now
we clarified the API so that GBM_BO_LINEAR implies dma-buf map-able.

BUG= chromium:777706 
TEST=graphics_Gbm on Hana passes
CQ-DEPEND=CL:764445

Change-Id: Ib724393208bfdbf7a66c4b84a8134b9b70df6325
Reviewed-on: https://chromium-review.googlesource.com/765187
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/241e0e8888f6678adea98a5f1805966041e503f7/client/site_tests/graphics_Gbm/src/gbmtest.c

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/drm-tests/+/18a05991cc4c9d89999e76001f16c010e81a82dd

commit 18a05991cc4c9d89999e76001f16c010e81a82dd
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date: Sat Nov 18 04:18:46 2017

drm-tests: use new buffer creation flags

CL:758618 adds GBM_BO_USE_SW_{READ,WRITE}_{OFTEN,RARELY} flags.
This is distinct from GBM_BO_USE_LINEAR -- which means the buffer
must be dma-buf mmap-able. Let's use GBM_BO_USE_LINEAR with dumb
buffers as well.

The new flags just mean the buffer will seem linear when
accessed by gbm_bo_map().

Let's modify our various tests to reflect this distinction.

BUG= chromium:777706 
TEST=graphics_Drm.bvt passes on Kevin
CQ-DEPEND=CL:758618

Change-Id: I14dd4ccf12dada1f5464a2323fdd848f8ac0a8b8
Reviewed-on: https://chromium-review.googlesource.com/759325
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Joe Kniss <djmk@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>

[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/atomictest.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/gamma_test.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/plane_test.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/linear_bo_test.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/mapped_texture_test.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/mmap_test.c
[modify] https://crrev.com/18a05991cc4c9d89999e76001f16c010e81a82dd/drm_cursor_test.c

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/3a058d749c45d217175475fd0ad36fd2c5ce0e26

commit 3a058d749c45d217175475fd0ad36fd2c5ce0e26
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date: Tue Nov 21 09:59:08 2017

libcbm: use new GBM API

CL:758618 adds GBM_BO_USE_SW_{READ,WRITE}_{OFTEN,RARELY} flags.
This is distinct from GBM_BO_USE_LINEAR -- which means the buffer
must be dma-buf mmap-able.

The new flags just mean the buffer will seem linear when
accessed by gbm_bo_map().

Let's modify arc-camera to reflect this distinction.

BUG= chromium:777706 
TEST=compile
CQ-DEPEND=CL:758618

Change-Id: I8c0c4f4f9498fd42782430e9a9cb841840bafadc
Reviewed-on: https://chromium-review.googlesource.com/778056
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/3a058d749c45d217175475fd0ad36fd2c5ce0e26/common/camera_buffer_manager_impl_unittest.cc
[modify] https://crrev.com/3a058d749c45d217175475fd0ad36fd2c5ce0e26/common/camera_buffer_manager_impl.cc

Components: OS>Kernel>Graphics
Status: Assigned (was: Available)
Status: Verified (was: Assigned)

Sign in to add a comment