summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2015-03-19intel: Merge latest i915_drm.hNeil Roberts
The main incentive to do this is to get I915_PARAM_REVISION. v2: Rebase on top of some changes that were made to the header without copying the whole file from the kernel source. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Neil Roberts <neil@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-18intel: Export total subslice and EU countsJeff McGee
Update kernel interface with new I915_GETPARAM ioctl entries for subslice total and EU total. Add a wrapping function for each parameter. Userspace drivers need these values when constructing GPGPU commands. This kernel query method is intended to replace the PCI ID-based tables that userspace drivers currently maintain. The kernel driver can employ fuse register reads as needed to ensure the most accurate determination of GT config attributes. This first became important with Cherryview in which the config could differ between devices with the same PCI ID. The kernel detection of these values is device-specific. Userspace drivers should continue to maintain ID-based tables for older devices which return ENODEV when using this query. v2: remove unnecessary include of <stdbool.h> and increment the I915_GETPARAM indices to match updated kernel patch. For: VIZ-4636 Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-01-05Add new DRM_MODE_CONNECTOR and _ENCODER definesAdam Cheney
Update drm_mode.h defines from kernel upstream for connector and encoder types to expose DSI and other newly defined types. Signed-off-by: Adam Cheney <acheney@nvidia.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-27tegra: Add SET/GET_FLAGS IOCTLsThierry Reding
The DRM_TEGRA_GEM_SET_FLAGS IOCTL can be used to set the flags of a buffer object after it has been allocated or imported. Flags associated with a buffer object can be queried using the DRM_TEGRA_GEM_GET_FLAGS IOCTL. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Add GET/SET_TILING IOCTLsThierry Reding
Currently the tiling parameters of buffer objects can only be set at allocation time, and only a single tiled mode is supported. This new DRM_TEGRA_GEM_SET_TILING /* via_drv.c -- VIA unichrome driver -*- linux-c -*- * Created: Fri Aug 12 2005 by anholt@FreeBSD.org */ /*- * Copyright 2005 Eric Anholt * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * ERIC ANHOLT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Authors: * Eric Anholt <anholt@FreeBSD.org> * */ #include "drmP.h" #include "drm.h" #include "via_drm.h" #include "via_drv.h" #include "drm_pciids.h" /* drv_PCI_IDs comes from drm_pciids.h, generated from drm_pciids.txt. */ static drm_pci_id_list_t via_pciidlist[] = { viadrv_PCI_IDS }; static void via_configure(drm_device_t *dev) { dev->driver.buf_priv_size = 1; dev->driver.load = via_driver_load; dev->driver.unload = via_driver_unload; dev->driver.context_ctor = via_init_context; dev->driver.context_dtor = via_final_context; dev->driver.vblank_wait = via_driver_vblank_wait; dev->driver.irq_preinstall = via_driver_irq_preinstall; dev->driver.irq_postinstall = via_driver_irq_postinstall; dev->driver.irq_uninstall = via_driver_irq_uninstall; dev->driver.irq_handler = via_driver_irq_handler; dev->driver.dma_quiescent = via_driver_dma_quiescent; dev->driver.ioctls = via_ioctls; dev->driver.max_ioctl = via_max_ioctl; dev->driver.name = DRIVER_NAME; dev->driver.desc = DRIVER_DESC; dev->driver.date = DRIVER_DATE; dev->driver.major = DRIVER_MAJOR; dev->driver.minor = DRIVER_MINOR; dev->driver.patchlevel = DRIVER_PATCHLEVEL; dev->driver.use_agp = 1; dev->driver.use_mtrr = 1; dev->driver.use_irq = 1; dev->driver.use_vbl_irq = 1; } #ifdef __FreeBSD__ static int via_probe(device_t dev) { return drm_probe(dev, via_pciidlist); } static int via_attach(device_t nbdev) { drm_device_t *dev = device_get_softc(nbdev); bzero(dev, sizeof(drm_device_t)); via_configure(dev); return drm_attach(nbdev, via_pciidlist); } static device_method_t via_methods[] = { /* Device interface */ DEVMETHOD(device_probe, via_probe), DEVMETHOD(device_attach, via_attach), DEVMETHOD(device_detach, drm_detach), { 0, 0 } }; static driver_t via_driver = { "drm", via_methods, sizeof(drm_device_t) }; extern devclass_t drm_devclass; DRIVER_MODULE(via, pci, via_driver, drm_devclass, 0, 0); MODULE_DEPEND(via, drm, 1, 1, 1); #elif defined(__NetBSD__) || defined(__OpenBSD__) #ifdef _LKM CFDRIVER_DECL(via, DV_TTY, NULL); #else CFATTACH_DECL(via, sizeof(drm_device_t), drm_probe, drm_attach, drm_detach, drm_activate); #endif #endif
iel.vetter@ffwll.ch> 2013-11-06Add DRM_MODE_PAGE_FLIP_ASYNC defineKeith Packard This exposes the kernel API for performing asynchronous flips Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> 2013-09-30drm: Sync the DRM_SET_CLIENT_CAP ioctl definitionDamien Lespiau v2: SET_CAP -> SET_CLIENT_CAP renaming Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> 2013-09-30drm: Synchronize the stereo 3D mode flags from the kernel headersDamien Lespiau v2: stereo layouts are now an enum (Daniel Vetter) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> 2013-09-22libdrm: Make some drm headers compatible with gcc -std=c89 -pedanticDaniel Kurtz The following minor changes were needed to these headers: * Convert // comments to /* */ * No , after final member of enum With these changes, these header files can be included by a program that is built with gcc options: -std=c89 -Werror -pedantic Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> 2013-09-18radeon: Fix tiling mode index for 1D tiled depth/stencil surfaces on CIKMichel Dänzer Reviewed-by: Alex Deucher <alexander.deucher@amd.com> 2013-07-04libdrm: add missing DRM_CAP_TIMESTAMP_MONOTONICImre Deak Just add the definition according the kernel's copy of drm.h Signed-off-by: Imre Deak <imre.deak@intel.com> 2013-07-02drm: add hotspot cursor interface support.Dave Airlie Signed-off-by: Dave Airlie <airlied@redhat.com> 2013-05-09drm: add qxl drm header fileDave Airlie Now that this driver is merged add the header file. Signed-off-by: Dave Airlie <airlied@redhat.com> 2013-04-27intel: Add support for VEBOX ring (v2)Xiang, Haihao v2: Fix the test for has_vebox Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> 2013-04-12radeon: update radeon_drm.h to kernel last API additions v2Jerome Glisse v2: sync with radeon-next tree for 3.10 http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.10-wip Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> 2012-08-10intel: Import updated i915_drm.h.Eric Anholt Reviewed-by: Ben Widawsky <ben@bwidawsk.net> 2012-07-16libdrm: add prime fd->handle and handle->fd interfacesDave Airlie These are just basic ioctl wrappers around the prime ioctls, along with the capability reporting. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> 2012-07-16libdrm: add missing caps from kernel to drm.hDave Airlie This just moves over some missing caps from the kernel. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> 2012-06-27intel: updated header for contextsBen Widawsky Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-By: Kenneth Graunke <kenneth@whitecape.org> 2012-06-08Add support for bitmask propertiesRob Clark A bitmask property is similar to an enum. The enum value is a bit position (0-63), and valid property values consist of a mask of zero or more of (1 << enum_val[n]). Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> 2012-06-08Add support for generic object properties IOCTLsPaulo Zanoni New library calls: - drmModeObjectGetProperties - drmModeFreeObjectProperties - drmModeObjectSetProperties Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-by: Rob Clark <rob@ti.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> 2012-06-06intel: wait render header updatesBen Widawsky make headers_install in kernel. Copy to here. v2: signed ns_timeout Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> 2012-06-06intel: sanitize i915_drm.hBen Widawsky run make headers_isntall on d-i-n, copy to here Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> 2012-04-11libdrm: update drm headers from kernel for prime/dmabufRob Clark Sync drm.h with from kernel headers for the new PRIME_HANDLE_TO_FD and PRIME_FD_TO_HANDLE ioctls from Dave Airlie's "drm: base prime/ dma-buf support (v5)" kernel patch. Signed-off-by: Rob Clark <rob@ti.com> 2012-03-05Make drm/drm_fourcc.h portable to non-linux platformsAlan Coopersmith Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 2012-02-01radeon: add surface allocator helper v10Jerome Glisse The surface allocator is able to build complete miptree when allocating surface for r600/r700/evergreen/northern islands GPU family. It also compute bo size and alignment for render buffer, depth buffer and scanout buffer. v2 fix r6xx/r7xx 2D tiling width align computation v3 add tile split support and fix 1d texture alignment v4 rework to more properly support compressed format, split surface pixel size and surface element size in separate fields v5 support texture array (still issue on r6xx) v6 split surface value computation and mipmap tree building, rework eg and newer computation v7 add a check for tile split and 2d tiled v8 initialize mode value before testing it in all case, reenable 2D macro tile mode on r6xx for cubemap and array. Fix cubemap to force array size to the number of face. v9 fix handling of stencil buffer on evergreen v10 on evergreen depth buffer need to have enough room for a stencil buffer just after depth one Signed-off-by: Jerome Glisse <jglisse@redhat.com> 2012-02-01intel: query for LLC supportEugeni Dodonov This adds support for querying the kernel about the LLC support in the hardware. In case the ioctl fails, we assume that it is present on GEN6 and GEN7. v2: fix the return code checking Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> 2012-01-09intel: add sprite ioctl defines and struct for i915 sprite codeJesse Barnes 2012-01-04intel: Update for new i915_drm.h defines.Eric Anholt 2011-12-13libdrm: update drm headers from kernel, including new overlay ioctls & structsJesse Barnes Add structs and functions necessary for the new plane and fb handling code, including a new header, drm_fourcc.h, that includes the surface formats supported by various DRM drivers. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> 2011-04-04libdrm: (revised) vblank wait on crtc > 1Ilija Hadzic Hi Alex, Enclosed is a revised version of the patch sent on Mar 18, against the master branch of the drm userspace (i.e. libdrm). Details summarised in this thread: http://lists.freedesktop.org/archives/dri-devel/2011-March/009499.html This patch reconciles libdrm with the the kernel change that Dave pushed this morning. It *supersedes* the previously sent patch (i.e. apply it to the master branch as it exists at the time of this writing, not as an incremental patch to the one sent previously). Regards, Ilija Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> 2011-03-30drm_mode: fix types on recently added ioctlsDave Airlie 2011-03-04Implement drmGetCap() to query device/driver capabilitiesBen Skeggs Signed-off-by: Ben Skeggs <bskeggs@redhat.com>