- libdrm-2.4.7-revert-bong.patch - revert connector "speedups"
This commit is contained in:
parent
12953dec86
commit
14c5c9abae
73
libdrm-2.4.7-revert-bong.patch
Normal file
73
libdrm-2.4.7-revert-bong.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
commit e0265401be3c35f668d56a1b6b11084b708e2afa
|
||||||
|
Author: Dave Airlie <airlied@linux.ie>
|
||||||
|
Date: Sat Apr 11 08:16:44 2009 +1000
|
||||||
|
|
||||||
|
Revert "libdrm: speed up connector & mode fetching"
|
||||||
|
|
||||||
|
This reverts commit cd5c66c659168cbe2e3229ebf8be79f764ed0ee1.
|
||||||
|
|
||||||
|
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
|
||||||
|
index e2aba81..872604f 100644
|
||||||
|
--- a/libdrm/xf86drmMode.c
|
||||||
|
+++ b/libdrm/xf86drmMode.c
|
||||||
|
@@ -357,45 +357,21 @@ drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id)
|
||||||
|
{
|
||||||
|
struct drm_mode_get_connector conn;
|
||||||
|
drmModeConnectorPtr r = NULL;
|
||||||
|
- int pre_props = 8, pre_modes = 16, pre_encoders = 4;
|
||||||
|
|
||||||
|
conn.connector_id = connector_id;
|
||||||
|
conn.connector_type_id = 0;
|
||||||
|
conn.connector_type = 0;
|
||||||
|
- conn.count_modes = pre_modes;
|
||||||
|
- conn.count_props = pre_props;
|
||||||
|
- conn.count_encoders = pre_encoders;
|
||||||
|
-
|
||||||
|
- /*
|
||||||
|
- * Pre-allocate space for some modes, properties, and encoders. If
|
||||||
|
- * we're lucky we won't need to call into the kernel twice.
|
||||||
|
- */
|
||||||
|
- conn.props_ptr = VOID2U64(drmMalloc(pre_props * sizeof(uint32_t)));
|
||||||
|
- conn.prop_values_ptr = VOID2U64(drmMalloc(pre_props *
|
||||||
|
- sizeof(uint64_t)));
|
||||||
|
- conn.modes_ptr = VOID2U64(drmMalloc(pre_modes *
|
||||||
|
- sizeof(struct drm_mode_modeinfo)));
|
||||||
|
- conn.encoders_ptr = VOID2U64(drmMalloc(pre_encoders *
|
||||||
|
- sizeof(uint32_t)));
|
||||||
|
+ conn.count_modes = 0;
|
||||||
|
+ conn.modes_ptr = 0;
|
||||||
|
+ conn.count_props = 0;
|
||||||
|
+ conn.props_ptr = 0;
|
||||||
|
+ conn.prop_values_ptr = 0;
|
||||||
|
+ conn.count_encoders = 0;
|
||||||
|
+ conn.encoders_ptr = 0;
|
||||||
|
|
||||||
|
if (drmIoctl(fd, DRM_IOCTL_MODE_GETCONNECTOR, &conn))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
- if (conn.count_props <= pre_props &&
|
||||||
|
- conn.count_modes <= pre_modes &&
|
||||||
|
- conn.count_encoders <= pre_encoders)
|
||||||
|
- goto done;
|
||||||
|
-
|
||||||
|
- /* Oh well, free & reallocate everything and ask again... */
|
||||||
|
- drmFree(U642VOID(conn.prop_values_ptr));
|
||||||
|
- drmFree(U642VOID(conn.props_ptr));
|
||||||
|
- drmFree(U642VOID(conn.modes_ptr));
|
||||||
|
- drmFree(U642VOID(conn.encoders_ptr));
|
||||||
|
- conn.prop_values_ptr = 0;
|
||||||
|
- conn.props_ptr = 0;
|
||||||
|
- conn.modes_ptr = 0;
|
||||||
|
- conn.encoders_ptr = 0;
|
||||||
|
-
|
||||||
|
if (conn.count_props) {
|
||||||
|
conn.props_ptr = VOID2U64(drmMalloc(conn.count_props*sizeof(uint32_t)));
|
||||||
|
conn.prop_values_ptr = VOID2U64(drmMalloc(conn.count_props*sizeof(uint64_t)));
|
||||||
|
@@ -410,7 +386,6 @@ drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id)
|
||||||
|
if (drmIoctl(fd, DRM_IOCTL_MODE_GETCONNECTOR, &conn))
|
||||||
|
goto err_allocs;
|
||||||
|
|
||||||
|
-done:
|
||||||
|
if(!(r = drmMalloc(sizeof(*r)))) {
|
||||||
|
goto err_allocs;
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Direct Rendering Manager runtime library
|
Summary: Direct Rendering Manager runtime library
|
||||||
Name: libdrm
|
Name: libdrm
|
||||||
Version: 2.4.6
|
Version: 2.4.6
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://dri.sourceforge.net
|
URL: http://dri.sourceforge.net
|
||||||
@ -22,6 +22,8 @@ BuildRequires: libudev-devel
|
|||||||
|
|
||||||
Source2: 91-drm-modeset.rules
|
Source2: 91-drm-modeset.rules
|
||||||
|
|
||||||
|
# totally busted connector code
|
||||||
|
Patch0: libdrm-2.4.7-revert-bong.patch
|
||||||
# hardcode the 666 instead of 660 for device nodes
|
# hardcode the 666 instead of 660 for device nodes
|
||||||
Patch3: libdrm-make-dri-perms-okay.patch
|
Patch3: libdrm-make-dri-perms-okay.patch
|
||||||
# remove backwards compat not needed on Fedora
|
# remove backwards compat not needed on Fedora
|
||||||
@ -44,6 +46,7 @@ Direct Rendering Manager development package
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
|
%patch0 -p1 -b .bong
|
||||||
%patch3 -p1 -b .forceperms
|
%patch3 -p1 -b .forceperms
|
||||||
%patch4 -p1 -b .no-bc
|
%patch4 -p1 -b .no-bc
|
||||||
%patch8 -p1 -b .radeon
|
%patch8 -p1 -b .radeon
|
||||||
@ -106,6 +109,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/libdrm_nouveau.pc
|
%{_libdir}/pkgconfig/libdrm_nouveau.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Apr 11 2009 Dave Airlie <airlied@redhat.com> 2.4.6-4
|
||||||
|
- libdrm-2.4.7-revert-bong.patch - revert connector "speedups"
|
||||||
|
|
||||||
* Tue Apr 7 2009 Kristian Høgsberg <krh@redhat.com> - 2.4.6-3
|
* Tue Apr 7 2009 Kristian Høgsberg <krh@redhat.com> - 2.4.6-3
|
||||||
- BuildRequire libudev-devel for test cases.
|
- BuildRequire libudev-devel for test cases.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user