Commit 66620f48 authored by Sam Ravnborg's avatar Sam Ravnborg

drm/meson: drop use of drmP.h

Drop use of the deprecated drmP.h header.
While doing so used the opportunity
to clean up a little so includes are now
sorted and removed unused include files.
In a few cases added some forwards to allow header
files to built in different include order.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Acked-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Maxime Jourdan <mjourdan@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190716064220.18157-2-sam@ravnborg.org
parent 30fe7b07
...@@ -9,23 +9,21 @@ ...@@ -9,23 +9,21 @@
* Jasper St. Pierre <jstpierre@mecheye.net> * Jasper St. Pierre <jstpierre@mecheye.net>
*/ */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <drm/drmP.h> #include <linux/soc/amlogic/meson-canvas.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_flip_work.h> #include <drm/drm_device.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "meson_crtc.h" #include "meson_crtc.h"
#include "meson_plane.h" #include "meson_plane.h"
#include "meson_registers.h"
#include "meson_venc.h" #include "meson_venc.h"
#include "meson_vpp.h"
#include "meson_viu.h" #include "meson_viu.h"
#include "meson_registers.h" #include "meson_vpp.h"
#define MESON_G12A_VIU_OFFSET 0x5ec0 #define MESON_G12A_VIU_OFFSET 0x5ec0
......
...@@ -8,35 +8,30 @@ ...@@ -8,35 +8,30 @@
* Jasper St. Pierre <jstpierre@mecheye.net> * Jasper St. Pierre <jstpierre@mecheye.net>
*/ */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/component.h> #include <linux/component.h>
#include <linux/module.h>
#include <linux/of_graph.h> #include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/soc/amlogic/meson-canvas.h>
#include <drm/drmP.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_fb_cma_helper.h> #include <drm/drm_drv.h>
#include <drm/drm_fb_helper.h> #include <drm/drm_fb_helper.h>
#include <drm/drm_flip_work.h>
#include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_cma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_irq.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h> #include <drm/drm_vblank.h>
#include "meson_crtc.h"
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_plane.h"
#include "meson_overlay.h" #include "meson_overlay.h"
#include "meson_crtc.h" #include "meson_plane.h"
#include "meson_registers.h"
#include "meson_venc_cvbs.h" #include "meson_venc_cvbs.h"
#include "meson_vpp.h"
#include "meson_viu.h" #include "meson_viu.h"
#include "meson_venc.h" #include "meson_vpp.h"
#include "meson_registers.h"
#define DRIVER_NAME "meson" #define DRIVER_NAME "meson"
#define DRIVER_DESC "Amlogic Meson DRM driver" #define DRIVER_DESC "Amlogic Meson DRM driver"
......
...@@ -7,11 +7,14 @@ ...@@ -7,11 +7,14 @@
#ifndef __MESON_DRV_H #ifndef __MESON_DRV_H
#define __MESON_DRV_H #define __MESON_DRV_H
#include <linux/platform_device.h> #include <linux/device.h>
#include <linux/regmap.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/soc/amlogic/meson-canvas.h> #include <linux/regmap.h>
#include <drm/drmP.h>
struct drm_crtc;
struct drm_device;
struct drm_plane;
struct meson_drm;
struct meson_drm { struct meson_drm {
struct device *dev; struct device *dev;
......
...@@ -5,29 +5,30 @@ ...@@ -5,29 +5,30 @@
* Copyright (C) 2015 Amlogic, Inc. All rights reserved. * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*/ */
#include <linux/clk.h>
#include <linux/component.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/component.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_graph.h> #include <linux/of_graph.h>
#include <linux/reset.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <drm/drmP.h> #include <drm/bridge/dw_hdmi.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h> #include <drm/drm_edid.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/bridge/dw_hdmi.h> #include <drm/drm_print.h>
#include <uapi/linux/media-bus-format.h> #include <linux/media-bus-format.h>
#include <uapi/linux/videodev2.h> #include <linux/videodev2.h>
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_venc.h"
#include "meson_vclk.h"
#include "meson_dw_hdmi.h" #include "meson_dw_hdmi.h"
#include "meson_registers.h" #include "meson_registers.h"
#include "meson_vclk.h"
#include "meson_venc.h"
#define DRIVER_NAME "meson-dw-hdmi" #define DRIVER_NAME "meson-dw-hdmi"
#define DRIVER_DESC "Amlogic Meson HDMI-TX DRM driver" #define DRIVER_DESC "Amlogic Meson HDMI-TX DRM driver"
......
...@@ -5,24 +5,21 @@ ...@@ -5,24 +5,21 @@
* Copyright (C) 2015 Amlogic, Inc. All rights reserved. * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*/ */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <linux/platform_device.h>
#include <drm/drmP.h>
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_device.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_cma_helper.h>
#include <drm/drm_fb_cma_helper.h> #include <drm/drm_fb_cma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_rect.h>
#include "meson_overlay.h" #include "meson_overlay.h"
#include "meson_vpp.h"
#include "meson_viu.h"
#include "meson_registers.h" #include "meson_registers.h"
#include "meson_viu.h"
#include "meson_vpp.h"
/* VD1_IF0_GEN_REG */ /* VD1_IF0_GEN_REG */
#define VD_URGENT_CHROMA BIT(28) #define VD_URGENT_CHROMA BIT(28)
......
...@@ -9,24 +9,20 @@ ...@@ -9,24 +9,20 @@
* Jasper St. Pierre <jstpierre@mecheye.net> * Jasper St. Pierre <jstpierre@mecheye.net>
*/ */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <linux/platform_device.h>
#include <drm/drmP.h>
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_device.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_fb_cma_helper.h> #include <drm/drm_fb_cma_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_rect.h> #include <drm/drm_plane_helper.h>
#include "meson_plane.h" #include "meson_plane.h"
#include "meson_vpp.h"
#include "meson_viu.h"
#include "meson_registers.h" #include "meson_registers.h"
#include "meson_viu.h"
/* OSD_SCI_WH_M1 */ /* OSD_SCI_WH_M1 */
#define SCI_WH_M1_W(w) FIELD_PREP(GENMASK(28, 16), w) #define SCI_WH_M1_W(w) FIELD_PREP(GENMASK(28, 16), w)
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#ifndef __MESON_REGISTERS_H #ifndef __MESON_REGISTERS_H
#define __MESON_REGISTERS_H #define __MESON_REGISTERS_H
#include <linux/io.h>
/* Shift all registers by 2 */ /* Shift all registers by 2 */
#define _REG(reg) ((reg) << 2) #define _REG(reg) ((reg) << 2)
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
* Copyright (C) 2015 Amlogic, Inc. All rights reserved. * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*/ */
#include <linux/kernel.h> #include <linux/export.h>
#include <linux/module.h>
#include <drm/drmP.h> #include <drm/drm_print.h>
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_vclk.h" #include "meson_vclk.h"
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
#ifndef __MESON_VCLK_H #ifndef __MESON_VCLK_H
#define __MESON_VCLK_H #define __MESON_VCLK_H
#include <drm/drm_modes.h>
struct meson_drm;
enum { enum {
MESON_VCLK_TARGET_CVBS = 0, MESON_VCLK_TARGET_CVBS = 0,
MESON_VCLK_TARGET_HDMI = 1, MESON_VCLK_TARGET_HDMI = 1,
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
* Copyright (C) 2015 Amlogic, Inc. All rights reserved. * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*/ */
#include <linux/kernel.h> #include <linux/export.h>
#include <linux/module.h>
#include <drm/drmP.h> #include <drm/drm_modes.h>
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_registers.h"
#include "meson_venc.h" #include "meson_venc.h"
#include "meson_vpp.h" #include "meson_vpp.h"
#include "meson_vclk.h"
#include "meson_registers.h"
/** /**
* DOC: Video Encoder * DOC: Video Encoder
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#ifndef __MESON_VENC_H #ifndef __MESON_VENC_H
#define __MESON_VENC_H #define __MESON_VENC_H
struct drm_display_mode;
enum { enum {
MESON_VENC_MODE_NONE = 0, MESON_VENC_MODE_NONE = 0,
MESON_VENC_MODE_CVBS_PAL, MESON_VENC_MODE_CVBS_PAL,
......
...@@ -9,19 +9,18 @@ ...@@ -9,19 +9,18 @@
* Jasper St. Pierre <jstpierre@mecheye.net> * Jasper St. Pierre <jstpierre@mecheye.net>
*/ */
#include <linux/kernel.h> #include <linux/export.h>
#include <linux/module.h>
#include <linux/of_graph.h> #include <linux/of_graph.h>
#include <drm/drmP.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_device.h>
#include <drm/drm_edid.h> #include <drm/drm_edid.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_print.h>
#include "meson_venc_cvbs.h"
#include "meson_venc.h"
#include "meson_vclk.h"
#include "meson_registers.h" #include "meson_registers.h"
#include "meson_vclk.h"
#include "meson_venc_cvbs.h"
/* HHI VDAC Registers */ /* HHI VDAC Registers */
#define HHI_VDAC_CNTL0 0x2F4 /* 0xbd offset in data sheet */ #define HHI_VDAC_CNTL0 0x2F4 /* 0xbd offset in data sheet */
......
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
* Copyright (C) 2014 Endless Mobile * Copyright (C) 2014 Endless Mobile
*/ */
#include <linux/kernel.h> #include <linux/export.h>
#include <linux/module.h>
#include <drm/drmP.h>
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_viu.h" #include "meson_viu.h"
#include "meson_vpp.h"
#include "meson_venc.h"
#include "meson_registers.h" #include "meson_registers.h"
/** /**
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
* Copyright (C) 2014 Endless Mobile * Copyright (C) 2014 Endless Mobile
*/ */
#include <linux/kernel.h> #include <linux/export.h>
#include <linux/module.h>
#include <drm/drmP.h>
#include "meson_drv.h" #include "meson_drv.h"
#include "meson_vpp.h"
#include "meson_registers.h" #include "meson_registers.h"
#include "meson_vpp.h"
/** /**
* DOC: Video Post Processing * DOC: Video Post Processing
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
#ifndef __MESON_VPP_H #ifndef __MESON_VPP_H
#define __MESON_VPP_H #define __MESON_VPP_H
struct drm_rect;
struct meson_drm;
/* Mux VIU/VPP to ENCI */ /* Mux VIU/VPP to ENCI */
#define MESON_VIU_VPP_MUX_ENCI 0x5 #define MESON_VIU_VPP_MUX_ENCI 0x5
/* Mux VIU/VPP to ENCP */ /* Mux VIU/VPP to ENCP */
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#define MESON_CANVAS_ENDIAN_SWAP64 0x7 #define MESON_CANVAS_ENDIAN_SWAP64 0x7
#define MESON_CANVAS_ENDIAN_SWAP128 0xf #define MESON_CANVAS_ENDIAN_SWAP128 0xf
struct device;
struct meson_canvas; struct meson_canvas;
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment