Bug 3284 - lockRefCount is global, should be per-screen
Summary: lockRefCount is global, should be per-screen
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/DRI (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high minor
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-05-12 21:29 UTC by Adam Jackson
Modified: 2005-10-18 22:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dri-per-screen-lock-refcount-1.patch (2.19 KB, patch)
2005-08-28 14:12 UTC, Adam Jackson
no flags Details | Splinter Review

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.