Patch for libdrm: Provide DRM_MODE_FB_DIRTY_MAX_CLIPS
Lampersperger Andreas
lampersperger.andreas at heidenhain.de
Mon Jun 8 23:05:39 PDT 2015
Hello Thomas,
please include this patch (also attached as patch-file) to libdrm.
Thank you!
Andreas
------------------------------------------------------------
mailto:lampersperger.andreas at heidenhain.de
tel.: +49 8669 31 1791
------------------------------------------------------------
DR. JOHANNES HEIDENHAIN GmbH
Dr.-Johannes-Heidenhain-Str. 5
83301 Traunreut, Deutschland
http://www.heidenhain.de
Author: Andreas Lampersperger <Lampersperger.andreas at heidenhain.de>
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_ANNOTATE_FILL 0x02
#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: http://www.heidenhain.de/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: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150609/48af9be8/attachment.obj>
More information about the dri-devel
mailing list