More header rework
Subsystems (18)
cover More header rework
So the main part here is the extraction of drm_gem.h. With a bit of prep work to ditch the legacy mmap stuff out of gem/ttm drivers. Plus a few random pieces of leftover cleanup that I've missed in my earlier header rework or just stumbled over while working on this.
With this drmP.h really starts to look rather sane (it's just 1kloc now), besides maybe the uppercase P in it's name and the massive list of headers it includes.
As usual comments and review highly welcome. I'll probably try to still throw this at Dave for 3.18 and see whether he rejects it or not. Otherwise no harm to postpone this until 3.19 (but David Herrrmann said he's got more work on his todo in this area, so merging earlier might avoid conflicts).
Cheers, Daniel
Daniel Vetter (8):
drm/<ttm-based-drivers>: Don't call drm_mmap drm/gem: Don't call drm_mmap from drm_gem_mmap
drm: move drm_mmap to <drm/drm_legacy.h>
drm: Move drm_vm_open_locked into drm_internal.h
drm: Move leftover ioctl declarations to drm_internal.h
drm: Move internal debugfs functions to drm_internal.h
drm: Extract <drm/drm_gem.h>
drm/doc: Fixup drm_irq kerneldoc includes.
Documentation/DocBook/drm.tmpl | 2 +- drivers/gpu/drm/armada/armada_gem.h | 2 + drivers/gpu/drm/ast/ast_drv.h | 2 + drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_drv.h | 2 + drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/drm_gem.c | 3 +- drivers/gpu/drm/drm_info.c | 2 + drivers/gpu/drm/drm_internal.h | 39 ++++++- drivers/gpu/drm/drm_prime.c | 2 + drivers/gpu/drm/drm_vm.c | 7 +- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 + drivers/gpu/drm/gma500/gtt.h | 1 + drivers/gpu/drm/i810/i810_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/mga/mga_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 2 + drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/r128/r128_drv.c | 2 +- drivers/gpu/drm/radeon/radeon.h | 2 + drivers/gpu/drm/radeon/radeon_drv.c | 4 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- drivers/gpu/drm/savage/savage_drv.c | 2 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 3 +- drivers/gpu/drm/tegra/gem.h | 1 + drivers/gpu/drm/udl/udl_drv.h | 1 + drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 182 +------------------------------ include/drm/drm_gem.h | 183 ++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 1 + include/drm/drm_legacy.h | 1 + 40 files changed, 276 insertions(+), 203 deletions(-) create mode 100644 include/drm/drm_gem.h
Signature · 1 line
2.1.0
PATCH 1/8 drm/<ttm-based-drivers>: Don't call drm_mmap
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
--- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/ast/ast_ttm.c +1 -1
@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)struct ast_private *ast;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; ast = file_priv->minor->dev->dev_private;
drivers/gpu/drm/bochs/bochs_mm.c +1 -1
@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)struct bochs_device *bochs;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; bochs = file_priv->minor->dev->dev_private;
drivers/gpu/drm/cirrus/cirrus_ttm.c +1 -1
@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)struct cirrus_device *cirrus;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; cirrus = file_priv->minor->dev->dev_private;
drivers/gpu/drm/mgag200/mgag200_ttm.c +1 -1
@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)struct mga_device *mdev;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; mdev = file_priv->minor->dev->dev_private;
drivers/gpu/drm/nouveau/nouveau_ttm.c +1 -1
@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)struct nouveau_drm *drm =nouveau_drm (file_priv->minor->dev);if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ;return ttm_bo_mmap (filp, vma, &drm->ttm.bdev); }
drivers/gpu/drm/qxl/qxl_ttm.c +1 -1
@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) {pr_info ("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n" , __func__, vma->vm_pgoff); -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
@@ -956,7 +956,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)int r;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) { -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;
Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
Hi
Quoted 4 lines · Daniel Vetter
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Yeah, I hope no-one ever used DMA-mmap or BUFS-mmap on those drivers.. otherwise, we can still revert it in special cases (or just break this legacy stuff..).
Thanks
David
Quoted 102 lines
--- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/ast/ast_ttm.c +1
-1@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)struct ast_private *ast;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; ast = file_priv->minor->dev->dev_private;drivers/gpu/drm/bochs/bochs_mm.c +1
-1@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)struct bochs_device *bochs;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; bochs = file_priv->minor->dev->dev_private;drivers/gpu/drm/cirrus/cirrus_ttm.c +1
-1@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)struct cirrus_device *cirrus;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; cirrus = file_priv->minor->dev->dev_private;drivers/gpu/drm/mgag200/mgag200_ttm.c +1
-1@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)struct mga_device *mdev;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; mdev = file_priv->minor->dev->dev_private;drivers/gpu/drm/nouveau/nouveau_ttm.c +1
-1@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)struct nouveau_drm *drm =nouveau_drm (file_priv->minor->dev);if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ;return ttm_bo_mmap (filp, vma, &drm->ttm.bdev); }drivers/gpu/drm/qxl/qxl_ttm.c +1
-1@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) {pr_info ("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n" , __func__, vma->vm_pgoff); -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;drivers/gpu/drm/radeon/radeon_ttm.c +1
-2@@ -956,7 +956,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)int r;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) { -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data; --
Quoted 2 lines
2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian König
maintainerRe: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
In reply to Daniel VetterAm 23.09.2014 um 15:46 schrieb Daniel Vetter:
Quoted 4 lines
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
To be honest I always wondered what this stuff is all about, never really understood it.
So patch is Acked-by: Christian König <[email protected]>
Quoted 93 lines
--- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/ast/ast_ttm.c +1
-1@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)struct ast_private *ast;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; ast = file_priv->minor->dev->dev_private;drivers/gpu/drm/bochs/bochs_mm.c +1
-1@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)struct bochs_device *bochs;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; bochs = file_priv->minor->dev->dev_private;drivers/gpu/drm/cirrus/cirrus_ttm.c +1
-1@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)struct cirrus_device *cirrus;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; cirrus = file_priv->minor->dev->dev_private;drivers/gpu/drm/mgag200/mgag200_ttm.c +1
-1@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)struct mga_device *mdev;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; mdev = file_priv->minor->dev->dev_private;drivers/gpu/drm/nouveau/nouveau_ttm.c +1
-1@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)struct nouveau_drm *drm =nouveau_drm (file_priv->minor->dev);if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ;return ttm_bo_mmap (filp, vma, &drm->ttm.bdev); }drivers/gpu/drm/qxl/qxl_ttm.c +1
-1@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) {pr_info ("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n" , __func__, vma->vm_pgoff); -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;drivers/gpu/drm/radeon/radeon_ttm.c +0
-0
drivers/gpu/drm/radeon/radeon_ttm.c int radeon_mmap(struct file *filp, struct vm_area_struct *vma) · line 962
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_ttm.c +1
-1@@ -956,7 +956,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)int r;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) { -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
In reply to Daniel VetterQuoted 4 lines · Daniel Vetter
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
I would say NAK as i am pretty sure this break radeon UMS code path. Of course if we have the go ahead to nuke radeon UMS i am more than happy.
Quoted 108 lines
--- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/ast/ast_ttm.c +1
-1@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)struct ast_private *ast;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; ast = file_priv->minor->dev->dev_private;drivers/gpu/drm/bochs/bochs_mm.c +1
-1@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)struct bochs_device *bochs;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; bochs = file_priv->minor->dev->dev_private;drivers/gpu/drm/cirrus/cirrus_ttm.c +1
-1@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)struct cirrus_device *cirrus;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; cirrus = file_priv->minor->dev->dev_private;drivers/gpu/drm/mgag200/mgag200_ttm.c +1
-1@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)struct mga_device *mdev;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; mdev = file_priv->minor->dev->dev_private;drivers/gpu/drm/nouveau/nouveau_ttm.c +1
-1@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)struct nouveau_drm *drm =nouveau_drm (file_priv->minor->dev);if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ;return ttm_bo_mmap (filp, vma, &drm->ttm.bdev); }drivers/gpu/drm/qxl/qxl_ttm.c +1
-1@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) {pr_info ("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n" , __func__, vma->vm_pgoff); -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;drivers/gpu/drm/radeon/radeon_ttm.c +1
-1@@ -956,7 +956,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)int r;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) { -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
Hi
Quoted 20 lines · Jerome Glisse
Quoted 4 lines · Daniel Vetter
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 3 lines
I would say NAK as i am pretty sure this break radeon UMS code path. Of course if we have the go ahead to nuke radeon UMS i am more than happy.
radeon_drv.c says:
driver_old.fops.mmap == drm_mmap;
..so I don't understand why that would break UMS? Do you use KMS mixed with UMS? radeon_mmap() is only used by radeon_driver_kms_fops, which is only used by kms_driver. UMS (which I understand as non-KMS in radeon case) should not be affected by this.
Thanks
David
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
Quoted 27 lines · David Herrmann
Hi
Quoted 20 lines · Jerome Glisse
Quoted 4 lines · Daniel Vetter
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Quoted 3 lines
I would say NAK as i am pretty sure this break radeon UMS code path. Of course if we have the go ahead to nuke radeon UMS i am more than happy.
Quoted 7 lines
radeon_drv.csays:driver_old.fops.mmap == drm_mmap;..so I don't understand why that would break UMS? Do you use KMS mixed with UMS?
radeon_mmap()is only used byradeon_driver_kms_fops, which is only used bykms_driver. UMS (which I understand as non-KMS in radeon case) should not be affected by this.
Oh this might be an heritage of old code in my mind when we had old user space running on top of KMS, more as a prototype stage and maybe also at one point the plan was to share the same mmap function so that old code could use new code cs ioctl.
So yeah this can be nuke sorry for the noise.
Quoted 3 lines
Thanks
David
Re: [PATCH 1/8] drm/<ttm-based-drivers>: Don't call drm_mmap
In reply to Daniel VetterQuoted 4 lines · Daniel Vetter
Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon.
Quoted 14 lines
Cc David Airlie <[email protected]>Cc Alex Deucher <[email protected]>Cc "Christian König" <[email protected]>Cc David Herrmann <[email protected]>Cc Rashika <[email protected]>Cc Josh Triplett <[email protected]>Cc Daniel Vetter <[email protected]>Cc Fabian Frederick <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alexandre Courbot <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Christian Engelmayer <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 104 lines
--- drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/ast/ast_ttm.c +1
-1@@ -427,7 +427,7 @@ int ast_mmap(struct file *filp, struct vm_area_struct *vma)struct ast_private *ast;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; ast = file_priv->minor->dev->dev_private;drivers/gpu/drm/bochs/bochs_mm.c +1
-1@@ -339,7 +339,7 @@ int bochs_mmap(struct file *filp, struct vm_area_struct *vma)struct bochs_device *bochs;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; bochs = file_priv->minor->dev->dev_private;drivers/gpu/drm/cirrus/cirrus_ttm.c +1
-1@@ -411,7 +411,7 @@ int cirrus_mmap(struct file *filp, struct vm_area_struct *vma)struct cirrus_device *cirrus;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; cirrus = file_priv->minor->dev->dev_private;drivers/gpu/drm/mgag200/mgag200_ttm.c +1
-1@@ -428,7 +428,7 @@ int mgag200_mmap(struct file *filp, struct vm_area_struct *vma)struct mga_device *mdev;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ; file_priv = filp->private_data; mdev = file_priv->minor->dev->dev_private;drivers/gpu/drm/nouveau/nouveau_ttm.c +1
-1@@ -281,7 +281,7 @@ nouveau_ttm_mmap(struct file *filp, struct vm_area_struct *vma)struct nouveau_drm *drm =nouveau_drm (file_priv->minor->dev);if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) -return drm_mmap (filp, vma); +return -EINVAL ;return ttm_bo_mmap (filp, vma, &drm->ttm.bdev); }drivers/gpu/drm/qxl/qxl_ttm.c +1
-1@@ -127,7 +127,7 @@ int qxl_mmap(struct file *filp, struct vm_area_struct *vma)if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) {pr_info ("%s: vma->vm_pgoff (%ld) < DRM_FILE_PAGE_OFFSET\n" , __func__, vma->vm_pgoff); -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data;drivers/gpu/drm/radeon/radeon_ttm.c +1
-2@@ -956,7 +956,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)int r;if (unlikely (vma->vm_pgoff <DRM_FILE_PAGE_OFFSET )) { -return drm_mmap (filp, vma); +return -EINVAL ; } file_priv = filp->private_data; --2.1.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/8 drm/gem: Don't call drm_mmap from drm_gem_mmap
In reply to Daniel VetterThe only user I could dig out was i915 back when ums+gem was still a thing. But we've just very much killed that, and even when someone screams about that we should resurrect that with a special hack (wrapping drm_gem_mmap) in i915, not in the core code.
So good riddance to another entry point of the legacy buffer mapping code.
--- drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_gem.c +1 -1
@@ -888,7 +888,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) vma_pages(vma));if (!node) {mutex_unlock (&dev->struct_mutex); -return drm_mmap (filp, vma); +return -EINVAL ; }else if (!drm_vma_node_is_allowed (node, filp)) {mutex_unlock (&dev->struct_mutex);return -EACCES ;
Signature · 1 line
2.1.0
Re: [PATCH 2/8] drm/gem: Don't call drm_mmap from drm_gem_mmap
Hi
Quoted 4 lines · Daniel Vetter
The only user I could dig out was i915 back when ums+gem was still a thing. But we've just very much killed that, and even when someone screams about that we should resurrect that with a special hack (wrapping
drm_gem_mmap) in i915, not in the core code.
Agreed! Drivers should just add the hacks themselves if there is user-space that needs it. Same as for patch #1:
Thanks
David
Quoted 28 lines
So good riddance to another entry point of the legacy buffer mapping code.
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_gem.c +1
-2@@ -888,7 +888,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) vma_pages(vma));if (!node) {mutex_unlock (&dev->struct_mutex); -return drm_mmap (filp, vma); +return -EINVAL ; }else if (!drm_vma_node_is_allowed (node, filp)) {mutex_unlock (&dev->struct_mutex);return -EACCES ; --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/8 drm: move drm_mmap to <drm/drm_legacy.h>
In reply to Daniel VetterNow that we've removed the copypasted users in gem/ttm we can relegate the legacy buffer mapping support to where it belongs. Also give it the proper drm_legacy_ prefix.
While at it statify drm_mmap_locked, somehow I've missed that in my previous header rework.
--- drivers/gpu/drm/drm_internal.h | 1 - drivers/gpu/drm/drm_vm.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 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 3 ++- drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 1 - include/drm/drm_legacy.h | 1 + 12 files changed, 13 insertions(+), 13 deletions(-)
drivers/gpu/drm/drm_internal.h +0 -1
@@ -37,7 +37,6 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,/* drm_vm.c */ int drm_vma_info (struct seq_file *m,void *data); -int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma);void drm_vm_close_locked (struct drm_device *dev,struct vm_area_struct *vma);/* drm_prime.c */
drivers/gpu/drm/drm_vm.c +3 -3
@@ -541,7 +541,7 @@ static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)* according to the mapping type and remaps the pages. Finally sets the file * pointer and calls vm_open(). */ -int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma) +static int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma) {struct drm_file *priv = filp->private_data;struct drm_device *dev = priv->minor->dev;
@@ -655,7 +655,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)return 0 ; } -int drm_mmap (struct file *filp,struct vm_area_struct *vma) +int drm_legacy_mmap (struct file *filp,struct vm_area_struct *vma) {struct drm_file *priv = filp->private_data;struct drm_device *dev = priv->minor->dev;
@@ -670,7 +670,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)return ret; } -EXPORT_SYMBOL (drm_mmap); +EXPORT_SYMBOL (drm_legacy_mmap);void drm_legacy_vma_flush (struct drm_device *dev) {
drivers/gpu/drm/i810/i810_drv.c +1 -1
@@ -47,7 +47,7 @@ static const struct file_operations i810_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,
drivers/gpu/drm/mga/mga_drv.c +1 -1
@@ -48,7 +48,7 @@ static const struct file_operations mga_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = mga_compat_ioctl,
drivers/gpu/drm/r128/r128_drv.c +1 -1
@@ -46,7 +46,7 @@ static const struct file_operations r128_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = r128_compat_ioctl,
drivers/gpu/drm/radeon/radeon_drv.c +1 -1
@@ -308,7 +308,7 @@ static const struct file_operations radeon_driver_old_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, .read = drm_read,#ifdef CONFIG_COMPAT
drivers/gpu/drm/savage/savage_drv.c +1 -1
@@ -40,7 +40,7 @@ static const struct file_operations savage_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,
drivers/gpu/drm/sis/sis_drv.c +1 -1
@@ -70,7 +70,7 @@ static const struct file_operations sis_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,
drivers/gpu/drm/tdfx/tdfx_drv.c +2 -1
@@ -36,6 +36,7 @@#include "tdfx_drv.h" #include <drm/drm_pciids.h> +#include <drm/drm_legacy.h> static struct pci_device_id pciidlist[] = { tdfx_PCI_IDS
@@ -46,7 +47,7 @@ static const struct file_operations tdfx_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,
drivers/gpu/drm/via/via_drv.c +1 -1
@@ -62,7 +62,7 @@ static const struct file_operations via_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,
include/drm/drmP.h +0 -1
@@ -961,7 +961,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buffer,extern int drm_release (struct inode *inode,struct file *filp);/* Mapping support (drm_vm.h) */ -extern int drm_mmap (struct file *filp,struct vm_area_struct *vma);extern void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);extern unsigned int drm_poll (struct file *filp,struct poll_table_struct *wait);
include/drm/drm_legacy.h +1 -0
@@ -157,6 +157,7 @@ int drm_legacy_addmap(struct drm_device *d, resource_size_t offset,int drm_legacy_rmmap (struct drm_device *d,struct drm_local_map *map);int drm_legacy_rmmap_locked (struct drm_device *d,struct drm_local_map *map);struct drm_local_map *drm_legacy_getsarea (struct drm_device *dev); +int drm_legacy_mmap (struct file *filp,struct vm_area_struct *vma);int drm_legacy_addbufs_agp (struct drm_device *d,struct drm_buf_desc *req);int drm_legacy_addbufs_pci (struct drm_device *d,struct drm_buf_desc *req);
Signature · 1 line
2.1.0
Re: [PATCH 3/8] drm: move drm_mmap to <drm/drm_legacy.h>
Hi
Quoted 6 lines · Daniel Vetter
Now that we've removed the copypasted users in gem/ttm we can relegate the legacy buffer mapping support to where it belongs. Also give it the proper
drm_legacy_prefix.While at it statify
drm_mmap_locked, somehow I've missed that in my previous header rework.
Thanks
David
Quoted 202 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_internal.h | 1 - drivers/gpu/drm/drm_vm.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 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 3 ++- drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 1 - include/drm/drm_legacy.h | 1 + 12 files changed, 13 insertions(+), 13 deletions(-)drivers/gpu/drm/drm_internal.h +0
-1@@ -37,7 +37,6 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,/* drm_vm.c */ int drm_vma_info (struct seq_file *m,void *data); -int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma);void drm_vm_close_locked (struct drm_device *dev,struct vm_area_struct *vma);/* drm_prime.c */ drivers/gpu/drm/drm_vm.c +3
-3@@ -541,7 +541,7 @@ static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)* according to the mapping type and remaps the pages. Finally sets the file * pointer and calls vm_open(). */ -int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma) +static int drm_mmap_locked (struct file *filp,struct vm_area_struct *vma) {struct drm_file *priv = filp->private_data;struct drm_device *dev = priv->minor->dev;@@ -655,7 +655,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)return 0 ; } -int drm_mmap (struct file *filp,struct vm_area_struct *vma) +int drm_legacy_mmap (struct file *filp,struct vm_area_struct *vma) {struct drm_file *priv = filp->private_data;struct drm_device *dev = priv->minor->dev;@@ -670,7 +670,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)return ret; } -EXPORT_SYMBOL (drm_mmap); +EXPORT_SYMBOL (drm_legacy_mmap);void drm_legacy_vma_flush (struct drm_device *dev) {drivers/gpu/drm/i810/i810_drv.c +1
-1@@ -47,7 +47,7 @@ static const struct file_operations i810_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,drivers/gpu/drm/mga/mga_drv.c +1
-1@@ -48,7 +48,7 @@ static const struct file_operations mga_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = mga_compat_ioctl,drivers/gpu/drm/r128/r128_drv.c +1
-1@@ -46,7 +46,7 @@ static const struct file_operations r128_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = r128_compat_ioctl,drivers/gpu/drm/radeon/radeon_drv.c +1
-1@@ -308,7 +308,7 @@ static const struct file_operations radeon_driver_old_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, .read = drm_read,#ifdef CONFIG_COMPAT drivers/gpu/drm/savage/savage_drv.c +1
-1@@ -40,7 +40,7 @@ static const struct file_operations savage_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,drivers/gpu/drm/sis/sis_drv.c +1
-1@@ -70,7 +70,7 @@ static const struct file_operations sis_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,drivers/gpu/drm/tdfx/tdfx_drv.c +2
-1@@ -36,6 +36,7 @@#include "tdfx_drv.h" #include <drm/drm_pciids.h> +#include <drm/drm_legacy.h> static struct pci_device_id pciidlist[] = { tdfx_PCI_IDS@@ -46,7 +47,7 @@ static const struct file_operations tdfx_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,drivers/gpu/drm/via/via_drv.c +1
-1@@ -62,7 +62,7 @@ static const struct file_operations via_driver_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = drm_ioctl, - .mmap = drm_mmap, + .mmap = drm_legacy_mmap, .poll = drm_poll, #ifdef CONFIG_COMPAT .compat_ioctl = drm_compat_ioctl,include/drm/drmP.h +0
-1@@ -961,7 +961,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buffer,extern int drm_release (struct inode *inode,struct file *filp);/* Mapping support (drm_vm.h) */ -extern int drm_mmap (struct file *filp,struct vm_area_struct *vma);extern void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);extern unsigned int drm_poll (struct file *filp,struct poll_table_struct *wait);include/drm/drm_legacy.h +1
-1@@ -157,6 +157,7 @@ int drm_legacy_addmap(struct drm_device *d, resource_size_t offset,int drm_legacy_rmmap (struct drm_device *d,struct drm_local_map *map);int drm_legacy_rmmap_locked (struct drm_device *d,struct drm_local_map *map);struct drm_local_map *drm_legacy_getsarea (struct drm_device *dev); +int drm_legacy_mmap (struct file *filp,struct vm_area_struct *vma);int drm_legacy_addbufs_agp (struct drm_device *d,struct drm_buf_desc *req);int drm_legacy_addbufs_pci (struct drm_device *d,struct drm_buf_desc *req); --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/8 drm: Move drm_vm_open_locked into drm_internal.h
In reply to Daniel VetterLeftover from my previous header cleanup.
This depends upon the patch to rework exynos mmap support, otherwise it'll break exynos.
--- drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_vm.c | 1 - include/drm/drmP.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/drm_internal.h +1 -0
@@ -37,6 +37,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,/* drm_vm.c */ int drm_vma_info (struct seq_file *m,void *data); +void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);void drm_vm_close_locked (struct drm_device *dev,struct vm_area_struct *vma);/* drm_prime.c */
drivers/gpu/drm/drm_vm.c +0 -1
@@ -421,7 +421,6 @@ void drm_vm_open_locked(struct drm_device *dev,list_add (&vma_entry->head, &dev->vmalist); } } -EXPORT_SYMBOL_GPL (drm_vm_open_locked);static void drm_vm_open (struct vm_area_struct *vma) {
include/drm/drmP.h +0 -1
@@ -961,7 +961,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buffer,extern int drm_release (struct inode *inode,struct file *filp);/* Mapping support (drm_vm.h) */ -extern void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);extern unsigned int drm_poll (struct file *filp,struct poll_table_struct *wait);/* Misc. IOCTL support (drm_ioctl.c) */
Signature · 1 line
2.1.0
Re: [PATCH 4/8] drm: Move drm_vm_open_locked into drm_internal.h
Hi
Quoted 4 lines · Daniel Vetter
Leftover from my previous header cleanup.
This depends upon the patch to rework exynos mmap support, otherwise it'll break exynos.
What patch do you mean? I cannot see any users of drm_vm_open_locked() anywhere besides drm_gem.c and drm_vm.c, (branch drm-next).
Thanks
David
Quoted 51 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_vm.c | 1 - include/drm/drmP.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_internal.h +1
-0@@ -37,6 +37,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,/* drm_vm.c */ int drm_vma_info (struct seq_file *m,void *data); +void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);void drm_vm_close_locked (struct drm_device *dev,struct vm_area_struct *vma);/* drm_prime.c */ drivers/gpu/drm/drm_vm.c +0
-1@@ -421,7 +421,6 @@ void drm_vm_open_locked(struct drm_device *dev,list_add (&vma_entry->head, &dev->vmalist); } } -EXPORT_SYMBOL_GPL (drm_vm_open_locked);static void drm_vm_open (struct vm_area_struct *vma) {include/drm/drmP.h +0
-2@@ -961,7 +961,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buffer,extern int drm_release (struct inode *inode,struct file *filp);/* Mapping support (drm_vm.h) */ -extern void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);extern unsigned int drm_poll (struct file *filp,struct poll_table_struct *wait);/* Misc. IOCTL support (drm_ioctl.c) */ --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 4/8] drm: Move drm_vm_open_locked into drm_internal.h
Quoted 10 lines · David Herrmann
Hi
Quoted 4 lines · Daniel Vetter
Leftover from my previous header cleanup.
This depends upon the patch to rework exynos mmap support, otherwise it'll break exynos.
What patch do you mean? I cannot see any users of
drm_vm_open_locked()anywhere besidesdrm_gem.canddrm_vm.c, (branch drm-next).
Only since exynos-next was pulled in yesterday, which is why I've now sent these out. I'll reword the commit message to reflect this. -Daniel
Quoted 57 lines
Reviewed-by David Herrmann <[email protected]>Thanks
DavidQuoted 51 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_internal.h | 1 + drivers/gpu/drm/drm_vm.c | 1 - include/drm/drmP.h | 1 - 3 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/drm_internal.h +1
-0@@ -37,6 +37,7 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,/* drm_vm.c */ int drm_vma_info (struct seq_file *m,void *data); +void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);void drm_vm_close_locked (struct drm_device *dev,struct vm_area_struct *vma);/* drm_prime.c */ drivers/gpu/drm/drm_vm.c +0
-1@@ -421,7 +421,6 @@ void drm_vm_open_locked(struct drm_device *dev,list_add (&vma_entry->head, &dev->vmalist); } } -EXPORT_SYMBOL_GPL (drm_vm_open_locked);static void drm_vm_open (struct vm_area_struct *vma) {include/drm/drmP.h +0
-2@@ -961,7 +961,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buffer,extern int drm_release (struct inode *inode,struct file *filp);/* Mapping support (drm_vm.h) */ -extern void drm_vm_open_locked (struct drm_device *dev,struct vm_area_struct *vma);extern unsigned int drm_poll (struct file *filp,struct poll_table_struct *wait);/* Misc. IOCTL support (drm_ioctl.c) */ --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 5/8 drm: Move leftover ioctl declarations to drm_internal.h
In reply to Daniel VetterSomehow I've missed these three, fix this up asap. Plus move drm_master_create since while at it.
--- drivers/gpu/drm/drm_internal.h | 9 +++++++++ include/drm/drmP.h | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/drm_internal.h +9 -0
@@ -62,6 +62,8 @@ int drm_gem_name_info(struct seq_file *m, void *data);/* drm_irq.c */ int drm_control (struct drm_device *dev,void *data,struct drm_file *file_priv); +int drm_modeset_ctl (struct drm_device *dev,void *data, +struct drm_file *file_priv);/* drm_auth.c */ int drm_getmagic(struct drm_device *dev, void *data,
@@ -93,3 +95,10 @@ int drm_gem_open_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);void drm_gem_open (struct drm_device *dev,struct drm_file *file_private);void drm_gem_release (struct drm_device *dev,struct drm_file *file_private); + +/* drm_drv.c */ +int drm_setmaster_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv); +int drm_dropmaster_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv); +struct drm_master *drm_master_create (struct drm_minor *minor);
include/drm/drmP.h +0 -7
@@ -1026,15 +1026,8 @@ static inline wait_queue_head_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc/* Modesetting support */ extern void drm_vblank_pre_modeset (struct drm_device *dev,int crtc);extern void drm_vblank_post_modeset (struct drm_device *dev,int crtc); -extern int drm_modeset_ctl (struct drm_device *dev,void *data, -struct drm_file *file_priv);/* Stub support (drm_stub.h) */ -extern int drm_setmaster_ioctl (struct drm_device *dev,void *data, -struct drm_file *file_priv); -extern int drm_dropmaster_ioctl (struct drm_device *dev,void *data, -struct drm_file *file_priv); -struct drm_master *drm_master_create (struct drm_minor *minor);extern struct drm_master *drm_master_get (struct drm_master *master);extern void drm_master_put (struct drm_master **master);
Signature · 1 line
2.1.0
Re: [PATCH 5/8] drm: Move leftover ioctl declarations to drm_internal.h
Hi
Quoted 2 lines · Daniel Vetter
Somehow I've missed these three, fix this up asap. Plus move
drm_master_createsince while at it.
s/since//
Thanks
David
Quoted 57 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_internal.h | 9 +++++++++ include/drm/drmP.h | 7 ------- 2 files changed, 9 insertions(+), 7 deletions(-)drivers/gpu/drm/drm_internal.h +9
-0@@ -62,6 +62,8 @@ int drm_gem_name_info(struct seq_file *m, void *data);/* drm_irq.c */ int drm_control (struct drm_device *dev,void *data,struct drm_file *file_priv); +int drm_modeset_ctl (struct drm_device *dev,void *data, +struct drm_file *file_priv);/* drm_auth.c */ int drm_getmagic(struct drm_device *dev, void *data,@@ -93,3 +95,10 @@ int drm_gem_open_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);void drm_gem_open (struct drm_device *dev,struct drm_file *file_private);void drm_gem_release (struct drm_device *dev,struct drm_file *file_private); + +/* drm_drv.c */ +int drm_setmaster_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv); +int drm_dropmaster_ioctl (struct drm_device *dev,void *data, +struct drm_file *file_priv); +struct drm_master *drm_master_create (struct drm_minor *minor);include/drm/drmP.h +0
-8@@ -1026,15 +1026,8 @@ static inline wait_queue_head_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc/* Modesetting support */ extern void drm_vblank_pre_modeset (struct drm_device *dev,int crtc);extern void drm_vblank_post_modeset (struct drm_device *dev,int crtc); -extern int drm_modeset_ctl (struct drm_device *dev,void *data, -struct drm_file *file_priv);/* Stub support (drm_stub.h) */ -extern int drm_setmaster_ioctl (struct drm_device *dev,void *data, -struct drm_file *file_priv); -extern int drm_dropmaster_ioctl (struct drm_device *dev,void *data, -struct drm_file *file_priv); -struct drm_master *drm_master_create (struct drm_minor *minor);extern struct drm_master *drm_master_get (struct drm_master *master);extern void drm_master_put (struct drm_master **master); --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/8 drm: Move internal debugfs functions to drm_internal.h
In reply to Daniel VetterIn my header cleanup I've missed the debugfs functions completely.
--- drivers/gpu/drm/drm_internal.h | 28 ++++++++++++++++++++++++++++ include/drm/drmP.h | 25 ------------------------- 2 files changed, 28 insertions(+), 25 deletions(-)
drivers/gpu/drm/drm_internal.h +28 -0
@@ -102,3 +102,31 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,int drm_dropmaster_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv);struct drm_master *drm_master_create (struct drm_minor *minor); + +/* drm_debugfs.c */ +#if defined(CONFIG_DEBUG_FS ) +int drm_debugfs_init (struct drm_minor *minor,int minor_id, +struct dentry *root); +int drm_debugfs_cleanup (struct drm_minor *minor); +int drm_debugfs_connector_add (struct drm_connector *connector); +void drm_debugfs_connector_remove (struct drm_connector *connector); +#else +static inline int drm_debugfs_init (struct drm_minor *minor,int minor_id, +struct dentry *root) +{ +return 0 ; +} + +static inline int drm_debugfs_cleanup (struct drm_minor *minor) +{ +return 0 ; +} + +static inline int drm_debugfs_connector_add (struct drm_connector *connector) +{ +return 0 ; +} +static inline void drm_debugfs_connector_remove (struct drm_connector *connector) +{ +} +#endif
include/drm/drmP.h +0 -25
@@ -1037,23 +1037,12 @@ extern unsigned int drm_debug;/* Debugfs support */ #if defined(CONFIG_DEBUG_FS ) -extern int drm_debugfs_init (struct drm_minor *minor,int minor_id, -struct dentry *root);extern int drm_debugfs_create_files (const struct drm_info_list *files,int count,struct dentry *root,struct drm_minor *minor);extern int drm_debugfs_remove_files (const struct drm_info_list *files,int count,struct drm_minor *minor); -extern int drm_debugfs_cleanup (struct drm_minor *minor); -extern int drm_debugfs_connector_add (struct drm_connector *connector); -extern void drm_debugfs_connector_remove (struct drm_connector *connector);#else -static inline int drm_debugfs_init (struct drm_minor *minor,int minor_id, -struct dentry *root) -{ -return 0 ; -} -static inline int drm_debugfs_create_files (const struct drm_info_list *files,int count,struct dentry *root,struct drm_minor *minor)
@@ -1066,20 +1055,6 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files, {return 0 ; } - -static inline int drm_debugfs_cleanup (struct drm_minor *minor) -{ -return 0 ; -} - -static inline int drm_debugfs_connector_add (struct drm_connector *connector) -{ -return 0 ; -} -static inline void drm_debugfs_connector_remove (struct drm_connector *connector) -{ -} -#endif extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
Signature · 1 line
2.1.0
Re: [PATCH 6/8] drm: Move internal debugfs functions to drm_internal.h
Hi
Quoted 1 line · Daniel Vetter
In my header cleanup I've missed the debugfs functions completely.
I'd actually prefer a drm_debugfs.h, but I have some local patches that refactor drm-debugfs stuff, anyway. So I can do it later myself:
Thanks
David
Quoted 98 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_internal.h | 28 ++++++++++++++++++++++++++++ include/drm/drmP.h | 25 ------------------------- 2 files changed, 28 insertions(+), 25 deletions(-)drivers/gpu/drm/drm_internal.h +28
-0@@ -102,3 +102,31 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,int drm_dropmaster_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv);struct drm_master *drm_master_create (struct drm_minor *minor); + +/* drm_debugfs.c */ +#if defined(CONFIG_DEBUG_FS ) +int drm_debugfs_init (struct drm_minor *minor,int minor_id, +struct dentry *root); +int drm_debugfs_cleanup (struct drm_minor *minor); +int drm_debugfs_connector_add (struct drm_connector *connector); +void drm_debugfs_connector_remove (struct drm_connector *connector); +#else +static inline int drm_debugfs_init (struct drm_minor *minor,int minor_id, +struct dentry *root) +{ +return 0 ; +} + +static inline int drm_debugfs_cleanup (struct drm_minor *minor) +{ +return 0 ; +} + +static inline int drm_debugfs_connector_add (struct drm_connector *connector) +{ +return 0 ; +} +static inline void drm_debugfs_connector_remove (struct drm_connector *connector) +{ +} +#endif include/drm/drmP.h +0
-26@@ -1037,23 +1037,12 @@ extern unsigned int drm_debug;/* Debugfs support */ #if defined(CONFIG_DEBUG_FS ) -extern int drm_debugfs_init (struct drm_minor *minor,int minor_id, -struct dentry *root);extern int drm_debugfs_create_files (const struct drm_info_list *files,int count,struct dentry *root,struct drm_minor *minor);extern int drm_debugfs_remove_files (const struct drm_info_list *files,int count,struct drm_minor *minor); -extern int drm_debugfs_cleanup (struct drm_minor *minor); -extern int drm_debugfs_connector_add (struct drm_connector *connector); -extern void drm_debugfs_connector_remove (struct drm_connector *connector);#else -static inline int drm_debugfs_init (struct drm_minor *minor,int minor_id, -struct dentry *root) -{ -return 0 ; -} -static inline int drm_debugfs_create_files (const struct drm_info_list *files,int count,struct dentry *root,struct drm_minor *minor)@@ -1066,20 +1055,6 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files, {return 0 ; } - -static inline int drm_debugfs_cleanup (struct drm_minor *minor) -{ -return 0 ; -} - -static inline int drm_debugfs_connector_add (struct drm_connector *connector) -{ -return 0 ; -} -static inline void drm_debugfs_connector_remove (struct drm_connector *connector) -{ -} -#endif extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev, --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/8 drm: Extract <drm/drm_gem.h>
In reply to Daniel Vetterv2: Don't forget git add, noticed by David.
--- drivers/gpu/drm/armada/armada_gem.h | 2 + drivers/gpu/drm/ast/ast_drv.h | 2 + drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/cirrus/cirrus_drv.h | 2 + drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/drm_info.c | 2 + drivers/gpu/drm/drm_prime.c | 2 + drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 + drivers/gpu/drm/gma500/gtt.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 2 + drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/radeon/radeon.h | 2 + drivers/gpu/drm/radeon/radeon_drv.c | 2 + drivers/gpu/drm/tegra/gem.h | 1 + drivers/gpu/drm/udl/udl_drv.h | 1 + include/drm/drmP.h | 148 +------------------------- include/drm/drm_gem.h | 183 ++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 1 + 22 files changed, 216 insertions(+), 147 deletions(-) create mode 100644 include/drm/drm_gem.h
drivers/gpu/drm/armada/armada_gem.h +2 -0
@@ -8,6 +8,8 @@ #ifndef ARMADA_GEM_H #define ARMADA_GEM_H +#include <drm/drm_gem.h> + /* GEM */ struct armada_gem_object { struct drm_gem_object obj;
drivers/gpu/drm/ast/ast_drv.h +2 -0
@@ -36,6 +36,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#include <linux/i2c.h> #include <linux/i2c-algo-bit.h>
drivers/gpu/drm/bochs/bochs.h +2 -0
@@ -7,6 +7,8 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_gem.h> +#include <ttm/ttm_bo_driver.h> #include <ttm/ttm_page_alloc.h>
drivers/gpu/drm/cirrus/cirrus_drv.h +2 -0
@@ -21,6 +21,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#define DRIVER_AUTHOR "Matthew Garrett"#define DRIVER_NAME "cirrus"
drivers/gpu/drm/drm_gem.c +1 -0
@@ -38,6 +38,7 @@#include <linux/dma-buf.h> #include <drm/drmP.h> #include <drm/drm_vma_manager.h> +#include <drm/drm_gem.h> #include "drm_internal.h" /** @file drm_gem.c
drivers/gpu/drm/drm_info.c +2 -0
@@ -35,6 +35,8 @@#include <linux/seq_file.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> +#include "drm_legacy.h" /**
drivers/gpu/drm/drm_prime.c +2 -0
@@ -29,6 +29,8 @@#include <linux/export.h> #include <linux/dma-buf.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> +#include "drm_internal.h" /*
drivers/gpu/drm/exynos/exynos_drm_gem.h +2 -0
@@ -12,6 +12,8 @@#ifndef _EXYNOS_DRM_GEM_H_#define _EXYNOS_DRM_GEM_H_ +#include <drm/drm_gem.h> +#define to_exynos_gem_obj (x) container_of(x,\ struct exynos_drm_gem_obj, base)
drivers/gpu/drm/gma500/gtt.h +1 -0
@@ -21,6 +21,7 @@#define _PSB_GTT_H_#include <drm/drmP.h> +#include <drm/drm_gem.h> /* This wants cleaning up with respect to the psb_dev and un-needed stuff */ struct psb_gtt {
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -43,6 +43,7 @@#include <linux/i2c-algo-bit.h> #include <drm/intel-gtt.h> #include <drm/drm_legacy.h> /* for struct drm_dma_handle */ +#include <drm/drm_gem.h> #include <linux/backlight.h> #include <linux/hashtable.h> #include <linux/intel-iommu.h>
drivers/gpu/drm/mgag200/mgag200_drv.h +2 -0
@@ -22,6 +22,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#include <linux/i2c.h> #include <linux/i2c-algo-bit.h>
drivers/gpu/drm/msm/msm_drv.h +1 -0
@@ -51,6 +51,7 @@ static inline struct device *msm_iommu_get_ctx(const char *ctx_name)#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> #include <drm/msm_drm.h> +#include <drm/drm_gem.h> struct msm_kms ;struct msm_gpu ;
drivers/gpu/drm/nouveau/nouveau_bo.h +2 -0
@@ -1,6 +1,8 @@#ifndef __NOUVEAU_BO_H__#define __NOUVEAU_BO_H__ +#include <drm/drm_gem.h> +struct nouveau_channel ;struct nouveau_fence ;struct nouveau_vma ;
drivers/gpu/drm/omapdrm/omap_drv.h +1 -0
@@ -26,6 +26,7 @@#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include <drm/omap_drm.h> +#include <drm/drm_gem.h> #include <linux/platform_data/omap_drm.h>
drivers/gpu/drm/qxl/qxl_drv.h +2 -0
@@ -43,6 +43,8 @@#include <ttm/ttm_placement.h> #include <ttm/ttm_module.h> +#include <drm/drm_gem.h> +/* just for ttm_validate_buffer */ #include <ttm/ttm_execbuf_util.h>
drivers/gpu/drm/radeon/radeon.h +2 -0
@@ -74,6 +74,8 @@#include <ttm/ttm_module.h> #include <ttm/ttm_execbuf_util.h> +#include <drm/drm_gem.h> +#include "radeon_family.h" #include "radeon_mode.h" #include "radeon_reg.h"
drivers/gpu/drm/radeon/radeon_drv.c +2 -0
@@ -38,6 +38,8 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/vga_switcheroo.h> +#include <drm/drm_gem.h> +#include "drm_crtc_helper.h" /* * KMS wrapper.
drivers/gpu/drm/tegra/gem.h +1 -0
@@ -15,6 +15,7 @@#include <drm/drm.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> #define TEGRA_BO_BOTTOM_UP (1 << 0)
drivers/gpu/drm/udl/udl_drv.h +1 -0
@@ -15,6 +15,7 @@#define UDL_DRV_H #include <linux/usb.h> +#include <drm/drm_gem.h> #define DRIVER_NAME "udl"#define DRIVER_DESC "DisplayLink"
include/drm/drmP.h +1 -147
172 lines not on this page · raw message
include/drm/drm_gem.h new file +183 -0
183 lines not on this page · raw message
include/drm/drm_gem_cma_helper.h +1 -0
@@ -2,6 +2,7 @@#define __DRM_GEM_CMA_HELPER_H__#include <drm/drmP.h> +#include <drm/drm_gem.h> struct drm_gem_cma_object {struct drm_gem_object base;
Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/8] drm: Extract <drm/drm_gem.h>
Hi
Quoted 3 lines · Daniel Vetter
v2: Don't forget git add, noticed by David.
Cc David Herrmann <[email protected]>
Thanks
David
Quoted 649 lines
Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/armada/armada_gem.h | 2 + drivers/gpu/drm/ast/ast_drv.h | 2 + drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/cirrus/cirrus_drv.h | 2 + drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/drm_info.c | 2 + drivers/gpu/drm/drm_prime.c | 2 + drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 + drivers/gpu/drm/gma500/gtt.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_drv.h | 2 + drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/radeon/radeon.h | 2 + drivers/gpu/drm/radeon/radeon_drv.c | 2 + drivers/gpu/drm/tegra/gem.h | 1 + drivers/gpu/drm/udl/udl_drv.h | 1 + include/drm/drmP.h | 148 +------------------------- include/drm/drm_gem.h | 183 ++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 1 + 22 files changed, 216 insertions(+), 147 deletions(-) create mode 100644 include/drm/drm_gem.hdrivers/gpu/drm/armada/armada_gem.h +2
-0@@ -8,6 +8,8 @@ #ifndef ARMADA_GEM_H #define ARMADA_GEM_H +#include <drm/drm_gem.h> + /* GEM */ struct armada_gem_object { struct drm_gem_object obj;drivers/gpu/drm/ast/ast_drv.h +2
-0@@ -36,6 +36,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#include <linux/i2c.h> #include <linux/i2c-algo-bit.h> drivers/gpu/drm/bochs/bochs.h +2
-0@@ -7,6 +7,8 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_gem.h> +#include <ttm/ttm_bo_driver.h> #include <ttm/ttm_page_alloc.h> drivers/gpu/drm/cirrus/cirrus_drv.h +2
-0@@ -21,6 +21,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#define DRIVER_AUTHOR "Matthew Garrett"#define DRIVER_NAME "cirrus"drivers/gpu/drm/drm_gem.c +1
-0@@ -38,6 +38,7 @@#include <linux/dma-buf.h> #include <drm/drmP.h> #include <drm/drm_vma_manager.h> +#include <drm/drm_gem.h> #include "drm_internal.h" /** @file drm_gem.c drivers/gpu/drm/drm_info.c +2
-0@@ -35,6 +35,8 @@#include <linux/seq_file.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> +#include "drm_legacy.h" /** drivers/gpu/drm/drm_prime.c +2
-0@@ -29,6 +29,8 @@#include <linux/export.h> #include <linux/dma-buf.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> +#include "drm_internal.h" /* drivers/gpu/drm/exynos/exynos_drm_gem.h +2
-0@@ -12,6 +12,8 @@#ifndef _EXYNOS_DRM_GEM_H_#define _EXYNOS_DRM_GEM_H_ +#include <drm/drm_gem.h> +#define to_exynos_gem_obj (x) container_of(x,\ struct exynos_drm_gem_obj, base)drivers/gpu/drm/gma500/gtt.h +1
-0@@ -21,6 +21,7 @@#define _PSB_GTT_H_#include <drm/drmP.h> +#include <drm/drm_gem.h> /* This wants cleaning up with respect to the psb_dev and un-needed stuff */ struct psb_gtt {drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -43,6 +43,7 @@#include <linux/i2c-algo-bit.h> #include <drm/intel-gtt.h> #include <drm/drm_legacy.h> /* for struct drm_dma_handle */ +#include <drm/drm_gem.h> #include <linux/backlight.h> #include <linux/hashtable.h> #include <linux/intel-iommu.h> drivers/gpu/drm/mgag200/mgag200_drv.h +2
-0@@ -22,6 +22,8 @@#include <drm/ttm/ttm_memory.h> #include <drm/ttm/ttm_module.h> +#include <drm/drm_gem.h> +#include <linux/i2c.h> #include <linux/i2c-algo-bit.h> drivers/gpu/drm/msm/msm_drv.h +1
-0@@ -51,6 +51,7 @@ static inline struct device *msm_iommu_get_ctx(const char *ctx_name)#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> #include <drm/msm_drm.h> +#include <drm/drm_gem.h> struct msm_kms ;struct msm_gpu ;drivers/gpu/drm/nouveau/nouveau_bo.h +2
-0@@ -1,6 +1,8 @@#ifndef __NOUVEAU_BO_H__#define __NOUVEAU_BO_H__ +#include <drm/drm_gem.h> +struct nouveau_channel ;struct nouveau_fence ;struct nouveau_vma ;drivers/gpu/drm/omapdrm/omap_drv.h +1
-0@@ -26,6 +26,7 @@#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include <drm/omap_drm.h> +#include <drm/drm_gem.h> #include <linux/platform_data/omap_drm.h> drivers/gpu/drm/qxl/qxl_drv.h +2
-0@@ -43,6 +43,8 @@#include <ttm/ttm_placement.h> #include <ttm/ttm_module.h> +#include <drm/drm_gem.h> +/* just for ttm_validate_buffer */ #include <ttm/ttm_execbuf_util.h> drivers/gpu/drm/radeon/radeon.h +2
-0@@ -74,6 +74,8 @@#include <ttm/ttm_module.h> #include <ttm/ttm_execbuf_util.h> +#include <drm/drm_gem.h> +#include "radeon_family.h" #include "radeon_mode.h" #include "radeon_reg.h" drivers/gpu/drm/radeon/radeon_drv.c +2
-0@@ -38,6 +38,8 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/vga_switcheroo.h> +#include <drm/drm_gem.h> +#include "drm_crtc_helper.h" /* * KMS wrapper. drivers/gpu/drm/tegra/gem.h +1
-0@@ -15,6 +15,7 @@#include <drm/drm.h> #include <drm/drmP.h> +#include <drm/drm_gem.h> #define TEGRA_BO_BOTTOM_UP (1 << 0)drivers/gpu/drm/udl/udl_drv.h +1
-0@@ -15,6 +15,7 @@#define UDL_DRV_H #include <linux/usb.h> +#include <drm/drm_gem.h> #define DRIVER_NAME "udl"#define DRIVER_DESC "DisplayLink"include/drm/drmP.h +1
-147@@ -82,6 +82,7 @@ struct drm_agp_head;struct drm_local_map ;struct drm_device_dma ;struct drm_dma_handle ; +struct drm_gem_object ;struct device_node ;struct videomode ;@@ -331,93 +332,6 @@ struct drm_lock_data { };/** -* This structure defines the drm_mm memory object, which will be used by the -* DRM for its buffer objects. -*/ -struct drm_gem_object { -/** Reference count of this object */ -struct kref refcount; - -/** -* handle_count - gem file_priv handle count of this object -* -* Each handle also holds a reference. Note that when the handle_count -* drops to 0 any global names (e.g. the id in the flink namespace) will -* be cleared. -* -* Protected by dev->object_name_lock. -* */ -unsigned handle_count; - -/** Related drm device */ -struct drm_device *dev; - -/** File representing the shmem storage */ -struct file *filp; - -/* Mapping info for this object */ -struct drm_vma_offset_node vma_node; - -/** -* Size of the object, in bytes. Immutable over the object's -* lifetime. -*/ -size_t size; - -/** -* Global name for this object, starts at 1. 0 means unnamed. -* Access is covered by the object_name_lock in the related drm_device -*/ -int name; - -/** -* Memory domains. These monitor which caches contain read/write data -* related to the object. When transitioning from one set of domains -* to another, the driver is called to ensure that caches are suitably -* flushed and invalidated -*/ -uint32_t read_domains; -uint32_t write_domain; - -/** -* While validating an exec operation, the -* new read/write domain values are computed here. -* They will be transferred to the above values -* at the point that any cache flushing occurs -*/ -uint32_t pending_read_domains; -uint32_t pending_write_domain; - -/** -* dma_buf - dma buf associated with this GEM object -* -* Pointer to the dma-buf associated with this gem object (either -* through importing or exporting). We break the resulting reference -* loop when the last gem handle for this object is released. -* -* Protected by obj->object_name_lock -*/ -struct dma_buf *dma_buf; - -/** -* import_attach - dma buf attachment backing this object -* -* Any foreign dma_buf imported as a gem object has this set to the -* attachment point for the device. This is invariant over the lifetime -* of a gem object. -* -* The driver's ->gem_free_object callback is responsible for cleaning -* up the dma_buf attachment and references acquired at import time. -* -* Note that the drm gem/prime core does not depend upon drivers setting -* this field any more. So for drivers where this doesn't make sense -* (e.g. virtual devices or a displaylink behind an usb bus) they can -* simply leave it as NULL. -*/ -struct dma_buf_attachment *import_attach; -}; - -/** * struct drm_master - drm master structure * * @refcount: Refcount for this master object. @@ -1073,10 +987,6 @@ extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **extern struct sg_table *drm_prime_pages_to_sg (struct page **pages,int nr_pages);extern void drm_prime_gem_destroy (struct drm_gem_object *obj,struct sg_table *sg); -int drm_gem_dumb_destroy (struct drm_file *file, -struct drm_device *dev, -uint32_t handle); -extern struct drm_dma_handle *drm_pci_alloc (struct drm_device *dev,size_t size,size_t align);@@ -1085,62 +995,6 @@ extern void drm_pci_free(struct drm_device *dev, struct drm_dma_handle * dmah);/* sysfs support (drm_sysfs.c) */ extern void drm_sysfs_hotplug_event (struct drm_device *dev); -/* Graphics Execution Manager library functions (drm_gem.c) */ -void drm_gem_object_release (struct drm_gem_object *obj); -void drm_gem_object_free (struct kref *kref); -int drm_gem_object_init (struct drm_device *dev, -struct drm_gem_object *obj,size_t size); -void drm_gem_private_object_init (struct drm_device *dev, -struct drm_gem_object *obj,size_t size); -void drm_gem_vm_open (struct vm_area_struct *vma); -void drm_gem_vm_close (struct vm_area_struct *vma); -int drm_gem_mmap_obj (struct drm_gem_object *obj,unsigned long obj_size, -struct vm_area_struct *vma); -int drm_gem_mmap (struct file *filp,struct vm_area_struct *vma); - -static inline void -drm_gem_object_reference (struct drm_gem_object *obj) -{ -kref_get (&obj->refcount); -} - -static inline void -drm_gem_object_unreference (struct drm_gem_object *obj) -{ -if (obj !=NULL ) -kref_put (&obj->refcount, drm_gem_object_free); -} - -static inline void -drm_gem_object_unreference_unlocked (struct drm_gem_object *obj) -{ -if (obj && !atomic_add_unless (&obj->refcount.refcount,-1 ,1 )) { -struct drm_device *dev = obj->dev; - -mutex_lock (&dev->struct_mutex); -if (likely (atomic_dec_and_test (&obj->refcount.refcount))) -drm_gem_object_free (&obj->refcount); -mutex_unlock (&dev->struct_mutex); - } -} - -int drm_gem_handle_create (struct drm_file *file_priv, -struct drm_gem_object *obj, -u32 *handlep); -int drm_gem_handle_delete (struct drm_file *filp,u32 handle); - - -void drm_gem_free_mmap_offset (struct drm_gem_object *obj); -int drm_gem_create_mmap_offset (struct drm_gem_object *obj); -int drm_gem_create_mmap_offset_size (struct drm_gem_object *obj,size_t size); - -struct page **drm_gem_get_pages (struct drm_gem_object *obj); -void drm_gem_put_pages (struct drm_gem_object *obj,struct page **pages, -bool dirty,bool accessed); - -struct drm_gem_object *drm_gem_object_lookup (struct drm_device *dev, -struct drm_file *filp, -u32 handle);struct drm_device *drm_dev_alloc (struct drm_driver *driver,struct device *parent);include/drm/drm_gem.h new file +183
-0@@ -0,0 +1,183 @@ +#ifndef __DRM_GEM_H__ +#define __DRM_GEM_H__ + +/* +* GEM Graphics Execution Manager Driver Interfaces +* +* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. +* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. +* Copyright (c) 2009-2010, Code Aurora Forum. +* All rights reserved. +* Copyright © 2014 Intel Corporation +* Daniel Vetter <[email protected]> +* +* Author: Rickard E. (Rik) Faith <[email protected]> +* Author: Gareth Hughes <[email protected]> +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** +* This structure defines the drm_mm memory object, which will be used by the +* DRM for its buffer objects. +*/ +struct drm_gem_object { +/** Reference count of this object */ +struct kref refcount; + +/** +* handle_count - gem file_priv handle count of this object +* +* Each handle also holds a reference. Note that when the handle_count +* drops to 0 any global names (e.g. the id in the flink namespace) will +* be cleared. +* +* Protected by dev->object_name_lock. +* */ +unsigned handle_count; + +/** Related drm device */ +struct drm_device *dev; + +/** File representing the shmem storage */ +struct file *filp; + +/* Mapping info for this object */ +struct drm_vma_offset_node vma_node; + +/** +* Size of the object, in bytes. Immutable over the object's +* lifetime. +*/ +size_t size; + +/** +* Global name for this object, starts at 1. 0 means unnamed. +* Access is covered by the object_name_lock in the related drm_device +*/ +int name; + +/** +* Memory domains. These monitor which caches contain read/write data +* related to the object. When transitioning from one set of domains +* to another, the driver is called to ensure that caches are suitably +* flushed and invalidated +*/ +uint32_t read_domains; +uint32_t write_domain; + +/** +* While validating an exec operation, the +* new read/write domain values are computed here. +* They will be transferred to the above values +* at the point that any cache flushing occurs +*/ +uint32_t pending_read_domains; +uint32_t pending_write_domain; + +/** +* dma_buf - dma buf associated with this GEM object +* +* Pointer to the dma-buf associated with this gem object (either +* through importing or exporting). We break the resulting reference +* loop when the last gem handle for this object is released. +* +* Protected by obj->object_name_lock +*/ +struct dma_buf *dma_buf; + +/** +* import_attach - dma buf attachment backing this object +* +* Any foreign dma_buf imported as a gem object has this set to the +* attachment point for the device. This is invariant over the lifetime +* of a gem object. +* +* The driver's ->gem_free_object callback is responsible for cleaning +* up the dma_buf attachment and references acquired at import time. +* +* Note that the drm gem/prime core does not depend upon drivers setting +* this field any more. So for drivers where this doesn't make sense +* (e.g. virtual devices or a displaylink behind an usb bus) they can +* simply leave it as NULL. +*/ +struct dma_buf_attachment *import_attach; +}; + +void drm_gem_object_release (struct drm_gem_object *obj); +void drm_gem_object_free (struct kref *kref); +int drm_gem_object_init (struct drm_device *dev, +struct drm_gem_object *obj,size_t size); +void drm_gem_private_object_init (struct drm_device *dev, +struct drm_gem_object *obj,size_t size); +void drm_gem_vm_open (struct vm_area_struct *vma); +void drm_gem_vm_close (struct vm_area_struct *vma); +int drm_gem_mmap_obj (struct drm_gem_object *obj,unsigned long obj_size, +struct vm_area_struct *vma); +int drm_gem_mmap (struct file *filp,struct vm_area_struct *vma); + +static inline void +drm_gem_object_reference (struct drm_gem_object *obj) +{ +kref_get (&obj->refcount); +} + +static inline void +drm_gem_object_unreference (struct drm_gem_object *obj) +{ +if (obj !=NULL ) +kref_put (&obj->refcount, drm_gem_object_free); +} + +static inline void +drm_gem_object_unreference_unlocked (struct drm_gem_object *obj) +{ +if (obj && !atomic_add_unless (&obj->refcount.refcount,-1 ,1 )) { +struct drm_device *dev = obj->dev; + +mutex_lock (&dev->struct_mutex); +if (likely (atomic_dec_and_test (&obj->refcount.refcount))) +drm_gem_object_free (&obj->refcount); +mutex_unlock (&dev->struct_mutex); + } +} + +int drm_gem_handle_create (struct drm_file *file_priv, +struct drm_gem_object *obj, +u32 *handlep); +int drm_gem_handle_delete (struct drm_file *filp,u32 handle); + + +void drm_gem_free_mmap_offset (struct drm_gem_object *obj); +int drm_gem_create_mmap_offset (struct drm_gem_object *obj); +int drm_gem_create_mmap_offset_size (struct drm_gem_object *obj,size_t size); + +struct page **drm_gem_get_pages (struct drm_gem_object *obj); +void drm_gem_put_pages (struct drm_gem_object *obj,struct page **pages, +bool dirty,bool accessed); + +struct drm_gem_object *drm_gem_object_lookup (struct drm_device *dev, +struct drm_file *filp, +u32 handle); +int drm_gem_dumb_destroy (struct drm_file *file, +struct drm_device *dev, +uint32_t handle); + +#endif /* __DRM_GEM_H__ */ include/drm/drm_gem_cma_helper.h +1
-1@@ -2,6 +2,7 @@#define __DRM_GEM_CMA_HELPER_H__#include <drm/drmP.h> +#include <drm/drm_gem.h> struct drm_gem_cma_object {struct drm_gem_object base; --
Quoted 2 lines
2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 8/8 drm/doc: Fixup drm_irq kerneldoc includes.
In reply to Daniel VetterOnly !P can be used together with a function list.
--- Documentation/DocBook/drm.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/DocBook/drm.tmpl +1 -1
@@ -3406,7 +3406,7 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis> <sect2> <title>Vertical Blanking and Interrupt Handling Functions Reference</title> !Edrivers/gpu/drm/drm_irq.c -!Iinclude/drm/drmP.h drm_crtc_vblank_waitqueue +!Finclude/drm/drmP.h drm_crtc_vblank_waitqueue </sect2> </sect1>
Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 8/8] drm/doc: Fixup drm_irq kerneldoc includes.
Hi
Quoted 1 line · Daniel Vetter
Only !P can be used together with a function list.
You say !P, but you use !F?
Thanks
David
Quoted 22 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- Documentation/DocBook/drm.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/DocBook/drm.tmpl +1
-2@@ -3406,7 +3406,7 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis> <sect2> <title>Vertical Blanking and Interrupt Handling Functions Reference</title> !Edrivers/gpu/drm/drm_irq.c -!Iinclude/drm/drmP.h drm_crtc_vblank_waitqueue +!Finclude/drm/drmP.h drm_crtc_vblank_waitqueue </sect2> </sect1> --2.1.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 8/8] drm/doc: Fixup drm_irq kerneldoc includes.
Quoted 6 lines · David Herrmann
Hi
Quoted 1 line · Daniel Vetter
Only !P can be used together with a function list.
You say !P, but you use !F?
Oops yeah this should read !F. !P is for including DOC: sections, dunno why I've fumbled this.
-Daniel
Quoted 30 lines
Thanks
DavidQuoted 26 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- Documentation/DocBook/drm.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/DocBook/drm.tmpl +1
-2@@ -3406,7 +3406,7 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis> <sect2> <title>Vertical Blanking and Interrupt Handling Functions Reference</title> !Edrivers/gpu/drm/drm_irq.c -!Iinclude/drm/drmP.h drm_crtc_vblank_waitqueue +!Finclude/drm/drmP.h drm_crtc_vblank_waitqueue </sect2> </sect1> --2.1.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Hi
Quoted 5 lines · Daniel Vetter
So the main part here is the extraction of
drm_gem.h. With a bit of prep work to ditch the legacy mmap stuff out of gem/ttm drivers. Plus a few random pieces of leftover cleanup that I've missed in my earlier header rework or just stumbled over while working on this.
Quoted 8 lines
With this
drmP.hreally starts to look rather sane (it's just 1kloc now), besides maybe the uppercase P in it's name and the massive list of headers it includes.As usual comments and review highly welcome. I'll probably try to still throw this at Dave for 3.18 and see whether he rejects it or not. Otherwise no harm to postpone this until 3.19 (but David Herrrmann said he's got more work on his todo in this area, so merging earlier might avoid conflicts).
Assuming you ran 0day bots on the gem-header move, these look all fine. I commented on them all.
Thanks!
David
Quoted 62 lines
Cheers, Daniel
Daniel Vetter (8):
drm/<ttm-based-drivers>: Don't calldrm_mmapdrm/gem: Don't calldrm_mmapfromdrm_gem_mmap
drm: movedrm_mmapto <drm/drm_legacy.h>
drm: Movedrm_vm_open_lockedintodrm_internal.h
drm: Move leftover ioctl declarations todrm_internal.h
drm: Move internal debugfs functions todrm_internal.h
drm: Extract <drm/drm_gem.h>
drm/doc: Fixupdrm_irqkerneldoc includes.Documentation/DocBook/drm.tmpl | 2 +- drivers/gpu/drm/armada/armada_gem.h | 2 + drivers/gpu/drm/ast/ast_drv.h | 2 + drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_drv.h | 2 + drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/drm_gem.c | 3 +- drivers/gpu/drm/drm_info.c | 2 + drivers/gpu/drm/drm_internal.h | 39 ++++++- drivers/gpu/drm/drm_prime.c | 2 + drivers/gpu/drm/drm_vm.c | 7 +- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 + drivers/gpu/drm/gma500/gtt.h | 1 + drivers/gpu/drm/i810/i810_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/mga/mga_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 2 + drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/r128/r128_drv.c | 2 +- drivers/gpu/drm/radeon/radeon.h | 2 + drivers/gpu/drm/radeon/radeon_drv.c | 4 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- drivers/gpu/drm/savage/savage_drv.c | 2 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 3 +- drivers/gpu/drm/tegra/gem.h | 1 + drivers/gpu/drm/udl/udl_drv.h | 1 + drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 182 +------------------------------ include/drm/drm_gem.h | 183 ++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 1 + include/drm/drm_legacy.h | 1 + 40 files changed, 276 insertions(+), 203 deletions(-) create mode 100644 include/drm/drm_gem.h--
2.1.0_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 16 lines · Daniel Vetter
So the main part here is the extraction of
drm_gem.h. With a bit of prep work to ditch the legacy mmap stuff out of gem/ttm drivers. Plus a few random pieces of leftover cleanup that I've missed in my earlier header rework or just stumbled over while working on this.With this
drmP.hreally starts to look rather sane (it's just 1kloc now), besides maybe the uppercase P in it's name and the massive list of headers it includes.As usual comments and review highly welcome. I'll probably try to still throw this at Dave for 3.18 and see whether he rejects it or not. Otherwise no harm to postpone this until 3.19 (but David Herrrmann said he's got more work on his todo in this area, so merging earlier might avoid conflicts).
Cheers, Daniel
Quoted 10 lines
Daniel Vetter (8):
drm/<ttm-based-drivers>: Don't calldrm_mmapdrm/gem: Don't calldrm_mmapfromdrm_gem_mmap
drm: movedrm_mmapto <drm/drm_legacy.h>
drm: Movedrm_vm_open_lockedintodrm_internal.h
drm: Move leftover ioctl declarations todrm_internal.h
drm: Move internal debugfs functions todrm_internal.h
drm: Extract <drm/drm_gem.h>
drm/doc: Fixupdrm_irqkerneldoc includes.
Series is:
Quoted 50 lines
Documentation/DocBook/drm.tmpl | 2 +- drivers/gpu/drm/armada/armada_gem.h | 2 + drivers/gpu/drm/ast/ast_drv.h | 2 + drivers/gpu/drm/ast/ast_ttm.c | 2 +- drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/bochs/bochs_mm.c | 2 +- drivers/gpu/drm/cirrus/cirrus_drv.h | 2 + drivers/gpu/drm/cirrus/cirrus_ttm.c | 2 +- drivers/gpu/drm/drm_gem.c | 3 +- drivers/gpu/drm/drm_info.c | 2 + drivers/gpu/drm/drm_internal.h | 39 ++++++- drivers/gpu/drm/drm_prime.c | 2 + drivers/gpu/drm/drm_vm.c | 7 +- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 + drivers/gpu/drm/gma500/gtt.h | 1 + drivers/gpu/drm/i810/i810_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/mga/mga_drv.c | 2 +- drivers/gpu/drm/mgag200/mgag200_drv.h | 2 + drivers/gpu/drm/mgag200/mgag200_ttm.c | 2 +- drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_bo.h | 2 + drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.h | 1 + drivers/gpu/drm/qxl/qxl_drv.h | 2 + drivers/gpu/drm/qxl/qxl_ttm.c | 2 +- drivers/gpu/drm/r128/r128_drv.c | 2 +- drivers/gpu/drm/radeon/radeon.h | 2 + drivers/gpu/drm/radeon/radeon_drv.c | 4 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- drivers/gpu/drm/savage/savage_drv.c | 2 +- drivers/gpu/drm/sis/sis_drv.c | 2 +- drivers/gpu/drm/tdfx/tdfx_drv.c | 3 +- drivers/gpu/drm/tegra/gem.h | 1 + drivers/gpu/drm/udl/udl_drv.h | 1 + drivers/gpu/drm/via/via_drv.c | 2 +- include/drm/drmP.h | 182 +------------------------------ include/drm/drm_gem.h | 183 ++++++++++++++++++++++++++++++++ include/drm/drm_gem_cma_helper.h | 1 + include/drm/drm_legacy.h | 1 + 40 files changed, 276 insertions(+), 203 deletions(-) create mode 100644 include/drm/drm_gem.h--
2.1.0_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel