bonzini_ has quit [Read error: Connection reset by peer]
bonzini has joined #dri-devel
paulk has quit [Ping timeout: 480 seconds]
ced117 has joined #dri-devel
ced117_ has quit [Ping timeout: 480 seconds]
tarceri has quit [Ping timeout: 480 seconds]
fab has joined #dri-devel
rgallaispou1 has joined #dri-devel
rgallaispou has quit [Read error: Connection reset by peer]
tarceri has joined #dri-devel
kzd has joined #dri-devel
paulk has joined #dri-devel
kts has joined #dri-devel
jsa2 has quit [Ping timeout: 480 seconds]
tobiasjakobi has joined #dri-devel
<sima>
tzimmermann, maybe, it's kinda a big change
<sima>
and I'm not sure whether that won't screw up locking in some drivers
chewitt has joined #dri-devel
martymichal has joined #dri-devel
<sima>
tzimmermann, I did chat with a bunch of other maintainers though who are very firmly of the opinion that hotunplug locking is supposed to be the subsystem's job
<sima>
so seems to be fairly sound idea
<sima>
I'm just not sure we won't run into some issues in some driver
<tzimmermann>
sima, sounds great. commit_tail is also easy to adapt for any 'odd' drivers
<sima>
yeah that's probably how we could roll this out, if it' all stays within what drivers can overwrite if needed
<tzimmermann>
i've been looking over it briefly. there a number of calls in the helper (and it's _rpm variant) the first 3 (_modeset_disable, _commit_planes and _enable) would be wrapped in _enter/_exit; the rest of the calls have to be unconditional
<tzimmermann>
and in _commit_planes() there's a call to ->end_fb_access. this needs to go out of the unplug handle (somewhere before he_done)
<tzimmermann>
for most of the drivers, it seems manageable
<tzimmermann>
sima, by 'other maintainers', you mean maintainers of subsystems besides drm, right?
<sima>
yup
<sima>
and what do you mean with ->end_fb_access?
<sima>
I'm not parsing the "go out of the unplug handle"
<javierm>
tzimmermann: I see that drivers also use drm_dev_enter/_exit() on their drm_plane_helper_funcs.atomic_disable callback to clear up the screen
<javierm>
tzimmermann: that will also be covered by drm_atomic_helper_commit_tail() ?
<javierm>
or did you mean only for the drm_plane_helper_funcs.atomic_update callbacks ?
<tzimmermann>
javierm, all the HW-updates; including plane and crtc
<javierm>
tzimmermann: got it
<tzimmermann>
and (from a firt look) they should all happen within the first free calles within drm_atomic_helper_commit_tail()
<javierm>
it would be a nice cleanup indeed if can just be done there instead of having it in every driver
<tzimmermann>
it does things like the vunmap() for shadow-plane helpers. so it needs to run a but later
<tzimmermann>
outside the unplug CS
vliaskovitis has quit [Ping timeout: 480 seconds]
<tzimmermann>
s/but/bit
frieder has quit [Remote host closed the connection]
<sima>
tzimmermann, hm ...
<sima>
one complication is that the dma api blows up after hotunplug, but I'm not sure how we can sort out that mess properly
haaninjo has joined #dri-devel
<sima>
tzimmermann, also one reason for letting drivers do this is that it allows you to be a lot more fine-grained with bailing out
<sima>
because pci timeouts are slow, so for pci drivers you probably want more nested sections
<sima>
but they can nest (I think so at least), so we should be fine
<sima>
tzimmermann, I still don't get why you need to move ->end_fb_access outside the critical section, that shouldn't hurt?
<sima>
we should have a drm_atomic_helper_shutdown anyway in the ->remove path, so we'll have that vunmap in our critical path no matter what we do for driver unload
<sima>
so not sure what you're gaining by pulling it out of drm_dev_enter/exit?
<tzimmermann>
because begin_fb_access runs during atomic_check. it usually vmap()s on the plane's gem BOs. we need a corresponding vunmap even if the device got unplugged
<sima>
oh right
<sima>
hm
<tzimmermann>
but it's a trivial change
<sima>
that might actually break drivers in other ways, if they expect symmetry but it's not there anymore if we do this big wrapping
<sima>
that = the general issue of normal atomic helper guarantees no longer applying
<sima>
e.g. pretty sure you'll splat on the crtc_state.event checks if you disable all of commit_planes
<sima>
at least in most drivers
<sima>
there's probably a lot more, at least in more complex drivers
<javierm>
sima: but those drivers usually have their own drm_mode_config_helper_funcs.atomic_commit_tail anyways I think?
<sima>
javierm, yeah but everyone copypastes the helpers
<tzimmermann>
i guess we could find a way for doing it incrementally
<javierm>
sima: hmm, I see
<sima>
plus handling crtc_state.event is not optional, and that's something drivers have to do
<tzimmermann>
javierm, drm_atomic_helper_commit_tail() is the default
<sima>
also not sure whether that won't blow up the drm_vblank_on/off tracking?
<tzimmermann>
drivers usually don't set their own
<sima>
that's another one that is mostly sw tracking, and we cannot disable sw stuff
<sima>
and it's another one (like crtc_state.event) that drivers have to do in their callbacks at the right time
<sima>
at least if they support vblank events
<tzimmermann>
some vblank handling is often in atomic_flush. could become an issue
<sima>
tzimmermann, so with a bit more pondering, really not sure this works beyond the most trivial drivers :-(
<sima>
tzimmermann, other way round would be some pcibar access helpers that wrap drm_dev_enter/exit at the lowest levels
<sima>
and convert pci drivers over to use those
<tzimmermann>
but if the HW device is unplugged there won't be any vblank interrupts. we could fake the event in the commit_tail helper
<sima>
tzimmermann, it's not about the hw events, but about the sw tracking that goes loopsided
<sima>
similar to how vunmap needs to be done or things go awry
<sima>
you explaining the vunmap case made me remember all the others we have :-/
<sima>
s/all/some/ since I expect there's a bunch more
<tzimmermann>
sima, moving this into HW-access helpers sounds like even more hassle to me
<tzimmermann>
like touching all pci drivers
<sima>
yeah I don't have good ideas here :-/
<tzimmermann>
and there's no clear way of handling register reads
<tzimmermann>
no worries. i guess we could start small for a dedicated commit_tail helper for the simple drivers and go step-by-step from there
<sima>
pretty sure they all break due to crtc_state.event, unless you handle that somehow
<sima>
and it would break for any drivers using the drm_crtc_vblank* functions even more
<tzimmermann>
:(
<sima>
but worth a shot I guess, we're low on good ideas here :-(
kts has quit [Quit: Konversation terminated!]
<sima>
tzimmermann, meaning if you handle crtc_state.event in the else case for when drm_dev_enter fails, that /might/ work for some drivers
<sima>
anyway gtg now, heading out for dinner
<tzimmermann>
sima, sure. thanks
ced117_ has joined #dri-devel
ced117 has quit [Ping timeout: 480 seconds]
Swung0x48 has quit [Remote host closed the connection]
kts has joined #dri-devel
Swung0x48 has joined #dri-devel
ced117_ has quit [Ping timeout: 480 seconds]
ced117 has joined #dri-devel
frieder has joined #dri-devel
Swung0x48 has quit [Ping timeout: 480 seconds]
ced117_ has joined #dri-devel
Jeremy_Rand_Talos_ has quit [Remote host closed the connection]
ced117 has quit [Ping timeout: 480 seconds]
Jeremy_Rand_Talos_ has joined #dri-devel
bonzini_ has joined #dri-devel
bonzini has quit [Ping timeout: 480 seconds]
aravind has quit [Ping timeout: 480 seconds]
jkrzyszt has quit [Quit: Konversation terminated!]
bonzini_ has quit [Ping timeout: 480 seconds]
yrlf has quit [Read error: Connection reset by peer]
yrlf has joined #dri-devel
coldfeet has joined #dri-devel
jsa1 has joined #dri-devel
aravind has joined #dri-devel
rasterman has quit [Quit: Gettin' stinky!]
tzimmermann has quit [Quit: Leaving]
kts_ has joined #dri-devel
kts has quit [Read error: No route to host]
rgallaispou1 has quit []
chewitt has quit [Quit: Zzz..]
frieder has quit [Remote host closed the connection]
aravind has quit [Ping timeout: 480 seconds]
yrlf has quit [Quit: Ping timeout (120 seconds)]
yrlf has joined #dri-devel
kts_ has quit [Remote host closed the connection]
kts has joined #dri-devel
Swung0x48 has joined #dri-devel
HdkR has joined #dri-devel
Swung0x48 has quit [Ping timeout: 480 seconds]
HdkR has quit [Quit: Changing server]
HdkR has joined #dri-devel
kts has quit [Quit: Konversation terminated!]
cyrinux949075 has quit []
cyrinux949075 has joined #dri-devel
yogesh_m1 has joined #dri-devel
yogesh_mohan has quit [Ping timeout: 480 seconds]
fab has quit [Quit: fab]
epoch101_ has joined #dri-devel
fab has joined #dri-devel
epoch101 has quit [Ping timeout: 480 seconds]
Wolf480pl has joined #dri-devel
ds` has quit [Read error: Connection reset by peer]
dos1 has quit [Write error: connection closed]
Kwiboo has quit [Remote host closed the connection]
Wolf480pl has quit [Remote host closed the connection]
Simonx22 has quit [Write error: connection closed]
davispuh has quit [Remote host closed the connection]
tursulin has quit [Write error: connection closed]
vup has quit [Write error: connection closed]
bnieuwenhuizen has quit [Write error: connection closed]
dliviu has quit [Write error: connection closed]
gnarchie has quit [Write error: connection closed]
konstantin has quit [Write error: connection closed]
enunes has quit [Write error: connection closed]
cmarcelo has quit [Read error: Connection reset by peer]
pitust has quit [Remote host closed the connection]
UndeadLeech has quit [Read error: Connection reset by peer]
vjaquez has quit [Read error: Connection reset by peer]
robmur01 has quit [Read error: Connection reset by peer]
JRepinc has quit [Read error: Connection reset by peer]
enunes has joined #dri-devel
kasper93_ has joined #dri-devel
kasper93 is now known as Guest25552
Jeremy_Rand_Talos__ has joined #dri-devel
bbhtt- has joined #dri-devel
phryk_ has joined #dri-devel
UndeadLeech_ has joined #dri-devel
mupuf_ has joined #dri-devel
ceyusa has joined #dri-devel
cmarcelo_ has joined #dri-devel
geemili_ has joined #dri-devel
pitust_ has joined #dri-devel
bl4ckb0ne_ has joined #dri-devel
psykose_ has joined #dri-devel
melnary_ has joined #dri-devel
Sid127- has joined #dri-devel
nashpa has joined #dri-devel
tursulin_ has joined #dri-devel
Kwiboo- has joined #dri-devel
Simonx22_ has joined #dri-devel
Matombo444 has joined #dri-devel
cmarcelo_ has left #dri-devel [#dri-devel]
dos11 has joined #dri-devel
konstantin has joined #dri-devel
JRepin has joined #dri-devel
Stary_ has joined #dri-devel
Stary is now known as Guest25578
davispuhh has joined #dri-devel
ds` has joined #dri-devel
atiltedtree has quit [Ping timeout: 480 seconds]
melnary has quit [Ping timeout: 480 seconds]
vup2 has joined #dri-devel
atiltedtree has joined #dri-devel
bnieuwenhuizen has joined #dri-devel
ceyusa is now known as vjaquez
kasper93_ is now known as kasper93
Stary_ is now known as Stary
a1batross has quit [Ping timeout: 480 seconds]
geemili has quit [Ping timeout: 480 seconds]
gnarchie has joined #dri-devel
bbhtt has quit [Ping timeout: 480 seconds]
robmur01 has joined #dri-devel
bl4ckb0ne has quit [Ping timeout: 480 seconds]
Matombo has quit [Ping timeout: 480 seconds]
psykose has quit [Ping timeout: 480 seconds]
mupuf has quit [Ping timeout: 480 seconds]
Guest25578 has quit [Ping timeout: 480 seconds]
chiku has quit [Ping timeout: 480 seconds]
phryk has quit [Ping timeout: 480 seconds]
Jeremy_Rand_Talos_ has quit [Ping timeout: 480 seconds]
Guest25552 has quit [Ping timeout: 480 seconds]
fab has quit [Quit: fab]
Swung0x48 has joined #dri-devel
vliaskovitis has joined #dri-devel
jsa1 has quit [Ping timeout: 480 seconds]
Swung0x48 has quit [Ping timeout: 480 seconds]
Duke`` has quit []
coldfeet has quit [Quit: Lost terminal]
Duke`` has joined #dri-devel
rasterman has joined #dri-devel
martymichal has quit [Ping timeout: 480 seconds]
haaninjo has quit [Quit: Ex-Chat]
cmarcelo has joined #dri-devel
sima has quit [Ping timeout: 480 seconds]
Duke`` has quit [Ping timeout: 480 seconds]
Swung0x48 has joined #dri-devel
martymichal has joined #dri-devel
Swung0x48 has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
UndeadLeech_ is now known as UndeadLeech
apinheiro has quit [Quit: Leaving]
tobiasjakobi has quit [Remote host closed the connection]