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.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: VMware Graphics <linux-graphics-maintainer@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
Sam Ravnborg 2019-06-23 12:23:33 +02:00 committed by Thomas Hellstrom
parent 9c84aeba67
commit d5c1f0110d
12 changed files with 60 additions and 28 deletions

View file

@ -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"

View file

@ -37,11 +37,12 @@
#ifndef _TTM_OBJECT_H_
#define _TTM_OBJECT_H_
#include <linux/list.h>
#include <drm/drm_hashtab.h>
#include <linux/kref.h>
#include <linux/rcupdate.h>
#include <linux/dma-buf.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/rcupdate.h>
#include <drm/drm_hashtab.h>
#include <drm/ttm/ttm_memory.h>
/**

View file

@ -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 128
struct vmw_private;

View file

@ -25,6 +25,9 @@
*
**************************************************************************/
#include <linux/dmapool.h>
#include <linux/pci.h>
#include <drm/ttm/ttm_bo_api.h>
#include "vmwgfx_drv.h"

View file

@ -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"

View file

@ -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;
/**

View file

@ -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)

View file

@ -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"
/**

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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