Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: xsrc/external/mit/libdrm/dist
In article <20140321181027.4C71B98%cvs.netbsd.org@localhost>,
Taylor R Campbell <source-changes-d%NetBSD.org@localhost> wrote:
>-=-=-=-=-=-
>
>Module Name: xsrc
>Committed By: riastradh
>Date: Fri Mar 21 18:10:27 UTC 2014
>
>Modified Files:
> xsrc/external/mit/libdrm/dist: xf86drmMode.c
>
>Log Message:
>Use ioctl, not sysfs, to detect KMS support on NetBSD.
>
>
>To generate a diff of this commit:
>cvs rdiff -u -r1.1.1.3 -r1.2 xsrc/external/mit/libdrm/dist/xf86drmMode.c
>
>Please note that diffs are not public domain; they are subject to the
>copyright notices on the relevant files.
>
>
>-=-=-=-=-=-
>
>Modified files:
>
>Index: xsrc/external/mit/libdrm/dist/xf86drmMode.c
>diff -u xsrc/external/mit/libdrm/dist/xf86drmMode.c:1.1.1.3
>xsrc/external/mit/libdrm/dist/xf86drmMode.c:1.2
>--- xsrc/external/mit/libdrm/dist/xf86drmMode.c:1.1.1.3 Mon Mar 17
>07:51:42 2014
>+++ xsrc/external/mit/libdrm/dist/xf86drmMode.c Fri Mar 21 18:10:27 2014
>@@ -774,6 +774,22 @@ int drmCheckModesettingSupported(const c
> if (found)
> return 0;
> #endif
>+#ifdef __NetBSD__
Again why not use DRM_IOCTL_MODE_GETRESOURCES as the ifdef
>+ int fd;
>+ static const struct drm_mode_card_res zero_res;
>+ struct drm_mode_card_res res = zero_res;
= { 0 };
>+ int ret;
>+
>+ fd = drmOpen(NULL, busid);
>+ if (fd == -1)
>+ return -EINVAL;
>+ if (drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res))
>+ ret = -errno;
>+ else
>+ ret = 0;
>+ drmClose(fd);
>+ return ret;
>+#endif
> return -ENOSYS;
>
> }
>
>
>-=-=-=-=-=-
Home |
Main Index |
Thread Index |
Old Index