* [PATCH] drm/sis: fixup sis_mm ioctl structs
@ 2012-06-24 17:57 Daniel Vetter
2012-07-18 15:51 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2012-06-24 17:57 UTC (permalink / raw)
To: Dave Airlie; +Cc: Daniel Vetter, DRI Development
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: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/sis/sis_mm.c | 6 +++---
include/drm/sis_drm.h | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/sis/sis_mm.c b/drivers/gpu/drm/sis/sis_mm.c
index 5acc396..2c23107 100644
--- a/drivers/gpu/drm/sis/sis_mm.c
+++ b/drivers/gpu/drm/sis/sis_mm.c
@@ -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;
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;
}
@@ -161,7 +161,7 @@ fail_alloc:
mem->size = 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);
return retval;
@@ -215,7 +215,7 @@ static int sis_ioctl_agp_init(struct drm_device *dev, void *data,
dev_priv->agp_offset = agp->offset;
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;
}
diff --git a/include/drm/sis_drm.h b/include/drm/sis_drm.h
index 035b804..df37632 100644
--- a/include/drm/sis_drm.h
+++ b/include/drm/sis_drm.h
@@ -51,17 +51,17 @@
typedef struct {
int context;
- unsigned int offset;
- unsigned int size;
+ unsigned long offset;
+ unsigned long size;
unsigned long free;
} drm_sis_mem_t;
typedef struct {
- unsigned int offset, size;
+ unsigned long offset, size;
} drm_sis_agp_t;
typedef struct {
- unsigned int offset, size;
+ unsigned long offset, size;
} drm_sis_fb_t;
struct sis_file_private {
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] drm/sis: fixup sis_mm ioctl structs
2012-06-24 17:57 [PATCH] drm/sis: fixup sis_mm ioctl structs Daniel Vetter
@ 2012-07-18 15:51 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-07-18 15:51 UTC (permalink / raw)
To: Dave Airlie; +Cc: Daniel Vetter, DRI Development
On Sun, Jun 24, 2012 at 07:57:24PM +0200, Daniel Vetter wrote:
> 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: Daniel Vetter <daniel.vetter@ffwll.ch>
Ping for inclusion into -next - I can't test sis stuff otherwise ;-)
-Daniel
> ---
> drivers/gpu/drm/sis/sis_mm.c | 6 +++---
> include/drm/sis_drm.h | 8 ++++----
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/sis/sis_mm.c b/drivers/gpu/drm/sis/sis_mm.c
> index 5acc396..2c23107 100644
> --- a/drivers/gpu/drm/sis/sis_mm.c
> +++ b/drivers/gpu/drm/sis/sis_mm.c
> @@ -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;
>
> 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;
> }
> @@ -161,7 +161,7 @@ fail_alloc:
> mem->size = 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);
>
> return retval;
> @@ -215,7 +215,7 @@ static int sis_ioctl_agp_init(struct drm_device *dev, void *data,
> dev_priv->agp_offset = agp->offset;
> 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;
> }
>
> diff --git a/include/drm/sis_drm.h b/include/drm/sis_drm.h
> index 035b804..df37632 100644
> --- a/include/drm/sis_drm.h
> +++ b/include/drm/sis_drm.h
> @@ -51,17 +51,17 @@
>
> typedef struct {
> int context;
> - unsigned int offset;
> - unsigned int size;
> + unsigned long offset;
> + unsigned long size;
> unsigned long free;
> } drm_sis_mem_t;
>
> typedef struct {
> - unsigned int offset, size;
> + unsigned long offset, size;
> } drm_sis_agp_t;
>
> typedef struct {
> - unsigned int offset, size;
> + unsigned long offset, size;
> } drm_sis_fb_t;
>
> struct sis_file_private {
> --
> 1.7.10
>
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-18 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-24 17:57 [PATCH] drm/sis: fixup sis_mm ioctl structs Daniel Vetter
2012-07-18 15:51 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox