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
This commit is contained in:
Warner Losh 2018-08-28 14:46:55 +00:00
parent c0386fa3af
commit 264d4ffdf1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338348
4 changed files with 29 additions and 2 deletions

View File

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

View File

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

View File

@ -126,7 +126,8 @@ drm_probe_helper(device_t kdev, const drm_pci_id_list_t *idlist)
device_get_nameunit(kdev), id_entry->name);
device_set_desc(kdev, id_entry->name);
}
return (0);
DRM_OBSOLETE(kdev);
return (-BUS_PROBE_GENERIC);
}
return (-ENXIO);

View File

@ -154,6 +154,20 @@ typedef void irqreturn_t;
*(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \
(vm_offset_t)(offset)) = htole64(val)
#ifdef __LP64__
#define DRM_PORT "graphics/drm-stable-kmod"
#else
#define DRM_PORT "graphics/drm-legacy-kmod"
#endif
#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, "drm2 drivers"); \
} while (0)
/* DRM_READMEMORYBARRIER() prevents reordering of reads.
* DRM_WRITEMEMORYBARRIER() prevents reordering of writes.
* DRM_MEMORYBARRIER() prevents reordering of reads and writes.