Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,378
    • Issues 2,378
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 664
    • Merge Requests 664
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #1817

Closed
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: mesa/mesa#1817