Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 1,906
    • Issues 1,906
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 317
    • Merge Requests 317
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Mesa
  • mesamesa
  • Issues
  • #1817

Closed
Open
Opened Sep 25, 2019 by Bugzilla Migration User@bugzilla-migration
  • Report abuse
  • New issue
Report abuse New issue

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

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
2
Labels
bugzilla i965
Assign labels
  • View project labels
Reference: mesa/mesa#1817