143 lines
5.1 KiB
Diff
143 lines
5.1 KiB
Diff
|
|
Fix build with kernel 3.18
|
|
|
|
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
|
|
|
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_dma.c linux/drivers/gpu/drm/mach64/mach64_dma.c
|
|
--- linux/drivers/gpu/drm/mach64.orig/mach64_dma.c 2014-11-29 22:01:54.000000000 +0200
|
|
+++ linux/drivers/gpu/drm/mach64/mach64_dma.c 2014-11-30 00:02:06.906821818 +0200
|
|
@@ -1038,21 +1038,21 @@ static int mach64_do_dma_init(struct drm
|
|
INIT_LIST_HEAD(&dev_priv->placeholders);
|
|
INIT_LIST_HEAD(&dev_priv->pending);
|
|
|
|
- dev_priv->sarea = drm_getsarea(dev);
|
|
+ dev_priv->sarea = drm_legacy_getsarea(dev);
|
|
if (!dev_priv->sarea) {
|
|
DRM_ERROR("can not find sarea!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
mach64_do_cleanup_dma(dev);
|
|
return -EINVAL;
|
|
}
|
|
- dev_priv->fb = drm_core_findmap(dev, init->fb_offset);
|
|
+ dev_priv->fb = drm_legacy_findmap(dev, init->fb_offset);
|
|
if (!dev_priv->fb) {
|
|
DRM_ERROR("can not find frame buffer map!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
mach64_do_cleanup_dma(dev);
|
|
return -EINVAL;
|
|
}
|
|
- dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset);
|
|
+ dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset);
|
|
if (!dev_priv->mmio) {
|
|
DRM_ERROR("can not find mmio map!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
@@ -1060,7 +1060,7 @@ static int mach64_do_dma_init(struct drm
|
|
return -EINVAL;
|
|
}
|
|
|
|
- dev_priv->ring_map = drm_core_findmap(dev, init->ring_offset);
|
|
+ dev_priv->ring_map = drm_legacy_findmap(dev, init->ring_offset);
|
|
if (!dev_priv->ring_map) {
|
|
DRM_ERROR("can not find ring map!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
@@ -1072,7 +1072,7 @@ static int mach64_do_dma_init(struct drm
|
|
((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset);
|
|
|
|
if (!dev_priv->is_pci) {
|
|
- drm_core_ioremap(dev_priv->ring_map, dev);
|
|
+ drm_legacy_ioremap(dev_priv->ring_map, dev);
|
|
if (!dev_priv->ring_map->handle) {
|
|
DRM_ERROR("can not ioremap virtual address for"
|
|
" descriptor ring\n");
|
|
@@ -1082,7 +1082,7 @@ static int mach64_do_dma_init(struct drm
|
|
}
|
|
dev->agp_buffer_token = init->buffers_offset;
|
|
dev->agp_buffer_map =
|
|
- drm_core_findmap(dev, init->buffers_offset);
|
|
+ drm_legacy_findmap(dev, init->buffers_offset);
|
|
if (!dev->agp_buffer_map) {
|
|
DRM_ERROR("can not find dma buffer map!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
@@ -1093,7 +1093,7 @@ static int mach64_do_dma_init(struct drm
|
|
dev isn't passed all the way though the mach64 - DA */
|
|
dev_priv->dev_buffers = dev->agp_buffer_map;
|
|
|
|
- drm_core_ioremap(dev->agp_buffer_map, dev);
|
|
+ drm_legacy_ioremap(dev->agp_buffer_map, dev);
|
|
if (!dev->agp_buffer_map->handle) {
|
|
DRM_ERROR("can not ioremap virtual address for"
|
|
" dma buffer\n");
|
|
@@ -1102,7 +1102,7 @@ static int mach64_do_dma_init(struct drm
|
|
return -ENOMEM;
|
|
}
|
|
dev_priv->agp_textures =
|
|
- drm_core_findmap(dev, init->agp_textures_offset);
|
|
+ drm_legacy_findmap(dev, init->agp_textures_offset);
|
|
if (!dev_priv->agp_textures) {
|
|
DRM_ERROR("can not find agp texture region!\n");
|
|
dev->dev_private = (void *)dev_priv;
|
|
@@ -1376,10 +1376,10 @@ int mach64_do_cleanup_dma(struct drm_dev
|
|
|
|
if (!dev_priv->is_pci) {
|
|
if (dev_priv->ring_map)
|
|
- drm_core_ioremapfree(dev_priv->ring_map, dev);
|
|
+ drm_legacy_ioremapfree(dev_priv->ring_map, dev);
|
|
|
|
if (dev->agp_buffer_map) {
|
|
- drm_core_ioremapfree(dev->agp_buffer_map, dev);
|
|
+ drm_legacy_ioremapfree(dev->agp_buffer_map, dev);
|
|
dev->agp_buffer_map = NULL;
|
|
}
|
|
}
|
|
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.c linux/drivers/gpu/drm/mach64/mach64_drv.c
|
|
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.c 2014-11-29 22:01:54.000000000 +0200
|
|
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2014-11-29 23:14:21.918009653 +0200
|
|
@@ -34,6 +34,7 @@
|
|
#include "mach64_drv.h"
|
|
|
|
#include <drm/drm_pciids.h>
|
|
+#include <drm/drm_legacy.h>
|
|
|
|
static struct pci_device_id pciidlist[] = {
|
|
mach64_PCI_IDS
|
|
@@ -44,7 +45,7 @@ static const struct file_operations mach
|
|
.open = drm_open,
|
|
.release = drm_release,
|
|
.unlocked_ioctl = drm_ioctl,
|
|
- .mmap = drm_mmap,
|
|
+ .mmap = drm_legacy_mmap,
|
|
.poll = drm_poll,
|
|
.llseek = noop_llseek,
|
|
};
|
|
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.h linux/drivers/gpu/drm/mach64/mach64_drv.h
|
|
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.h 2014-11-29 22:01:54.000000000 +0200
|
|
+++ linux/drivers/gpu/drm/mach64/mach64_drv.h 2014-11-29 23:58:20.111491646 +0200
|
|
@@ -35,6 +35,8 @@
|
|
#ifndef __MACH64_DRV_H__
|
|
#define __MACH64_DRV_H__
|
|
|
|
+#include <drm/drm_legacy.h>
|
|
+
|
|
/* General customization:
|
|
*/
|
|
|
|
@@ -102,12 +104,12 @@ typedef struct drm_mach64_private {
|
|
u32 back_offset_pitch;
|
|
u32 depth_offset_pitch;
|
|
|
|
- drm_local_map_t *sarea;
|
|
- drm_local_map_t *fb;
|
|
- drm_local_map_t *mmio;
|
|
- drm_local_map_t *ring_map;
|
|
- drm_local_map_t *dev_buffers; /* this is a pointer to a structure in dev */
|
|
- drm_local_map_t *agp_textures;
|
|
+ struct drm_local_map *sarea;
|
|
+ struct drm_local_map *fb;
|
|
+ struct drm_local_map *mmio;
|
|
+ struct drm_local_map *ring_map;
|
|
+ struct drm_local_map *dev_buffers; /* this is a pointer to a structure in dev */
|
|
+ struct drm_local_map *agp_textures;
|
|
} drm_mach64_private_t;
|
|
|
|
extern struct drm_ioctl_desc mach64_ioctls[];
|