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

Issue 737328 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

minigbm i915_bo_map needs to respect permissions flags

Project Member Reported by djmk@chromium.org, Jun 28 2017

Issue description

Currently GBM_BO_TRANSFER_READ/WRITE flags passed to gbm_bo_map are ignored by the i915_bo_map backend calls.  Tiled i915 buffers are always mmaped with read+write privileges, which will fail if the device is not opened with both as well.  

This bug relates to  issue 653283   
 

Comment 1 by djmk@chromium.org, Jun 29 2017

this is also true for tegra and rockchip

Comment 2 by djmk@chromium.org, Jun 29 2017

and vc4 and amdgpu and mediatek

Comment 3 by djmk@chromium.org, Jun 29 2017

Components: OS>Kernel>Graphics
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 11 2017

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

commit 7694ddc3c2f1ba1ad36885f5897255f760acfbaa
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date: Tue Jul 11 00:33:22 2017

graphics_Gbm: respect gbm_bo_map flags

The gbm map API requires that we pass in valid map
flags.

BUG= chromium:737328 
TEST=compiles

Change-Id: I1d965338ed26225ddf5be2594c153ba86a9a8216
Reviewed-on: https://chromium-review.googlesource.com/565189
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Joe Kniss <djmk@google.com>

[modify] https://crrev.com/7694ddc3c2f1ba1ad36885f5897255f760acfbaa/client/site_tests/graphics_Gbm/src/gbmtest.c

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 11 2017

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

commit 657058557680c8c8ed12e166046b394460199c3d
Author: Joe Kniss <djmk@google.com>
Date: Tue Jul 11 17:25:12 2017

Plumb buffer map permissions through gbm.

Map read/write permissions were being ignored by minigbm.  This can
cause segfaults or failed mappings if the device FD permissions are not
rw.

Also adds bounds checking in tegra.c for tile/untile transfers.

BUG= chromium:737328 
TEST=cyan, nyan graphicsSanity with read only on device

Change-Id: I8fccaed4e908cda3ff7d7cf451d0ad75d65039e6
Reviewed-on: https://chromium-review.googlesource.com/556980
Commit-Ready: Joe Kniss <djmk@google.com>
Tested-by: Joe Kniss <djmk@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>

[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/gbm.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/tegra.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/vc4.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/mediatek.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/rockchip.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/helpers.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/drv_priv.h
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/amdgpu.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/drv.h
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/drv.c
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/helpers.h
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/cros_gralloc/cros_gralloc_buffer.cc
[modify] https://crrev.com/657058557680c8c8ed12e166046b394460199c3d/i915.c

Comment 6 by djmk@chromium.org, Jul 18 2017

Status: Fixed (was: Untriaged)

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment