Patch for libdrm: Provide DRM_MODE_FB_DIRTY_MAX_CLIPS

Lampersperger Andreas lampersperger.andreas at
Mon Jun 8 23:05:39 PDT 2015

Hello Thomas,

please include this patch (also attached as patch-file) to libdrm.

Thank you!
mailto:lampersperger.andreas at
tel.: +49 8669 31 1791

Dr.-Johannes-Heidenhain-Str. 5
83301 Traunreut, Deutschland

   Author: Andreas Lampersperger <Lampersperger.andreas at>

   libdrm: Provide DRM_MODE_FB_DIRTY_MAX_CLIPS 

   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 .../include/libdrm/drm_mode.h and 
   not .../include/drm/drm_mode.h.
   This commit adds the define DRM_MODE_FB_DIRTY_MAX_CLIPS also to 
   libdrm/drm_mode.h, so applications/drivers linking against libdrm can
   use it to check the proper use of drmModeDirtyFB(..)

Index: libdrm-2.4.61/include/drm/drm_mode.h
--- libdrm-2.4.61.orig/include/drm/drm_mode.h
+++ libdrm-2.4.61/include/drm/drm_mode.h
@@ -353,6 +353,8 @@ struct drm_mode_fb_cmd2 {
 #define DRM_MODE_FB_DIRTY_FLAGS         0x03
+#define DRM_MODE_FB_DIRTY_MAX_CLIPS     256
  * Mark a region of a framebuffer as dirty.
Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: Traunreut
Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard
Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman),
Michael Grimm, Hubert Ermer

E-Mail Haftungsausschluss / E-Mail Disclaimer:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: provide_fb_dirty_max_clips.patch
Type: application/octet-stream
Size: 439 bytes
Desc: provide_fb_dirty_max_clips.patch
URL: <>

More information about the dri-devel mailing list