diff mbox

[resend] drm/savage: Do not add framebuffer and aperture maps

Message ID 1306520342-2145-1-git-send-email-lists.tormod@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tormod Volden May 27, 2011, 6:19 p.m. UTC
From: Tormod Volden <debian.tormod@gmail.com>

Since multiple framebuffer maps are not supported any longer (commit
41c2e75e60200a860a74b7c84a6375c105e7437f) these maps would be broken,
and they are not used by the drm anyway.

Leave it to userspace to create one working map instead.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
---

The drm driver is not required to set up fb maps, right?
For instance radeon does, but its comment says "Create mappings
for registers and framebuffer so userland doesn't necessarily
have to find them."

Tormod

 drivers/gpu/drm/savage/savage_bci.c |   13 +------------
 drivers/gpu/drm/savage/savage_drv.h |    2 --
 2 files changed, 1 insertions(+), 14 deletions(-)

Comments

Dave Airlie May 27, 2011, 8:48 p.m. UTC | #1
On Sat, May 28, 2011 at 4:19 AM, Tormod Volden <lists.tormod@gmail.com> wrote:
> From: Tormod Volden <debian.tormod@gmail.com>
>
> Since multiple framebuffer maps are not supported any longer (commit
> 41c2e75e60200a860a74b7c84a6375c105e7437f) these maps would be broken,
> and they are not used by the drm anyway.
>
> Leave it to userspace to create one working map instead.

Sorry Tormod, I'm really failing to get this far down my todo list.
I'll try and get some
time next week. I think I preferred the patch to make things work with
current userspace.
and undo the regression.

Dave.

>
> Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
> ---
>
> The drm driver is not required to set up fb maps, right?
> For instance radeon does, but its comment says "Create mappings
> for registers and framebuffer so userland doesn't necessarily
> have to find them."
>
> Tormod
>
>  drivers/gpu/drm/savage/savage_bci.c |   13 +------------
>  drivers/gpu/drm/savage/savage_drv.h |    2 --
>  2 files changed, 1 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
> index bf5f83e..91fe7b4 100644
> --- a/drivers/gpu/drm/savage/savage_bci.c
> +++ b/drivers/gpu/drm/savage/savage_bci.c
> @@ -639,18 +639,7 @@ int savage_driver_firstopen(struct drm_device *dev)
>        if (ret)
>                return ret;
>
> -       ret = drm_addmap(dev, fb_base, fb_size, _DRM_FRAME_BUFFER,
> -                        _DRM_WRITE_COMBINING, &dev_priv->fb);
> -       if (ret)
> -               return ret;
> -
> -       ret = drm_addmap(dev, aperture_base, SAVAGE_APERTURE_SIZE,
> -                        _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING,
> -                        &dev_priv->aperture);
> -       if (ret)
> -               return ret;
> -
> -       return ret;
> +       return 0;
>  }
>
>  /*
> diff --git a/drivers/gpu/drm/savage/savage_drv.h b/drivers/gpu/drm/savage/savage_drv.h
> index df2aac6..2b49b3e 100644
> --- a/drivers/gpu/drm/savage/savage_drv.h
> +++ b/drivers/gpu/drm/savage/savage_drv.h
> @@ -153,8 +153,6 @@ typedef struct drm_savage_private {
>        /* memory regions in physical memory */
>        drm_local_map_t *sarea;
>        drm_local_map_t *mmio;
> -       drm_local_map_t *fb;
> -       drm_local_map_t *aperture;
>        drm_local_map_t *status;
>        drm_local_map_t *agp_textures;
>        drm_local_map_t *cmd_dma;
> --
> 1.7.0.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c
index bf5f83e..91fe7b4 100644
--- a/drivers/gpu/drm/savage/savage_bci.c
+++ b/drivers/gpu/drm/savage/savage_bci.c
@@ -639,18 +639,7 @@  int savage_driver_firstopen(struct drm_device *dev)
 	if (ret)
 		return ret;
 
-	ret = drm_addmap(dev, fb_base, fb_size, _DRM_FRAME_BUFFER,
-			 _DRM_WRITE_COMBINING, &dev_priv->fb);
-	if (ret)
-		return ret;
-
-	ret = drm_addmap(dev, aperture_base, SAVAGE_APERTURE_SIZE,
-			 _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING,
-			 &dev_priv->aperture);
-	if (ret)
-		return ret;
-
-	return ret;
+	return 0;
 }
 
 /*
diff --git a/drivers/gpu/drm/savage/savage_drv.h b/drivers/gpu/drm/savage/savage_drv.h
index df2aac6..2b49b3e 100644
--- a/drivers/gpu/drm/savage/savage_drv.h
+++ b/drivers/gpu/drm/savage/savage_drv.h
@@ -153,8 +153,6 @@  typedef struct drm_savage_private {
 	/* memory regions in physical memory */
 	drm_local_map_t *sarea;
 	drm_local_map_t *mmio;
-	drm_local_map_t *fb;
-	drm_local_map_t *aperture;
 	drm_local_map_t *status;
 	drm_local_map_t *agp_textures;
 	drm_local_map_t *cmd_dma;