Skip to content

Commit

Permalink
drm/via: drop use of drmP.h
Browse files Browse the repository at this point in the history
Drop use of the deprecated drmP.h header.
While touching the files divide include files in blocks
and sort the files alphabetically.

v2:
- Replace all uses of DRM_WAIT_ON() with VIA_WAIT_ON()
  and thus avoiding to pull in drm_os_linux.h

v3:
- DRM_WAIT_ON replacement moved to earlier patch (Emil)

Signed-off-by: Sam Ravnborg <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Cc: Kevin Brace <[email protected]>
Cc: Thomas Hellstrom <[email protected]>
Cc: "Gustavo A. R. Silva" <[email protected]>
Cc: Mike Marshall <[email protected]>
Cc: Ira Weiny <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Michel Dänzer <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
sravnborg committed Jul 25, 2019
1 parent 2299b52 commit 0005cbd
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 17 deletions.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/via/via_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@
* Thomas Hellstrom.
*/

#include <drm/drmP.h>
#include <linux/delay.h>
#include <linux/uaccess.h>

#include <drm/drm.h>
#include <drm/drm_agpsupport.h>
#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/via_drm.h>

#include "via_drv.h"
#include "via_3d_reg.h"

Expand Down
13 changes: 8 additions & 5 deletions drivers/gpu/drm/via/via_dmablit.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@
* the same DMA mappings?
*/

#include <drm/drmP.h>
#include <drm/via_drm.h>
#include "via_drv.h"
#include "via_dmablit.h"

#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>

#include <drm/drm_device.h>
#include <drm/drm_pci.h>
#include <drm/via_drm.h>

#include "via_dmablit.h"
#include "via_drv.h"

#define VIA_PGDN(x) (((unsigned long)(x)) & PAGE_MASK)
#define VIA_PGOFF(x) (((unsigned long)(x)) & ~PAGE_MASK)
Expand Down
7 changes: 5 additions & 2 deletions drivers/gpu/drm/via/via_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@

#include <linux/module.h>

#include <drm/drmP.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_pci.h>
#include <drm/drm_pciids.h>
#include <drm/via_drm.h>

#include "via_drv.h"

#include <drm/drm_pciids.h>

static int via_driver_open(struct drm_device *dev, struct drm_file *file)
{
Expand Down
4 changes: 3 additions & 1 deletion drivers/gpu/drm/via/via_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
* The refresh rate is also calculated for video playback sync purposes.
*/

#include <drm/drmP.h>
#include <drm/drm_device.h>
#include <drm/drm_vblank.h>
#include <drm/via_drm.h>

#include "via_drv.h"

#define VIA_REG_INTERRUPT 0x200
Expand Down
6 changes: 5 additions & 1 deletion drivers/gpu/drm/via/via_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <drm/drmP.h>

#include <drm/drm_device.h>
#include <drm/drm_pci.h>
#include <drm/drm_vblank.h>
#include <drm/via_drm.h>

#include "via_drv.h"

static int via_do_init_map(struct drm_device *dev, drm_via_init_t *init)
Expand Down
7 changes: 6 additions & 1 deletion drivers/gpu/drm/via/via_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
* Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
*/

#include <drm/drmP.h>
#include <linux/slab.h>

#include <drm/drm_device.h>
#include <drm/drm_file.h>
#include <drm/drm_irq.h>
#include <drm/via_drm.h>

#include "via_drv.h"

#define VIA_MM_ALIGN_SHIFT 4
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/via/via_verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
* be very slow.
*/

#include "via_3d_reg.h"
#include <drm/drmP.h>
#include <drm/via_drm.h>
#include <drm/drm_device.h>
#include <drm/drm_legacy.h>
#include "via_verifier.h"
#include <drm/via_drm.h>

#include "via_3d_reg.h"
#include "via_drv.h"
#include <linux/kernel.h>
#include "via_verifier.h"

typedef enum {
state_command,
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/via/via_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
* Video and XvMC related functions.
*/

#include <drm/drmP.h>
#include <drm/drm_device.h>
#include <drm/via_drm.h>

#include "via_drv.h"

void via_init_futex(drm_via_private_t *dev_priv)
Expand Down

0 comments on commit 0005cbd

Please sign in to comment.