drm_bufs.c (296373) | drm_bufs.c (331987) |
---|---|
1/*- 2 * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. 3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 15 unchanged lines hidden (view full) --- 24 * 25 * Authors: 26 * Rickard E. (Rik) Faith <faith@valinux.com> 27 * Gareth Hughes <gareth@valinux.com> 28 * 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas. 3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 15 unchanged lines hidden (view full) --- 24 * 25 * Authors: 26 * Rickard E. (Rik) Faith <faith@valinux.com> 27 * Gareth Hughes <gareth@valinux.com> 28 * 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: releng/10.3/sys/dev/drm/drm_bufs.c 207067 2010-04-22 18:44:23Z rnoland $"); | 32__FBSDID("$FreeBSD: releng/10.3/sys/dev/drm/drm_bufs.c 331987 2018-04-04 05:43:03Z gordon $"); |
33 34/** @file drm_bufs.c 35 * Implementation of the ioctls for setup of DRM mappings and DMA buffers. 36 */ 37 38#include "dev/pci/pcireg.h" 39 40#include "dev/drm/drmP.h" --- 889 unchanged lines hidden (view full) --- 930 931 DRM_DEBUG("count = %d\n", count); 932 933 if (request->count >= count) { 934 for (i = 0, count = 0; i < DRM_MAX_ORDER + 1; i++) { 935 if (dma->bufs[i].buf_count) { 936 struct drm_buf_desc from; 937 | 33 34/** @file drm_bufs.c 35 * Implementation of the ioctls for setup of DRM mappings and DMA buffers. 36 */ 37 38#include "dev/pci/pcireg.h" 39 40#include "dev/drm/drmP.h" --- 889 unchanged lines hidden (view full) --- 930 931 DRM_DEBUG("count = %d\n", count); 932 933 if (request->count >= count) { 934 for (i = 0, count = 0; i < DRM_MAX_ORDER + 1; i++) { 935 if (dma->bufs[i].buf_count) { 936 struct drm_buf_desc from; 937 |
938 memset(&from, 0, sizeof(from)); |
|
938 from.count = dma->bufs[i].buf_count; 939 from.size = dma->bufs[i].buf_size; 940 from.low_mark = dma->bufs[i].freelist.low_mark; 941 from.high_mark = dma->bufs[i].freelist.high_mark; 942 943 if (DRM_COPY_TO_USER(&request->list[count], &from, 944 sizeof(struct drm_buf_desc)) != 0) { 945 retcode = EFAULT; --- 185 unchanged lines hidden --- | 939 from.count = dma->bufs[i].buf_count; 940 from.size = dma->bufs[i].buf_size; 941 from.low_mark = dma->bufs[i].freelist.low_mark; 942 from.high_mark = dma->bufs[i].freelist.high_mark; 943 944 if (DRM_COPY_TO_USER(&request->list[count], &from, 945 sizeof(struct drm_buf_desc)) != 0) { 946 retcode = EFAULT; --- 185 unchanged lines hidden --- |