@@ -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. */
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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;
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@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(-)