[Intel-gfx] [PATCH 3/5] drm: Rename dev_priv_size to buf_priv_size
Damien Lespiau
damien.lespiau at intel.com
Wed Jan 8 19:31:50 CET 2014
This field is really the size of the per-driver private data attached to
a struct drm_buf. Name it accordingly and add a comment so it doesn't
get confused with, say, the size of the private data attatched to a struct
drm_device.
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
drivers/gpu/drm/drm_bufs.c | 6 +++---
drivers/gpu/drm/i810/i810_drv.c | 2 +-
drivers/gpu/drm/mga/mga_drv.c | 2 +-
drivers/gpu/drm/r128/r128_drv.c | 2 +-
drivers/gpu/drm/radeon/radeon_drv.c | 2 +-
drivers/gpu/drm/savage/savage_drv.c | 2 +-
include/drm/drmP.h | 3 ++-
7 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 3bf8cc5..a4e3ab0 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -705,7 +705,7 @@ int drm_addbufs_agp(struct drm_device * dev, struct drm_buf_desc * request)
buf->pending = 0;
buf->file_priv = NULL;
- buf->dev_private = kzalloc(dev->driver->dev_priv_size,
+ buf->dev_private = kzalloc(dev->driver->buf_priv_size,
GFP_KERNEL);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
@@ -902,7 +902,7 @@ int drm_addbufs_pci(struct drm_device * dev, struct drm_buf_desc * request)
buf->pending = 0;
buf->file_priv = NULL;
- buf->dev_private = kzalloc(dev->driver->dev_priv_size,
+ buf->dev_private = kzalloc(dev->driver->buf_priv_size,
GFP_KERNEL);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
@@ -1065,7 +1065,7 @@ static int drm_addbufs_sg(struct drm_device * dev, struct drm_buf_desc * request
buf->pending = 0;
buf->file_priv = NULL;
- buf->dev_private = kzalloc(dev->driver->dev_priv_size,
+ buf->dev_private = kzalloc(dev->driver->buf_priv_size,
GFP_KERNEL);
if (!buf->dev_private) {
/* Set count correctly so we free the proper amount. */
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 441ccf8..b70a4fe 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -59,7 +59,7 @@ static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP |
DRIVER_HAVE_DMA,
- .dev_priv_size = sizeof(drm_i810_buf_priv_t),
+ .buf_priv_size = sizeof(drm_i810_buf_priv_t),
.load = i810_driver_load,
.lastclose = i810_driver_lastclose,
.preclose = i810_driver_preclose,
diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
index 6b1a87c..bdb44c4 100644
--- a/drivers/gpu/drm/mga/mga_drv.c
+++ b/drivers/gpu/drm/mga/mga_drv.c
@@ -60,7 +60,7 @@ static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_PCI_DMA |
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
- .dev_priv_size = sizeof(drm_mga_buf_priv_t),
+ .buf_priv_size = sizeof(drm_mga_buf_priv_t),
.load = mga_driver_load,
.unload = mga_driver_unload,
.lastclose = mga_driver_lastclose,
diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
index 5bd307c..09b2a73 100644
--- a/drivers/gpu/drm/r128/r128_drv.c
+++ b/drivers/gpu/drm/r128/r128_drv.c
@@ -58,7 +58,7 @@ static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG |
DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
- .dev_priv_size = sizeof(drm_r128_buf_priv_t),
+ .buf_priv_size = sizeof(drm_r128_buf_priv_t),
.load = r128_driver_load,
.preclose = r128_driver_preclose,
.lastclose = r128_driver_lastclose,
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 394e0a3..2afd583 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -287,7 +287,7 @@ static struct drm_driver driver_old = {
.driver_features =
DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_SG |
DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED,
- .dev_priv_size = sizeof(drm_radeon_buf_priv_t),
+ .buf_priv_size = sizeof(drm_radeon_buf_priv_t),
.load = radeon_driver_load,
.firstopen = radeon_driver_firstopen,
.open = radeon_driver_open,
diff --git a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c
index 3c03021..92c5b64 100644
--- a/drivers/gpu/drm/savage/savage_drv.c
+++ b/drivers/gpu/drm/savage/savage_drv.c
@@ -51,7 +51,7 @@ static const struct file_operations savage_driver_fops = {
static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_PCI_DMA,
- .dev_priv_size = sizeof(drm_savage_buf_priv_t),
+ .buf_priv_size = sizeof(drm_savage_buf_priv_t),
.load = savage_driver_load,
.firstopen = savage_driver_firstopen,
.preclose = savage_reclaim_buffers,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 2274274..6800c20 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -994,7 +994,8 @@ struct drm_driver {
char *date;
u32 driver_features;
- int dev_priv_size;
+ /* size of the private data attached to a struct drm_buf */
+ int buf_priv_size;
const struct drm_ioctl_desc *ioctls;
int num_ioctls;
const struct file_operations *fops;
--
1.8.3.1
More information about the Intel-gfx
mailing list