FreeBSD/DragonFly patches for xf86-video-ati, xf86-input-mouse, and xf86-video-intel
Michel Dänzer
michel at daenzer.net
Wed Aug 12 02:44:14 PDT 2015
Some comments on the xf86-video-ati patch below. Please send
xf86-video-ati patches with a proper Git commit log, generated by git
format-patch, to the xorg-driver-ati at lists.x.org list.
On 27.07.2015 08:20, Thomas Klausner wrote:
> @@ -280,7 +286,7 @@ static void
> radeon_dirty_update(ScreenPtr screen)
> {
> RegionPtr region;
> - PixmapDirtyUpdatePtr ent;
> + PixmapDirtyUpdatePtr ent = NULL;
>
> if (xorg_list_is_empty(&screen->pixmap_dirty_list))
> return;
This hunk should be in a separate patch.
> @@ -589,7 +595,11 @@ static int radeon_get_drm_master_fd(Scrn
> #endif
> struct pci_device *dev = info->PciInfo;
> char *busid;
> +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
> + int fd, err;
> +#else
> int fd;
> +#endif
If "err" really needs to be added (see below), just add
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
int err;
#endif
> @@ -608,6 +618,17 @@ static int radeon_get_drm_master_fd(Scrn
> dev->domain, dev->bus, dev->dev, dev->func);
> #endif
>
> +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
> + err = kldload("radeonkms");
> + if (err == -1 && errno != EEXIST) {
> + xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
> + "[drm] Failed to load kernel module for %s: %s\n",
> + busid, strerror(errno));
> + free(busid);
> + return -1;
> + }
> +#endif
> +
> fd = drmOpen(NULL, busid);
> if (fd == -1)
> xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
Couldn't this either pass the kernel module name as the first parameter
to drmOpen(), or use xf86LoadKernelModule()?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list