Bug 3284

Summary: lockRefCount is global, should be per-screen
Product: xorg Reporter: Adam Jackson <ajax>
Component: Server/Ext/DRIAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 1690    
Attachments:
Description Flags
dri-per-screen-lock-refcount-1.patch none

Description Adam Jackson 2005-05-12 21:29:02 UTC
the DRM lock is taken per-screen, but the lockRefCount variable in GL/dri/dri.c
is per-server.  this seems wrong conceptually, though i'm having trouble
thinking of a case where it would matter.  should we move it into the
DRIScreenPrivRec ?
Comment 1 Adam Jackson 2005-08-28 14:12:35 UTC
Created attachment 3093 [details] [review]
dri-per-screen-lock-refcount-1.patch

in fact it does matter.  the scenario is:

server takes lock on screen 1
server goes to lock screen 2, sees global refcount > 0, skips
server touches screen 2 while DRI client active on screen 2

in other words, DRI activity on screen 2 -> death.  attached patch moves the
refcount into the DRIScreenPrivRec, so the lock will get taken for every
screen.
Comment 2 Adam Jackson 2005-09-12 17:45:10 UTC
applied to head, closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.