Message ID | 20190630061922.7254-3-sam@ravnborg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On 6/30/19 9:18 AM, Sam Ravnborg wrote: > The drmP.h header is deprecated. Drop all uses. > Added includes/forwards to the header files and > then fixed fallout in the .c files. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > Cc: xen-devel@lists.xenproject.org > --- > The list of cc: was too large to add all recipients to the cover letter. > Please find cover letter here: > https://lists.freedesktop.org/archives/dri-devel/2019-June/thread.html > Search for "drm: drop use of drmp.h in drm-misc" > > Sam > > drivers/gpu/drm/xen/xen_drm_front.c | 11 ++++++++--- > drivers/gpu/drm/xen/xen_drm_front.h | 12 +++++++++--- > drivers/gpu/drm/xen/xen_drm_front_cfg.c | 4 ++-- > drivers/gpu/drm/xen/xen_drm_front_conn.c | 1 + > drivers/gpu/drm/xen/xen_drm_front_conn.h | 7 +++---- > drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 4 ++-- > drivers/gpu/drm/xen/xen_drm_front_gem.c | 11 +++++------ > drivers/gpu/drm/xen/xen_drm_front_gem.h | 7 ++++++- > drivers/gpu/drm/xen/xen_drm_front_kms.c | 7 ++++--- > 9 files changed, 40 insertions(+), 24 deletions(-) > > diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c > index 051822ee5b36..ba1828acd8c9 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front.c > +++ b/drivers/gpu/drm/xen/xen_drm_front.c > @@ -8,13 +8,18 @@ > * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > */ > > -#include <drm/drmP.h> > +#include <linux/delay.h> > +#include <linux/dma-mapping.h> > +#include <linux/module.h> > +#include <linux/of_device.h> > + > #include <drm/drm_atomic_helper.h> > +#include <drm/drm_drv.h> > +#include <drm/drm_ioctl.h> > #include <drm/drm_probe_helper.h> > +#include <drm/drm_file.h> > #include <drm/drm_gem.h> > > -#include <linux/of_device.h> > - > #include <xen/platform_pci.h> > #include <xen/xen.h> > #include <xen/xenbus.h> > diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h > index 5693b4a4b02b..4486bd8b3be7 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front.h > +++ b/drivers/gpu/drm/xen/xen_drm_front.h > @@ -11,13 +11,19 @@ > #ifndef __XEN_DRM_FRONT_H_ > #define __XEN_DRM_FRONT_H_ > > -#include <drm/drmP.h> > -#include <drm/drm_simple_kms_helper.h> > - > #include <linux/scatterlist.h> > > +#include <drm/drm_connector.h> > +#include <drm/drm_simple_kms_helper.h> > +#include <drm/drm_simple_kms_helper.h> no need to include twice with that fixed: Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > + > #include "xen_drm_front_cfg.h" > > +struct drm_device; > +struct drm_framebuffer; > +struct drm_gem_object; > +struct drm_pending_vblank_event; > + > /** > * DOC: Driver modes of operation in terms of display buffers used > * > diff --git a/drivers/gpu/drm/xen/xen_drm_front_cfg.c b/drivers/gpu/drm/xen/xen_drm_front_cfg.c > index 5baf2b9de93c..ec53b9cc9e0e 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_cfg.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_cfg.c > @@ -8,10 +8,10 @@ > * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > */ > > -#include <drm/drmP.h> > - > #include <linux/device.h> > > +#include <drm/drm_print.h> > + > #include <xen/interface/io/displif.h> > #include <xen/xenbus.h> > > diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.c b/drivers/gpu/drm/xen/xen_drm_front_conn.c > index 9f5f31f77f1e..459702fa990e 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_conn.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_conn.c > @@ -9,6 +9,7 @@ > */ > > #include <drm/drm_atomic_helper.h> > +#include <drm/drm_drv.h> > #include <drm/drm_probe_helper.h> > > #include <video/videomode.h> > diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.h b/drivers/gpu/drm/xen/xen_drm_front_conn.h > index 39de7cf5adbe..3adacba9a23b 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_conn.h > +++ b/drivers/gpu/drm/xen/xen_drm_front_conn.h > @@ -11,11 +11,10 @@ > #ifndef __XEN_DRM_FRONT_CONN_H_ > #define __XEN_DRM_FRONT_CONN_H_ > > -#include <drm/drmP.h> > -#include <drm/drm_crtc.h> > -#include <drm/drm_encoder.h> > +#include <linux/types.h> > > -#include <linux/wait.h> > +struct drm_connector; > +struct xen_drm_front_drm_info; > > struct xen_drm_front_drm_info; > > diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c > index 945226a95e9b..e10d95dddb99 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c > @@ -8,11 +8,11 @@ > * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > */ > > -#include <drm/drmP.h> > - > #include <linux/errno.h> > #include <linux/irq.h> > > +#include <drm/drm_print.h> > + > #include <xen/xenbus.h> > #include <xen/events.h> > #include <xen/grant_table.h> > diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c b/drivers/gpu/drm/xen/xen_drm_front_gem.c > index a24548489dde..f0b85e094111 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_gem.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.c > @@ -8,20 +8,19 @@ > * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > */ > > -#include "xen_drm_front_gem.h" > +#include <linux/dma-buf.h> > +#include <linux/scatterlist.h> > +#include <linux/shmem_fs.h> > > -#include <drm/drmP.h> > #include <drm/drm_fb_helper.h> > #include <drm/drm_gem.h> > +#include <drm/drm_prime.h> > #include <drm/drm_probe_helper.h> > > -#include <linux/dma-buf.h> > -#include <linux/scatterlist.h> > -#include <linux/shmem_fs.h> > - > #include <xen/balloon.h> > > #include "xen_drm_front.h" > +#include "xen_drm_front_gem.h" > > struct xen_gem_object { > struct drm_gem_object base; > diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.h b/drivers/gpu/drm/xen/xen_drm_front_gem.h > index d5ab734fdafe..a39675fa31b2 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_gem.h > +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.h > @@ -11,7 +11,12 @@ > #ifndef __XEN_DRM_FRONT_GEM_H > #define __XEN_DRM_FRONT_GEM_H > > -#include <drm/drmP.h> > +struct dma_buf_attachment; > +struct drm_device; > +struct drm_gem_object; > +struct file; > +struct sg_table; > +struct vm_area_struct; > > struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev, > size_t size); > diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c > index c2955d375394..de990036199d 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c > @@ -8,17 +8,18 @@ > * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> > */ > > -#include "xen_drm_front_kms.h" > - > -#include <drm/drmP.h> > #include <drm/drm_atomic.h> > #include <drm/drm_atomic_helper.h> > +#include <drm/drm_drv.h> > +#include <drm/drm_fourcc.h> > #include <drm/drm_gem.h> > #include <drm/drm_gem_framebuffer_helper.h> > #include <drm/drm_probe_helper.h> > +#include <drm/drm_vblank.h> > > #include "xen_drm_front.h" > #include "xen_drm_front_conn.h" > +#include "xen_drm_front_kms.h" > > /* > * Timeout in ms to wait for frame done event from the backend:
Hi Oleksandr > > --- a/drivers/gpu/drm/xen/xen_drm_front.h > > +++ b/drivers/gpu/drm/xen/xen_drm_front.h > > @@ -11,13 +11,19 @@ > > #ifndef __XEN_DRM_FRONT_H_ > > #define __XEN_DRM_FRONT_H_ > > -#include <drm/drmP.h> > > -#include <drm/drm_simple_kms_helper.h> > > - > > #include <linux/scatterlist.h> > > +#include <drm/drm_connector.h> > > +#include <drm/drm_simple_kms_helper.h> > > +#include <drm/drm_simple_kms_helper.h> > no need to include twice > with that fixed: > Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Ups, thanks for spotting this. Will run the checkinclude script to check if there are more duplicates added by accident. Sam
On Mon, Jul 01, 2019 at 08:05:24AM +0200, Sam Ravnborg wrote: > Hi Oleksandr > > > > --- a/drivers/gpu/drm/xen/xen_drm_front.h > > > +++ b/drivers/gpu/drm/xen/xen_drm_front.h > > > @@ -11,13 +11,19 @@ > > > #ifndef __XEN_DRM_FRONT_H_ > > > #define __XEN_DRM_FRONT_H_ > > > -#include <drm/drmP.h> > > > -#include <drm/drm_simple_kms_helper.h> > > > - > > > #include <linux/scatterlist.h> > > > +#include <drm/drm_connector.h> > > > +#include <drm/drm_simple_kms_helper.h> > > > +#include <drm/drm_simple_kms_helper.h> > > no need to include twice > > with that fixed: > > Acked-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Applied, thanks. Sam
diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 051822ee5b36..ba1828acd8c9 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -8,13 +8,18 @@ * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> */ -#include <drm/drmP.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> +#include <linux/module.h> +#include <linux/of_device.h> + #include <drm/drm_atomic_helper.h> +#include <drm/drm_drv.h> +#include <drm/drm_ioctl.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_file.h> #include <drm/drm_gem.h> -#include <linux/of_device.h> - #include <xen/platform_pci.h> #include <xen/xen.h> #include <xen/xenbus.h> diff --git a/drivers/gpu/drm/xen/xen_drm_front.h b/drivers/gpu/drm/xen/xen_drm_front.h index 5693b4a4b02b..4486bd8b3be7 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.h +++ b/drivers/gpu/drm/xen/xen_drm_front.h @@ -11,13 +11,19 @@ #ifndef __XEN_DRM_FRONT_H_ #define __XEN_DRM_FRONT_H_ -#include <drm/drmP.h> -#include <drm/drm_simple_kms_helper.h> - #include <linux/scatterlist.h> +#include <drm/drm_connector.h> +#include <drm/drm_simple_kms_helper.h> +#include <drm/drm_simple_kms_helper.h> + #include "xen_drm_front_cfg.h" +struct drm_device; +struct drm_framebuffer; +struct drm_gem_object; +struct drm_pending_vblank_event; + /** * DOC: Driver modes of operation in terms of display buffers used * diff --git a/drivers/gpu/drm/xen/xen_drm_front_cfg.c b/drivers/gpu/drm/xen/xen_drm_front_cfg.c index 5baf2b9de93c..ec53b9cc9e0e 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_cfg.c +++ b/drivers/gpu/drm/xen/xen_drm_front_cfg.c @@ -8,10 +8,10 @@ * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> */ -#include <drm/drmP.h> - #include <linux/device.h> +#include <drm/drm_print.h> + #include <xen/interface/io/displif.h> #include <xen/xenbus.h> diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.c b/drivers/gpu/drm/xen/xen_drm_front_conn.c index 9f5f31f77f1e..459702fa990e 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_conn.c +++ b/drivers/gpu/drm/xen/xen_drm_front_conn.c @@ -9,6 +9,7 @@ */ #include <drm/drm_atomic_helper.h> +#include <drm/drm_drv.h> #include <drm/drm_probe_helper.h> #include <video/videomode.h> diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.h b/drivers/gpu/drm/xen/xen_drm_front_conn.h index 39de7cf5adbe..3adacba9a23b 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_conn.h +++ b/drivers/gpu/drm/xen/xen_drm_front_conn.h @@ -11,11 +11,10 @@ #ifndef __XEN_DRM_FRONT_CONN_H_ #define __XEN_DRM_FRONT_CONN_H_ -#include <drm/drmP.h> -#include <drm/drm_crtc.h> -#include <drm/drm_encoder.h> +#include <linux/types.h> -#include <linux/wait.h> +struct drm_connector; +struct xen_drm_front_drm_info; struct xen_drm_front_drm_info; diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c index 945226a95e9b..e10d95dddb99 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c +++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c @@ -8,11 +8,11 @@ * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> */ -#include <drm/drmP.h> - #include <linux/errno.h> #include <linux/irq.h> +#include <drm/drm_print.h> + #include <xen/xenbus.h> #include <xen/events.h> #include <xen/grant_table.h> diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c b/drivers/gpu/drm/xen/xen_drm_front_gem.c index a24548489dde..f0b85e094111 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_gem.c +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.c @@ -8,20 +8,19 @@ * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> */ -#include "xen_drm_front_gem.h" +#include <linux/dma-buf.h> +#include <linux/scatterlist.h> +#include <linux/shmem_fs.h> -#include <drm/drmP.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem.h> +#include <drm/drm_prime.h> #include <drm/drm_probe_helper.h> -#include <linux/dma-buf.h> -#include <linux/scatterlist.h> -#include <linux/shmem_fs.h> - #include <xen/balloon.h> #include "xen_drm_front.h" +#include "xen_drm_front_gem.h" struct xen_gem_object { struct drm_gem_object base; diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.h b/drivers/gpu/drm/xen/xen_drm_front_gem.h index d5ab734fdafe..a39675fa31b2 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_gem.h +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.h @@ -11,7 +11,12 @@ #ifndef __XEN_DRM_FRONT_GEM_H #define __XEN_DRM_FRONT_GEM_H -#include <drm/drmP.h> +struct dma_buf_attachment; +struct drm_device; +struct drm_gem_object; +struct file; +struct sg_table; +struct vm_area_struct; struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev, size_t size); diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c index c2955d375394..de990036199d 100644 --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c @@ -8,17 +8,18 @@ * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> */ -#include "xen_drm_front_kms.h" - -#include <drm/drmP.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_drv.h> +#include <drm/drm_fourcc.h> #include <drm/drm_gem.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_vblank.h> #include "xen_drm_front.h" #include "xen_drm_front_conn.h" +#include "xen_drm_front_kms.h" /* * Timeout in ms to wait for frame done event from the backend:
The drmP.h header is deprecated. Drop all uses. Added includes/forwards to the header files and then fixed fallout in the .c files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Cc: xen-devel@lists.xenproject.org --- The list of cc: was too large to add all recipients to the cover letter. Please find cover letter here: https://lists.freedesktop.org/archives/dri-devel/2019-June/thread.html Search for "drm: drop use of drmp.h in drm-misc" Sam drivers/gpu/drm/xen/xen_drm_front.c | 11 ++++++++--- drivers/gpu/drm/xen/xen_drm_front.h | 12 +++++++++--- drivers/gpu/drm/xen/xen_drm_front_cfg.c | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_conn.c | 1 + drivers/gpu/drm/xen/xen_drm_front_conn.h | 7 +++---- drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 4 ++-- drivers/gpu/drm/xen/xen_drm_front_gem.c | 11 +++++------ drivers/gpu/drm/xen/xen_drm_front_gem.h | 7 ++++++- drivers/gpu/drm/xen/xen_drm_front_kms.c | 7 ++++--- 9 files changed, 40 insertions(+), 24 deletions(-)