diff options
author | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-11-12 19:17:18 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-11-12 19:17:18 +0100 |
commit | 9a4cb7eab4f74747cc777a3fef31dbb46e1191e5 (patch) | |
tree | d3294a18c6956f77194db5cc12d65c2c6abb91ed | |
parent | 17789a409d3e83cad9f5cf06c2bb7123b78746b2 (diff) |
mode: Minor reodering and renaming
-rw-r--r-- | libdrm/xf86drmMode.c | 8 | ||||
-rw-r--r-- | linux-core/drm_crtc.c | 6 | ||||
-rw-r--r-- | shared-core/drm_mode.h | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c index 38fdbc11..a0a164de 100644 --- a/libdrm/xf86drmMode.c +++ b/libdrm/xf86drmMode.c @@ -200,7 +200,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth, if ((ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))) return ret; - *buf_id = f.buffer_id; + *buf_id = f.fb_id; return 0; } @@ -216,7 +216,7 @@ drmModeFBPtr drmModeGetFB(int fd, uint32_t buf) struct drm_mode_fb_cmd info; drmModeFBPtr r; - info.buffer_id = buf; + info.fb_id = buf; if (ioctl(fd, DRM_IOCTL_MODE_GETFB, &info)) return NULL; @@ -224,7 +224,7 @@ drmModeFBPtr drmModeGetFB(int fd, uint32_t buf) if (!(r = drmMalloc(sizeof(*r)))) return NULL; - r->buffer_id = info.buffer_id; + r->fb_id = info.fb_id; r->width = info.width; r->height = info.height; r->pitch = info.pitch; @@ -639,7 +639,7 @@ int drmModeReplaceFB(int fd, uint32_t buffer_id, f.bpp = bpp; f.depth = depth; f.handle = bo_handle; - f.buffer_id = buffer_id; + f.fb_id = buffer_id; if ((ret = ioctl(fd, DRM_IOCTL_MODE_REPLACEFB, &f))) return ret; diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c index 255cc8c2..aa0c4a95 100644 --- a/linux-core/drm_crtc.c +++ b/linux-core/drm_crtc.c @@ -1517,7 +1517,7 @@ int drm_mode_addfb(struct drm_device *dev, goto out; } - r->buffer_id = fb->base.id; + r->fb_id = fb->base.id; list_add(&fb->filp_head, &file_priv->fbs); out: @@ -1609,7 +1609,7 @@ int drm_mode_getfb(struct drm_device *dev, int ret = 0; mutex_lock(&dev->mode_config.mutex); - obj = drm_mode_object_find(dev, r->buffer_id, DRM_MODE_OBJECT_FB); + obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); if (!obj) { DRM_ERROR("invalid framebuffer id\n"); ret = -EINVAL; @@ -2212,7 +2212,7 @@ int drm_mode_replacefb(struct drm_device *dev, /* right replace the current bo attached to this fb with a new bo */ mutex_lock(&dev->mode_config.mutex); - obj = drm_mode_object_find(dev, r->buffer_id, DRM_MODE_OBJECT_FB); + obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB); if (!obj) { ret = -EINVAL; goto out; diff --git a/shared-core/drm_mode.h b/shared-core/drm_mode.h index 6b1abd5b..601d2bd8 100644 --- a/shared-core/drm_mode.h +++ b/shared-core/drm_mode.h @@ -126,8 +126,8 @@ struct drm_mode_crtc { #define DRM_MODE_ENCODER_TVDAC 4 struct drm_mode_get_encoder { - uint32_t encoder_type; uint32_t encoder_id; + uint32_t encoder_type; uint32_t crtc_id; /**< Id of crtc */ @@ -216,13 +216,13 @@ struct drm_mode_get_blob { }; struct drm_mode_fb_cmd { - uint32_t buffer_id; + uint32_t fb_id; uint32_t width, height; uint32_t pitch; uint32_t bpp; - uint32_t handle; uint32_t depth; - + /* driver specific handle */ + uint32_t handle; }; struct drm_mode_mode_cmd { |