提交 83bc5fd2 编写于 作者: D Daniel Vetter 提交者: Dave Airlie

drm/sis: fixup sis_mm ioctl structs

Userspace uses long in quite a few places more than the kernel. Which
gives me neat proof that I'm the only guy on this side of the galaxy
who ever tried to run glxgears on a 64bit machine with sis graphics on
linux.

Note that the longs in drm_sis_mem_t aren't aligned properly, so this
won't even work with 32bit userspace on 64bit kernel as-is. Hence the
patch can't break that, either.

Nope, I'm not nuts enough to write the 32bit ioctl compat layer for
this and test it with some wine app. Even though hunting the ebay
dungeons for a sis card actually supported by the mesa drivers casts
some doubts on this ...
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 26587e69
...@@ -74,7 +74,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file ...@@ -74,7 +74,7 @@ static int sis_fb_init(struct drm_device *dev, void *data, struct drm_file *file
dev_priv->vram_offset = fb->offset; dev_priv->vram_offset = fb->offset;
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
DRM_DEBUG("offset = %u, size = %u\n", fb->offset, fb->size); DRM_DEBUG("offset = %lu, size = %lu\n", fb->offset, fb->size);
return 0; return 0;
} }
...@@ -161,7 +161,7 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file, ...@@ -161,7 +161,7 @@ static int sis_drm_alloc(struct drm_device *dev, struct drm_file *file,
mem->size = 0; mem->size = 0;
mem->free = 0; mem->free = 0;
DRM_DEBUG("alloc %d, size = %d, offset = %d\n", pool, mem->size, DRM_DEBUG("alloc %d, size = %ld, offset = %ld\n", pool, mem->size,
mem->offset); mem->offset);
return retval; return retval;
...@@ -215,7 +215,7 @@ static int sis_ioctl_agp_init(struct drm_device *dev, void *data, ...@@ -215,7 +215,7 @@ static int sis_ioctl_agp_init(struct drm_device *dev, void *data,
dev_priv->agp_offset = agp->offset; dev_priv->agp_offset = agp->offset;
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
DRM_DEBUG("offset = %u, size = %u\n", agp->offset, agp->size); DRM_DEBUG("offset = %lu, size = %lu\n", agp->offset, agp->size);
return 0; return 0;
} }
......
...@@ -51,17 +51,17 @@ ...@@ -51,17 +51,17 @@
typedef struct { typedef struct {
int context; int context;
unsigned int offset; unsigned long offset;
unsigned int size; unsigned long size;
unsigned long free; unsigned long free;
} drm_sis_mem_t; } drm_sis_mem_t;
typedef struct { typedef struct {
unsigned int offset, size; unsigned long offset, size;
} drm_sis_agp_t; } drm_sis_agp_t;
typedef struct { typedef struct {
unsigned int offset, size; unsigned long offset, size;
} drm_sis_fb_t; } drm_sis_fb_t;
struct sis_file_private { struct sis_file_private {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册