From 264d4ffdf12137201d68b7dd07451b3ccdfffa8b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 28 Aug 2018 14:46:55 +0000 Subject: Add big, nasty abandonware tags to this code. This code works for some people, but hasn't been updated in a long time. Still allow people to use this code for the moment, but put a big, nasty obsolete message to inform and encourage people to move to the port. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 --- sys/dev/drm/drm.h | 11 +++++++++++ sys/dev/drm/drm_drv.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/dev/drm') diff --git a/sys/dev/drm/drm.h b/sys/dev/drm/drm.h index a2612049bb0d4..026907f2026d1 100644 --- a/sys/dev/drm/drm.h +++ b/sys/dev/drm/drm.h @@ -1145,4 +1145,15 @@ typedef struct drm_mm_init_arg drm_mm_init_arg_t; typedef enum drm_bo_type drm_bo_type_t; #endif +#define DRM_PORT "graphics/drm-legacy-kmod" + +#define DRM_OBSOLETE(dev) \ + do { \ + device_printf(dev, "=======================================================\n"); \ + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "=======================================================\n"); \ + gone_in_dev(dev, 13, "drm drivers"); \ + } while (0) + + #endif diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index 6874d45d03354..20d7d973aed1d 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -174,7 +174,8 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist) DRM_DEBUG("desc : %s\n", device_get_desc(kdev)); device_set_desc(kdev, id_entry->name); } - return 0; + DRM_OBSOLETE(kdev); + return BUS_PROBE_GENERIC; } return ENXIO; -- cgit v1.3