*/
#include <stdint.h>
#include <sys/ioctl.h>
+#include <stdio.h>
#include "xf86drmMode.h"
#include "xf86drm.h"
drmModeResPtr drmModeGetResources(int fd)
{
struct drm_mode_card_res res;
- int i;
drmModeResPtr r = 0;
memset(&res, 0, sizeof(struct drm_mode_card_res));
f.depth = depth;
f.handle = bo_handle;
- if (ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))
+ if ((ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f)))
return ret;
*buf_id = f.buffer_id;
{
struct drm_mode_crtc crtc;
drmModeCrtcPtr r;
- int i = 0;
crtc.count_outputs = 0;
crtc.outputs = 0;
r->possibles = crtc.possibles;
return r;
-
-err_allocs:
-
- return 0;
}
{
struct drm_mode_get_property prop;
drmModePropertyPtr r;
- struct drm_mode_property_blob *blob_tmp;
- int i;
+
prop.prop_id = property_id;
prop.count_enum_blobs = 0;
prop.count_values = 0;
osp.prop_id = property_id;
osp.value = value;
- if (ret = ioctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp))
+ if ((ret = ioctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp)))
return ret;
return 0;
{
#ifdef __linux__
char pci_dev_dir[1024];
- char *bus_id_path;
- char *bus_type;
int domain, bus, dev, func;
DIR *sysdir;
struct dirent *dent;