drm/nouveau: drop use of drmP.h
Subsystems (3)
cover drm/nouveau: drop use of drmP.h
The following patchset remove use of the deprecated drmP.h header file in the nouveau driver(s).
As preparation a dependency on drm_os_linux.h is dropped. The list of include files are sorted and are in some cases divided up in blocks of linux/* drm/* etc.
The removal is divided up in a few patches that was the logical steps to remove the use of drmP.h.
Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more.
Patchset made on top of drm-misc-next.
Sam
Sam Ravnborg (4):
drm/nouveau: drop use of DRM_UDELAY drm/nouveau: drop drmP.h from nouveau_drv.h drm/nouveau: drop drmP.h from all header files drm/nouveau: drop use of drmp.h
drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 ++- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 - drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 ++ drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 - drivers/gpu/drm/nouveau/nouveau_crtc.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_display.h | 4 ++++ drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 ++++- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 -- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 -- drivers/gpu/drm/nouveau/nouveau_ioc32.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_prime.c | 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - 33 files changed, 31 insertions(+), 34 deletions(-)
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 1/4 drm/nouveau: drop use of DRM_UDELAY
The DRM_UDELAY is a simple wrapper for udealy() and to be consistent call udelay() direct like in may other places.
This avoids the need to pull in drm_os_linux.h when we later drop drmP.h uses in nouveau.
--- drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_dma.c +1 -1
@@ -118,7 +118,7 @@ nv50_dma_push_wait(struct nouveau_channel *chan, int count) }if ((++cnt &0xff ) ==0 ) { -DRM_UDELAY (1 ); +udelay (1 );if (cnt >100000 )return -EBUSY ; }
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/nouveau: drop drmP.h from nouveau_drv.h
In reply to Sam RavnborgDrop the deprecated drmP.h header from nouveau_drv.h. Fix fallout in other parts of the driver.
Build tested using allmodconfig and allyesconfig.
--- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 ++ drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_display.h | 4 ++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 5 ++++- 5 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/dispnv50/base507c.c +2 -0
@@ -25,7 +25,9 @@#include <nvif/event.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h> +#include "nouveau_bo.h" void
drivers/gpu/drm/nouveau/dispnv50/ovly507e.c +1 -0
@@ -23,6 +23,7 @@#include "atom.h" #include <drm/drm_atomic_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h> #include <nvif/cl507e.h>
drivers/gpu/drm/nouveau/dispnv50/wndw.c +2 -0
@@ -26,6 +26,8 @@#include <nvif/cl0002.h> #include <drm/drm_atomic_helper.h> +#include <drm/drm_fourcc.h> +#include "nouveau_bo.h" static void
drivers/gpu/drm/nouveau/nouveau_display.h +4 -0
@@ -1,9 +1,13 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NOUVEAU_DISPLAY_H__ #define __NOUVEAU_DISPLAY_H__ + #include "nouveau_drv.h" + #include <nvif/disp.h> +#include <drm/drm_framebuffer.h> + struct nouveau_framebuffer { struct drm_framebuffer base; struct nouveau_bo *nvbo;
drivers/gpu/drm/nouveau/nouveau_drv.h +4 -1
@@ -46,7 +46,10 @@#include <nvif/mmu.h> #include <nvif/vmm.h> -#include <drm/drmP.h> +#include <drm/drm_connector.h> +#include <drm/drm_device.h> +#include <drm/drm_drv.h> +#include <drm/drm_file.h> #include <drm/ttm/ttm_bo_api.h> #include <drm/ttm/ttm_bo_driver.h>
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 20190519140044.22142-1-sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org
PATCH 3/4 drm/nouveau: drop drmP.h from all header files
Drop include of the deprecated drmP.h from all nouveau heder files. This allows us to remove drmP.h from all .c files without any side-effects in a follow-up commit.
Build tested using allyeyconfig and allmodconfig
--- drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 - drivers/gpu/drm/nouveau/nouveau_crtc.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 -- 4 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/hw.h +0 -1
@@ -23,7 +23,6 @@#ifndef __NOUVEAU_HW_H__#define __NOUVEAU_HW_H__ -#include <drm/drmP.h> #include "disp.h" #include "nvreg.h"
drivers/gpu/drm/nouveau/nouveau_crtc.h +2 -0
@@ -27,6 +27,8 @@#ifndef __NOUVEAU_CRTC_H__#define __NOUVEAU_CRTC_H__ +#include <drm/drm_crtc.h> +#include <nvif/notify.h> struct nouveau_crtc {
drivers/gpu/drm/nouveau/nouveau_debugfs.h +1 -1
@@ -2,7 +2,7 @@#ifndef __NOUVEAU_DEBUGFS_H__#define __NOUVEAU_DEBUGFS_H__ -#include <drm/drmP.h> +#include <drm/drm_debugfs.h> #if defined(CONFIG_DEBUG_FS )
drivers/gpu/drm/nouveau/nouveau_gem.h +0 -2
@@ -2,8 +2,6 @@#ifndef __NOUVEAU_GEM_H__#define __NOUVEAU_GEM_H__ -#include <drm/drmP.h> -#include "nouveau_drv.h" #include "nouveau_bo.h"
Signature · 6 lines
2.20.1 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
PATCH 4/4 drm/nouveau: drop use of drmp.h
In reply to Sam RavnborgDrop use of the deprecated drmP.h file from drm/nouveau.
Build tested using allyesconfig and allmodconfig.
--- drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 ++- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 - drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 - drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_dp.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 -- drivers/gpu/drm/nouveau/nouveau_ioc32.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_prime.c | 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - 23 files changed, 14 insertions(+), 28 deletions(-)
drivers/gpu/drm/nouveau/dispnv04/arb.c +0 -2
@@ -21,8 +21,6 @@* SOFTWARE. */ -#include <drm/drmP.h> -#include "nouveau_drv.h" #include "nouveau_reg.h" #include "hw.h"
drivers/gpu/drm/nouveau/dispnv04/crtc.c +2 -1
@@ -24,9 +24,10 @@*/ #include <linux/pm_runtime.h> -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h> +#include <drm/drm_vblank.h> #include "nouveau_drv.h" #include "nouveau_reg.h"
drivers/gpu/drm/nouveau/dispnv04/cursor.c +0 -1
@@ -1,5 +1,4 @@// SPDX-License-Identifier: GPL-2.0 -#include <drm/drmP.h> #include <drm/drm_mode.h> #include "nouveau_drv.h" #include "nouveau_reg.h"
drivers/gpu/drm/nouveau/dispnv04/dac.c +0 -1
@@ -24,7 +24,6 @@* DEALINGS IN THE SOFTWARE. */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/dispnv04/dfp.c +1 -1
@@ -24,8 +24,8 @@* DEALINGS IN THE SOFTWARE. */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_fourcc.h> #include "nouveau_drv.h" #include "nouveau_reg.h"
drivers/gpu/drm/nouveau/dispnv04/disp.c +0 -1
@@ -22,7 +22,6 @@* Author: Ben Skeggs */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/dispnv04/hw.c +0 -1
@@ -22,7 +22,6 @@* SOFTWARE. */ -#include <drm/drmP.h> #include "nouveau_drv.h" #include "hw.h"
drivers/gpu/drm/nouveau/dispnv04/overlay.c +0 -1
@@ -23,7 +23,6 @@* written by Arthur Huillet. */ -#include <drm/drmP.h> #include <drm/drm_crtc.h> #include <drm/drm_fourcc.h>
drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c +0 -1
@@ -24,7 +24,6 @@* */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include "nouveau_drv.h" #include "nouveau_encoder.h"
drivers/gpu/drm/nouveau/dispnv04/tvnv04.c +0 -1
@@ -24,7 +24,6 @@* */ -#include <drm/drmP.h> #include "nouveau_drv.h" #include "nouveau_reg.h" #include "nouveau_encoder.h"
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +0 -1
@@ -24,7 +24,6 @@* */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_probe_helper.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/dispnv50/disp.c +2 -2
@@ -30,14 +30,14 @@#include <linux/dma-mapping.h> #include <linux/hdmi.h> -#include <drm/drmP.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_dp_helper.h> +#include <drm/drm_edid.h> #include <drm/drm_fb_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_scdc_helper.h> -#include <drm/drm_edid.h> +#include <drm/drm_vblank.h> #include <nvif/class.h> #include <nvif/cl0002.h>
drivers/gpu/drm/nouveau/nouveau_bios.c +0 -2
@@ -22,8 +22,6 @@* SOFTWARE. */ -#include <drm/drmP.h> -#include "nouveau_drv.h" #include "nouveau_reg.h" #include "dispnv04/hw.h"
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -1
@@ -29,7 +29,6 @@#include <linux/pm_runtime.h> #include <linux/vga_switcheroo.h> -#include <drm/drmP.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_edid.h> #include <drm/drm_crtc_helper.h>
drivers/gpu/drm/nouveau/nouveau_display.c +3 -1
@@ -25,12 +25,14 @@*/ #include <acpi/video.h> -#include <drm/drmP.h> +#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_vblank.h> #include "nouveau_fbcon.h" #include "nouveau_crtc.h"
drivers/gpu/drm/nouveau/nouveau_dp.c +0 -1
@@ -22,7 +22,6 @@* Authors: Ben Skeggs */ -#include <drm/drmP.h> #include <drm/drm_dp_helper.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/nouveau_drm.c +2 -1
@@ -29,8 +29,9 @@#include <linux/pm_runtime.h> #include <linux/vga_switcheroo.h> -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_ioctl.h> +#include <drm/drm_vblank.h> #include <core/gpuobj.h> #include <core/option.h>
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 -1
@@ -37,10 +37,10 @@#include <linux/vga_switcheroo.h> #include <linux/console.h> -#include <drm/drmP.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_fourcc.h> #include <drm/drm_atomic.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/nouveau_fence.c +1 -2
@@ -24,10 +24,9 @@* */ -#include <drm/drmP.h> -#include <linux/ktime.h> #include <linux/hrtimer.h> +#include <linux/sched/signal.h> #include <trace/events/dma_fence.h> #include <nvif/cl826e.h>
drivers/gpu/drm/nouveau/nouveau_hwmon.c +0 -2
@@ -29,8 +29,6 @@#include <linux/hwmon.h> #include <linux/hwmon-sysfs.h> -#include <drm/drmP.h> -#include "nouveau_drv.h" #include "nouveau_hwmon.h"
drivers/gpu/drm/nouveau/nouveau_ioc32.c +2 -1
@@ -33,7 +33,8 @@#include <linux/compat.h> -#include <drm/drmP.h> +#include <drm/drm.h> +#include <drm/drm_ioctl.h> #include "nouveau_ioctl.h"
drivers/gpu/drm/nouveau/nouveau_prime.c +0 -1
@@ -22,7 +22,6 @@* Authors: Dave Airlie */ -#include <drm/drmP.h> #include <linux/dma-buf.h> #include "nouveau_drv.h"
drivers/gpu/drm/nouveau/nouveau_vga.c +0 -1
@@ -2,7 +2,6 @@#include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_helper.h>
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Sam Ravnborg
The following patchset remove use of the deprecated
drmP.hheader file in the nouveau driver(s).
As preparation a dependency ondrm_os_linux.his dropped. The list of include files are sorted and are in some cases divided up in blocks of linux/* drm/* etc.
Quoted 6 lines
The removal is divided up in a few patches that was the logical steps to remove the use of
drmP.h.Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more.
Patchset made on top of drm-misc-next.
Thank you, I've merged all of these in my tree.
Ben.
Quoted 44 lines
Sam
Sam Ravnborg (4):
drm/nouveau: drop use ofDRM_UDELAYdrm/nouveau: dropdrmP.hfromnouveau_drv.hdrm/nouveau: dropdrmP.hfrom all header files drm/nouveau: drop use ofdrmp.hdrivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 ++- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 - drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 - drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 - drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 - drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 - drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 ++ drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 ++-- drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 1 + drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 ++ drivers/gpu/drm/nouveau/nouveau_bios.c | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 1 - drivers/gpu/drm/nouveau/nouveau_crtc.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 4 +++- drivers/gpu/drm/nouveau/nouveau_display.h | 4 ++++ drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 ++++- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 -- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 -- drivers/gpu/drm/nouveau/nouveau_ioc32.c | 3 ++- drivers/gpu/drm/nouveau/nouveau_prime.c | 1 - drivers/gpu/drm/nouveau/nouveau_vga.c | 1 - 33 files changed, 31 insertions(+), 34 deletions(-)
Quoted 4 lines
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel