drm/vmwgfx: drop use of drmP.h
Subsystems (3)
cover drm/vmwgfx: drop use of drmP.h
In two steps drop the use of drmP.h
First patch remove drmP.h from header files and fixes fallout. Second patch remove drmP.h from the remaining files.
While touching the list of include files divide them in blocks and sort include files within the blocks.
Patches made on top of drm-misc-next, and checked that they apply to vmwgfx-fixes-5.2 ingit://people.freedesktop.org/~thomash/linux
Build tested with various configs with several architectures.
Sam
Sam Ravnborg (2):
drm/vmwgfx: drop use of drmP.h in header files drm/vmwgfx: drop reminaing users of drmP.h
drivers/gpu/drm/vmwgfx/ttm_lock.h | 2 +- drivers/gpu/drm/vmwgfx/ttm_object.h | 7 ++++--- drivers/gpu/drm/vmwgfx/vmwgfx_binding.h | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 3 +++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 17 +++++++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 30 +++++++++++++++++++++--------- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 5 ++++- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 6 ++++-- drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 +++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 ++++-- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 11 +++++------ drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 ++++-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 9 ++++++--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 3 ++- 23 files changed, 93 insertions(+), 58 deletions(-)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/2 drm/vmwgfx: drop use of drmP.h in header files
To facilitate removal of drmP.h in the .c
files remove the use from header files first.
Fix fallout in the other files.
Sorted include files in blocks and sorted files
within each block in alphabetical order.
This revealed a dependency from an uapi header to a header located below drivers/gpu/drm/vmwgfx/.
Added FIXME to remind someone to fix this.
--- drivers/gpu/drm/vmwgfx/ttm_lock.h | 2 +- drivers/gpu/drm/vmwgfx/ttm_object.h | 7 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_binding.h | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 3 +++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 30 +++++++++++++++------- drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 5 +++- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 +++++--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 +++-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 9 ++++--- drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 3 ++- 12 files changed, 59 insertions(+), 27 deletions(-)
drivers/gpu/drm/vmwgfx/ttm_lock.h +1 -1
@@ -49,8 +49,8 @@#ifndef _TTM_LOCK_H_#define _TTM_LOCK_H_ -#include <linux/wait.h> #include <linux/atomic.h> +#include <linux/wait.h> #include "ttm_object.h"
drivers/gpu/drm/vmwgfx/ttm_object.h +4 -3
@@ -37,11 +37,12 @@#ifndef _TTM_OBJECT_H_#define _TTM_OBJECT_H_ -#include <linux/list.h> -#include <drm/drm_hashtab.h> +#include <linux/dma-buf.h> #include <linux/kref.h> +#include <linux/list.h> #include <linux/rcupdate.h> -#include <linux/dma-buf.h> + +#include <drm/drm_hashtab.h> #include <drm/ttm/ttm_memory.h> /**
drivers/gpu/drm/vmwgfx/vmwgfx_binding.h +2 -1
@@ -27,9 +27,10 @@#ifndef _VMWGFX_BINDING_H_#define _VMWGFX_BINDING_H_ -#include "device_include/svga3d_reg.h" #include <linux/list.h> +#include "device_include/svga3d_reg.h" +#define VMW_MAX_VIEW_BINDINGS 128struct vmw_private ;
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +3 -0
@@ -25,6 +25,9 @@* **************************************************************************/ +#include <linux/dmapool.h> +#include <linux/pci.h> +#include <drm/ttm/ttm_bo_api.h> #include "vmwgfx_drv.h"
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +21 -9
@@ -28,20 +28,32 @@#ifndef _VMWGFX_DRV_H_#define _VMWGFX_DRV_H_ -#include "vmwgfx_validation.h" -#include "vmwgfx_reg.h" -#include <drm/drmP.h> -#include <drm/vmwgfx_drm.h> -#include <drm/drm_hashtab.h> -#include <drm/drm_auth.h> #include <linux/suspend.h> +#include <linux/sync_file.h> + +#include <drm/drm_auth.h> +#include <drm/drm_device.h> +#include <drm/drm_file.h> +#include <drm/drm_hashtab.h> +#include <drm/drm_rect.h> +#include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_execbuf_util.h> #include <drm/ttm/ttm_module.h> -#include "vmwgfx_fence.h" -#include "ttm_object.h" +#include "ttm_lock.h" -#include <linux/sync_file.h> +#include "ttm_object.h" + +#include "vmwgfx_fence.h" +#include "vmwgfx_reg.h" +#include "vmwgfx_validation.h" + +/* +* FIXME: vmwgfx_drm.h needs to be last due to dependencies. +* uapi headers should not depend on header files outside uapi/. +*/ +#include <drm/vmwgfx_drm.h> +#define VMWGFX_DRIVER_NAME "vmwgfx"#define VMWGFX_DRIVER_DATE "20180704"
drivers/gpu/drm/vmwgfx/vmwgfx_fence.h +4 -1
@@ -32,8 +32,11 @@#define VMW_FENCE_WAIT_TIMEOUT (5*HZ) -struct vmw_private ; +struct drm_device ; +struct drm_file ; +struct drm_pending_event ; +struct vmw_private ;struct vmw_fence_manager ;/**
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +7 -3
@@ -25,12 +25,16 @@* **************************************************************************/ -#include "vmwgfx_kms.h" -#include <drm/drm_plane_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_rect.h> #include <drm/drm_damage_helper.h> +#include <drm/drm_fourcc.h> +#include <drm/drm_plane_helper.h> +#include <drm/drm_rect.h> +#include <drm/drm_sysfs.h> +#include <drm/drm_vblank.h> + +#include "vmwgfx_kms.h" /* Might need a hrtimer here? */ #define VMWGFX_PRESENT_RATE ((HZ / 60 > 0) ? HZ / 60 : 1)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +1 -1
@@ -28,9 +28,9 @@#ifndef VMWGFX_KMS_H_ #define VMWGFX_KMS_H_ -#include <drm/drmP.h> #include <drm/drm_encoder.h> #include <drm/drm_probe_helper.h> +#include "vmwgfx_drv.h" /**
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +4 -2
@@ -25,11 +25,13 @@* **************************************************************************/ -#include "vmwgfx_kms.h" -#include <drm/drm_plane_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_fourcc.h> +#include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> +#include "vmwgfx_kms.h" #define vmw_crtc_to_ldu (x) \ container_of(x, struct vmw_legacy_display_unit, base.crtc)
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +4 -2
@@ -25,12 +25,14 @@* **************************************************************************/ -#include "vmwgfx_kms.h" -#include <drm/drm_plane_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> +#include <drm/drm_fourcc.h> +#include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> +#include "vmwgfx_kms.h" #define vmw_crtc_to_sou (x) \ container_of(x, struct vmw_screen_object_unit, base.crtc)
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +6 -3
@@ -25,12 +25,15 @@* ******************************************************************************/ -#include "vmwgfx_kms.h" -#include "device_include/svga3d_surfacedefs.h" -#include <drm/drm_plane_helper.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> +#include <drm/drm_fourcc.h> +#include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> + +#include "vmwgfx_kms.h" +#include "device_include/svga3d_surfacedefs.h" #define vmw_crtc_to_stdu (x) \ container_of(x, struct vmw_screen_target_display_unit, base.crtc)
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h +2 -1
@@ -28,9 +28,10 @@#ifndef _VMWGFX_VALIDATION_H_#define _VMWGFX_VALIDATION_H_ -#include <drm/drm_hashtab.h> #include <linux/list.h> #include <linux/ww_mutex.h> + +#include <drm/drm_hashtab.h> #include <drm/ttm/ttm_execbuf_util.h> #define VMW_RES_DIRTY_NONE 0
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
kbuild test robot
build botRe: [PATCH v1 1/2] drm/vmwgfx: drop use of drmP.h in header files
Thank you for the patch! Yet something to improve:
Hi Sam,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.2-rc5 next-20190621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drm-vmwgfx-drop-use-of-drmP-h-in-header-files/20190622-234524
config: i386-randconfig-x010-201924 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce:
# save the attached .config to linux build tree
make ARCH=i386 If you fix the issue, kindly add following tag
All error/warnings (new ones prefixed by >>):
drivers/gpu//drm/vmwgfx/vmwgfx_mob.c: In function 'vmw_mob_build_pt':
>> drivers/gpu//drm/vmwgfx/vmwgfx_mob.c:517:22: error: implicit declaration of function 'kmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]
save_addr = addr = kmap_atomic(page);
^~~~~~~~~~~
in_atomic
>> drivers/gpu//drm/vmwgfx/vmwgfx_mob.c:517:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
save_addr = addr = kmap_atomic(page);
^
>> drivers/gpu//drm/vmwgfx/vmwgfx_mob.c:526:3: error: implicit declaration of function 'kunmap_atomic'; did you mean 'in_atomic'? [-Werror=implicit-function-declaration]
kunmap_atomic(save_addr);
^~~~~~~~~~~~~
in_atomiccc1: some warnings being treated as errors
vim +517 drivers/gpu//drm/vmwgfx/vmwgfx_mob.c
3530bdc3 Thomas Hellstrom 2012-11-21 491
3530bdc3 Thomas Hellstrom 2012-11-21 492 /*
3530bdc3 Thomas Hellstrom 2012-11-21 493 * vmw_mob_build_pt - Build a pagetable
3530bdc3 Thomas Hellstrom 2012-11-21 494 *
0fd53cfb Thomas Hellstrom 2013-10-24 495 * @data_addr: Array of DMA addresses to the underlying buffer
3530bdc3 Thomas Hellstrom 2012-11-21 496 * object's data pages.
3530bdc3 Thomas Hellstrom 2012-11-21 497 * @num_data_pages: Number of buffer object data pages.
3530bdc3 Thomas Hellstrom 2012-11-21 498 * @pt_pages: Array of page pointers to the page table pages.
3530bdc3 Thomas Hellstrom 2012-11-21 499 *
3530bdc3 Thomas Hellstrom 2012-11-21 500 * Returns the number of page table pages actually used.
3530bdc3 Thomas Hellstrom 2012-11-21 501 * Uses atomic kmaps of highmem pages to avoid TLB thrashing.
3530bdc3 Thomas Hellstrom 2012-11-21 502 */
0fd53cfb Thomas Hellstrom 2013-10-24 503 static unsigned long vmw_mob_build_pt(struct vmw_piter *data_iter,
3530bdc3 Thomas Hellstrom 2012-11-21 504 unsigned long num_data_pages,
0fd53cfb Thomas Hellstrom 2013-10-24 505 struct vmw_piter *pt_iter)
3530bdc3 Thomas Hellstrom 2012-11-21 506 {
3530bdc3 Thomas Hellstrom 2012-11-21 507 unsigned long pt_size = num_data_pages * VMW_PPN_SIZE;
3530bdc3 Thomas Hellstrom 2012-11-21 508 unsigned long num_pt_pages = DIV_ROUND_UP(pt_size, PAGE_SIZE);
0fd53cfb Thomas Hellstrom 2013-10-24 509 unsigned long pt_page;
b9eb1a61 Thomas Hellstrom 2015-04-02 510 u32 *addr, *save_addr;
3530bdc3 Thomas Hellstrom 2012-11-21 511 unsigned long i;
0fd53cfb Thomas Hellstrom 2013-10-24 512 struct page *page;
3530bdc3 Thomas Hellstrom 2012-11-21 513
3530bdc3 Thomas Hellstrom 2012-11-21 514 for (pt_page = 0; pt_page < num_pt_pages; ++pt_page) {
0fd53cfb Thomas Hellstrom 2013-10-24 515 page = vmw_piter_page(pt_iter);
0fd53cfb Thomas Hellstrom 2013-10-24 516
0fd53cfb Thomas Hellstrom 2013-10-24 @517 save_addr = addr = kmap_atomic(page);
3530bdc3 Thomas Hellstrom 2012-11-21 518
3530bdc3 Thomas Hellstrom 2012-11-21 519 for (i = 0; i < PAGE_SIZE / VMW_PPN_SIZE; ++i) {
f2a0dcb1 Thomas Hellstrom 2014-01-15 520 vmw_mob_assign_ppn(&addr,
f2a0dcb1 Thomas Hellstrom 2014-01-15 521 vmw_piter_dma_addr(data_iter));
0fd53cfb Thomas Hellstrom 2013-10-24 522 if (unlikely(--num_data_pages == 0))
3530bdc3 Thomas Hellstrom 2012-11-21 523 break;
0fd53cfb Thomas Hellstrom 2013-10-24 524 WARN_ON(!vmw_piter_next(data_iter));
3530bdc3 Thomas Hellstrom 2012-11-21 525 }
3530bdc3 Thomas Hellstrom 2012-11-21 @526 kunmap_atomic(save_addr);
0fd53cfb Thomas Hellstrom 2013-10-24 527 vmw_piter_next(pt_iter);
3530bdc3 Thomas Hellstrom 2012-11-21 528 }
3530bdc3 Thomas Hellstrom 2012-11-21 529
3530bdc3 Thomas Hellstrom 2012-11-21 530 return num_pt_pages;
3530bdc3 Thomas Hellstrom 2012-11-21 531 }
3530bdc3 Thomas Hellstrom 2012-11-21 532 :::::: The code at line 517 was first introduced by commit
:::::: 0fd53cfb09108c33b924b069fe2c62fa4e7b11a0 drm/vmwgfx: Use the linux DMA api also for MOBs
:::::: TO: Thomas Hellstrom <[email protected]> :::::: CC: Thomas Hellstrom <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
kbuild test robot
build botRe: [PATCH v1 1/2] drm/vmwgfx: drop use of drmP.h in header files
In reply to Sam RavnborgThank you for the patch! Yet something to improve:
Hi Sam,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.2-rc6 next-20190621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drm-vmwgfx-drop-use-of-drmP-h-in-header-files/20190622-234524
config: x86_64-randconfig-u0-06250015 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010 reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c: In function 'vmw_mob_build_pt':
>> drivers/gpu/drm/vmwgfx/vmwgfx_mob.c:517:22: error: implicit declaration of function 'kmap_atomic' [-Werror=implicit-function-declaration]
save_addr = addr = kmap_atomic(page);
^
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c:517:20: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
save_addr = addr = kmap_atomic(page);
^
>> drivers/gpu/drm/vmwgfx/vmwgfx_mob.c:526:3: error: implicit declaration of function 'kunmap_atomic' [-Werror=implicit-function-declaration]
kunmap_atomic(save_addr);
^cc1: some warnings being treated as errors
vim +/kmap_atomic +517 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
3530bdc3 Thomas Hellstrom 2012-11-21 491
3530bdc3 Thomas Hellstrom 2012-11-21 492 /*
3530bdc3 Thomas Hellstrom 2012-11-21 493 * vmw_mob_build_pt - Build a pagetable
3530bdc3 Thomas Hellstrom 2012-11-21 494 *
0fd53cfb Thomas Hellstrom 2013-10-24 495 * @data_addr: Array of DMA addresses to the underlying buffer
3530bdc3 Thomas Hellstrom 2012-11-21 496 * object's data pages.
3530bdc3 Thomas Hellstrom 2012-11-21 497 * @num_data_pages: Number of buffer object data pages.
3530bdc3 Thomas Hellstrom 2012-11-21 498 * @pt_pages: Array of page pointers to the page table pages.
3530bdc3 Thomas Hellstrom 2012-11-21 499 *
3530bdc3 Thomas Hellstrom 2012-11-21 500 * Returns the number of page table pages actually used.
3530bdc3 Thomas Hellstrom 2012-11-21 501 * Uses atomic kmaps of highmem pages to avoid TLB thrashing.
3530bdc3 Thomas Hellstrom 2012-11-21 502 */
0fd53cfb Thomas Hellstrom 2013-10-24 503 static unsigned long vmw_mob_build_pt(struct vmw_piter *data_iter,
3530bdc3 Thomas Hellstrom 2012-11-21 504 unsigned long num_data_pages,
0fd53cfb Thomas Hellstrom 2013-10-24 505 struct vmw_piter *pt_iter)
3530bdc3 Thomas Hellstrom 2012-11-21 506 {
3530bdc3 Thomas Hellstrom 2012-11-21 507 unsigned long pt_size = num_data_pages * VMW_PPN_SIZE;
3530bdc3 Thomas Hellstrom 2012-11-21 508 unsigned long num_pt_pages = DIV_ROUND_UP(pt_size, PAGE_SIZE);
0fd53cfb Thomas Hellstrom 2013-10-24 509 unsigned long pt_page;
b9eb1a61 Thomas Hellstrom 2015-04-02 510 u32 *addr, *save_addr;
3530bdc3 Thomas Hellstrom 2012-11-21 511 unsigned long i;
0fd53cfb Thomas Hellstrom 2013-10-24 512 struct page *page;
3530bdc3 Thomas Hellstrom 2012-11-21 513
3530bdc3 Thomas Hellstrom 2012-11-21 514 for (pt_page = 0; pt_page < num_pt_pages; ++pt_page) {
0fd53cfb Thomas Hellstrom 2013-10-24 515 page = vmw_piter_page(pt_iter);
0fd53cfb Thomas Hellstrom 2013-10-24 516
0fd53cfb Thomas Hellstrom 2013-10-24 @517 save_addr = addr = kmap_atomic(page);
3530bdc3 Thomas Hellstrom 2012-11-21 518
3530bdc3 Thomas Hellstrom 2012-11-21 519 for (i = 0; i < PAGE_SIZE / VMW_PPN_SIZE; ++i) {
f2a0dcb1 Thomas Hellstrom 2014-01-15 520 vmw_mob_assign_ppn(&addr,
f2a0dcb1 Thomas Hellstrom 2014-01-15 521 vmw_piter_dma_addr(data_iter));
0fd53cfb Thomas Hellstrom 2013-10-24 522 if (unlikely(--num_data_pages == 0))
3530bdc3 Thomas Hellstrom 2012-11-21 523 break;
0fd53cfb Thomas Hellstrom 2013-10-24 524 WARN_ON(!vmw_piter_next(data_iter));
3530bdc3 Thomas Hellstrom 2012-11-21 525 }
3530bdc3 Thomas Hellstrom 2012-11-21 @526 kunmap_atomic(save_addr);
0fd53cfb Thomas Hellstrom 2013-10-24 527 vmw_piter_next(pt_iter);
3530bdc3 Thomas Hellstrom 2012-11-21 528 }
3530bdc3 Thomas Hellstrom 2012-11-21 529
3530bdc3 Thomas Hellstrom 2012-11-21 530 return num_pt_pages;
3530bdc3 Thomas Hellstrom 2012-11-21 531 }
3530bdc3 Thomas Hellstrom 2012-11-21 532 :::::: The code at line 517 was first introduced by commit
:::::: 0fd53cfb09108c33b924b069fe2c62fa4e7b11a0 drm/vmwgfx: Use the linux DMA api also for MOBs
:::::: TO: Thomas Hellstrom <[email protected]> :::::: CC: Thomas Hellstrom <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/vmwgfx: drop reminaing users of drmP.h
In reply to Sam RavnborgDrop use of the deprecated drmP.h file from the remaining files.
In several cases the drmP.h include could be removed without furter fixes. Other files required a few header files to be added.
In all files divided includes files in blcoks and sort them.
--- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 1 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 17 +++++++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 8 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 6 ++++-- drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 3 ++- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 11 +++++------ drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 ++---- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 5 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 1 - 11 files changed, 34 insertions(+), 31 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +0 -1
@@ -28,7 +28,6 @@#include <drm/ttm/ttm_placement.h> -#include <drm/drmP.h> #include "vmwgfx_drv.h" #include "ttm_object.h"
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +11 -6
@@ -24,17 +24,22 @@* USE OR OTHER DEALINGS IN THE SOFTWARE. * **************************************************************************/ -#include <linux/module.h> +#include <linux/console.h> #include <linux/dma-mapping.h> +#include <linux/module.h> -#include <drm/drmP.h> -#include "vmwgfx_drv.h" -#include "vmwgfx_binding.h" -#include "ttm_object.h" -#include <drm/ttm/ttm_placement.h> +#include <drm/drm_drv.h> +#include <drm/drm_ioctl.h> +#include <drm/drm_pci.h> +#include <drm/drm_sysfs.h> #include <drm/ttm/ttm_bo_driver.h> #include <drm/ttm/ttm_module.h> +#include <drm/ttm/ttm_placement.h> + +#include "ttm_object.h" +#include "vmwgfx_binding.h" +#include "vmwgfx_drv.h" #define VMWGFX_DRIVER_DESC "Linux drm driver for VMware graphics devices"#define VMWGFX_CHIP_SVGAII 0
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +4 -4
@@ -26,14 +26,14 @@* **************************************************************************/ -#include <linux/export.h> +#include <linux/pci.h> + +#include <drm/drm_fourcc.h> +#include <drm/ttm/ttm_placement.h> -#include <drm/drmP.h> #include "vmwgfx_drv.h" #include "vmwgfx_kms.h" -#include <drm/ttm/ttm_placement.h> -#define VMW_DIRTY_DELAY (HZ / 30)struct vmw_fb_par {
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +2 -1
@@ -25,7 +25,8 @@* **************************************************************************/ -#include <drm/drmP.h> +#include <linux/sched/signal.h> +#include "vmwgfx_drv.h" #define VMW_FENCE_WRAP (1 << 31)
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +4 -2
@@ -25,10 +25,12 @@* **************************************************************************/ -#include "vmwgfx_drv.h" -#include <drm/drmP.h> +#include <linux/sched/signal.h> +#include <drm/ttm/ttm_placement.h> +#include "vmwgfx_drv.h" +struct vmw_temp_set_context {SVGA3dCmdHeader header;SVGA3dCmdDXTempSetContext body;
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c +2 -2
@@ -25,10 +25,10 @@* **************************************************************************/ -#include "vmwgfx_drv.h" -#include <drm/drmP.h> #include <drm/ttm/ttm_bo_driver.h> +#include "vmwgfx_drv.h" +#define VMW_PPN_SIZE (sizeof(unsigned long))/* A future safe maximum remap size. */ #define VMW_PPN_PER_REMAP ((31 * 1024) / VMW_PPN_SIZE)
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c +2 -1
@@ -25,7 +25,8 @@* **************************************************************************/ -#include <drm/drmP.h> +#include <linux/sched/signal.h> +#include "vmwgfx_drv.h" #define VMW_FENCE_WRAP (1 << 24)
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +5 -6
@@ -24,17 +24,16 @@* */ - -#include <linux/slab.h> -#include <linux/module.h> -#include <linux/kernel.h> #include <linux/frame.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <asm/hypervisor.h> -#include <drm/drmP.h> +#include "vmwgfx_drv.h" #include "vmwgfx_msg.h" -#define MESSAGE_STATUS_SUCCESS 0x0001#define MESSAGE_STATUS_DORECV 0x0002#define MESSAGE_STATUS_CPT 0x0010
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +2 -4
@@ -25,15 +25,13 @@* **************************************************************************/ - -#include <drm/drmP.h> -#include "vmwgfx_drv.h" -#include <drm/ttm/ttm_placement.h> #include "device_include/svga_overlay.h" #include "device_include/svga_escape.h" +#include "vmwgfx_drv.h" +#define VMW_MAX_NUM_STREAMS 1#define VMW_OVERLAY_CAP_MASK (SVGA_FIFO_CAP_VIDEO | SVGA_FIFO_CAP_ESCAPE)
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c +2 -3
@@ -25,12 +25,11 @@* **************************************************************************/ -#include "vmwgfx_drv.h" -#include <drm/vmwgfx_drm.h> #include <drm/ttm/ttm_placement.h> -#include <drm/drmP.h> +#include "vmwgfx_resource_priv.h" #include "vmwgfx_binding.h" +#include "vmwgfx_drv.h" #define VMW_RES_EVICT_ERR_COUNT 10
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +0 -1
@@ -25,7 +25,6 @@* **************************************************************************/ -#include <drm/drmP.h> #include "vmwgfx_drv.h" int vmw_mmap (struct file *filp,struct vm_area_struct *vma)
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel