[Intel-gfx] drm modeset identifiers and xf86-video-intel

Mark Kettenis mark.kettenis at xs4all.nl
Thu Apr 7 18:20:15 UTC 2016


On OpenBSD I implemented idr_alloc() to return random IDs.  While the
xf86-video-modesetting driver is perfectly happy with this, the
xf86-video-intel driver doesn't like it very much.  I quickly figured
out that that driver truncates the identifiers to 8-bits when it
stores the values in its sna_crtc data structure.  But the modeset
identifiers are clearly 32-bit in the drm API, and the idr_alloc()
call that allocates them doesn't limit their values in any way.  So
I'd say this is a bug in the xf86-video-intel driver.  Or do people
consider it reasonable for the driver to expect the values to be
smaller than 256?  Then the drm kernel code should probably specify an
upper limit in the idr_alloc call.

Fixing the xf86-video-intel driver isn't completely trivial.  But of
people do agree this is something that should be fixed, I'll give it a
go.

Thanks,

Mark


More information about the Intel-gfx mailing list