Bug 90898

Summary: Provide DRM_MODE_FB_DIRTY_MAX_CLIPS in drm_mode.h
Product: DRI Reporter: Andreas Lampersperger <lampersperger.andreas>
Component: libdrmAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: lampersperger.andreas
Version: XOrg git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Andreas Lampersperger 2015-06-08 14:36:59 UTC
When calling drmModeDirtyFB on linux, it fails when num_clips are more than DRM_MODE_FB_DIRTY_MAX_CLIPS (value: 256). But there is no way to check this for xf86-video-* drivers, because when including drm_mode.h, you get the drm_mode.h from /usr/include/libdrm/drm_mode.h and not /usr/include/drm/drm_mode.h.

Please add

#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 

to your drm_mode.h, to allow xf86-video-* drivers to check parameters before calling drmModeDirtyFB(...).
Comment 1 Michel Dänzer 2015-06-09 01:03:18 UTC
Can you make a patch and submit it to the dri-devel@lists.freedesktop.org list for review?
Comment 2 Andreas Lampersperger 2015-06-09 06:07:58 UTC
Patch was send to dri-devel@lists.freedesktop.org
Comment 3 Emil Velikov 2016-12-12 13:31:41 UTC
Hi Andreas, afaict the define has found its way into the header. Admittedly in a slightly different manner.

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.