Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,882
    • Issues 2,882
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 924
    • Merge requests 924
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #1817

Closed
Open
Created Sep 25, 2019 by Bugzilla Migration User@bugzilla-migration

gbm_bo_map fails on i915 when *map_data is not NULL before call

Submitted by M Stoeckl

Assigned to Intel 3D Bugs Mailing List

Link to original bug (#110855)

Description

Created attachment 144477 Test case, compile with gcc -lgbm

The documentation for the function gbm_bo_map in src/gbm/main/gbm.c states that the argument void** map_data is a "Returned opaque ptr for the mapped region". Contrary to convention for a return value, if *map_data is not NULL, and the DRI i965 driver is used, then gbm_bo_map fails.

The value of *map_data is checked by intel_map_image in src/mesa/drivers/dri/i965/intel_screen.c (line 823 in today's git master).

Debugging this (see attached test program) was made slightly more complicated by the fact that errno was set to ENODEV, after the syscall DRM_IOCTL_I915_GEM_CONTEXT_CREATE failed on the first call to gbm_bo_map . Reading kernel sources implies that this probably only happens for <gen6 intel GPUs.

Attachment 144477, "Test case, compile with gcc -lgbm":
mesabug.c

Version: 19.0

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking