aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
Commit message (Collapse)AuthorAge
* drm/nouveau: use the same packet header macros as userspaceBen Skeggs2012-05-24
| | | | | | Cosmetic cleanup only. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: allow loading alternate vbios image as firmwareBen Skeggs2012-05-24
| | | | | | Useful for debugging different VBIOS versions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methodsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/fbcon: move 2d class to subchannel 3Ben Skeggs2012-05-24
| | | | | | | Kepler GRAPH has (well, sorta) fixed subchannel<->class assignments, make this match up to keep it happy without trapping. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/gr: initial implementationBen Skeggs2012-05-24
| | | | | | | | | This may, perhaps, get re-merged with nvc0_graph.c at some point. It's still unclear as to how great an idea that'd be. Stay tuned... Completely dependent on firmware blobs from NVIDIA binary driver currently. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/fifo: initial implementationBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: give a slightly larger pci(e)gart aperture on all chipsetsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: some more delays for ddr3 reclockingBen Skeggs2012-05-24
| | | | | | | These numbers from the binary driver's daemon scripts, and fix the transition to perflvl 3 on my T510. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/pm: very initial mclk freq changeBen Skeggs2012-05-24
| | | | | | Loads of magic missing, this will probably blow up if you try it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd9/pm: oops, fix timing calcBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/pm: enable mpll src pll, and calc mpll coefficientsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/pm: start filling in memory reclocking stubsBen Skeggs2012-05-24
|
* drm/nva3/pm: another few magic regs, and slightly better 0x004018 handlingBen Skeggs2012-05-24
| | | | | | | | | | | Not entirely convinced 0x004018 transitions are correct yet, but, it's an improvement. The 750MHz value comes from fiddling with the binary driver + coolbits on two different DDR3 NVA8 chipsets (T510 NVS3100M, and NVS300), not a clue where this number comes from. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: initial attempt at handling 111100/111104Ben Skeggs2012-05-24
| | | | | | | Probably not quite right, but this is enough now to make NVS300 reclock between all 3 of its perflvls correctly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: make pll->pll mode workBen Skeggs2012-05-24
| | | | | | | | | | This probably wants a cleanup, but I'm holding off until I know for sure how the rest of the things that need doing fit together. Tested on NVS300 by hacking up perflvl 1 to require PLL mode, and switching between perflvl 3 and 1. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: attempt to bash a few 0x100200 bits correctlyBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: begin to restructure memory clock changes + another magicBen Skeggs2012-05-24
| | | | | | | | | | | | | | | | | | | | The binary driver appears to do various bits and pieces of the memory clock frequency change at different times, depending on the particular transition that's occuring. I've attempted to replicate this here for div->pll, pll->div and div->div transitions. With some additional (patches upcoming) magic regs being bashed, this allows me to correctly transition between all 3 perflvls on NVS300. pll->pll transitions will *not* work correctly at the moment, pending me tricking the binary driver into doing one and seeing how to correctly handle it. This patch also handles (hopefully) 0x1110e0, which appears to need changing depending on whether in PLL or divider mode.. Maybe. We'll see. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: more random unknown PFB regsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: initial attempt at more magic PFB regsBen Skeggs2012-05-24
| | | | | | | The reg calculation may get moved elsewhere at some point, but lets figure out what exactly we need to do first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: hook up to ram reclocking helperBen Skeggs2012-05-24
| | | | | | This gets us a start on memory timings. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: introduce more paranoiaBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/radeon: add static const to the dma-buf ops.Dave Airlie2012-05-23
| | | | | Reported-by: wfg@linux.intel.com Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: make some dmabuf things staticDave Airlie2012-05-23
| | | | | | | these functions and the table can all be static/static const. Reported-by: wfg@linux.intel.com Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: update ast/cirrus/mgag200 for change in TTM apiDave Airlie2012-05-23
| | | | | | | | New drivers merged after changes were done in prime TTM code. Fix build. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: add PRIME support (v2)Alex Deucher2012-05-23
| | | | | | | | | | | | | | | This adds prime->fd and fd->prime support to radeon. It passes the sg object to ttm and then populates the gart entries using it. Compile tested only. v2: stub kmap + use new helpers + add reimporting Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* i915: add dmabuf/prime buffer sharing support.Daniel Vetter2012-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds handle->fd and fd->handle support to i915, this is to allow for offloading of rendering in one direction and outputs in the other. v2 from Daniel Vetter: - fixup conflicts with the prepare/finish gtt prep work. - implement ppgtt binding support. Note that we have squat i-g-t testcoverage for any of the lifetime and access rules dma_buf/prime support brings along. And there are quite a few intricate situations here. Also note that the integration with the existing code is a bit hackish, especially around get_gtt_pages and put_gtt_pages. It imo would be easier with the prep code from Chris Wilson's unbound series, but that is for 3.6. Also note that I didn't bother to put the new prepare/finish gtt hooks to good use by moving the dma_buf_map/unmap_attachment calls in there (like we've originally planned for). Last but not least this patch is only compile-tested, but I've changed very little compared to Dave Airlie's version. So there's a decent chance v2 on drm-next works as well as v1 on 3.4-rc. v3: Right when I've hit sent I've noticed that I've screwed up one obj->sg_list (for dmar support) and obj->sg_table (for prime support) disdinction. We should be able to merge these 2 paths, but that's material for another patch. v4: fix the error reporting bugs pointed out by ickle. v5: fix another error, and stop non-gtt mmaps on shared objects stop pread/pwrite on imported objects, add fake kmap Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* nouveau: add PRIME supportDave Airlie2012-05-23
| | | | | | | | | | | | This adds prime->fd and fd->prime support to nouveau, it passes the SG object to TTM, and then populates the GART entries using it. v2: add stubbed kmap + use new function to fill out pages array for faulting + add reimport test. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* ttm: add prime sharing support to TTM (v2)Dave Airlie2012-05-23
| | | | | | | | | | | | | This adds the ability for ttm common code to take an SG table and use it as the backing for a slave TTM object. The drivers can then populate their GTT tables using the SG object. v2: make sure to setup VM for sg bos as well. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* udl: add prime fd->handle support.Dave Airlie2012-05-23
| | | | | | | | udl can only be used as an output offload so doesn't need to support handle->fd direction. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/prime: add exported buffers to current fprivs imported buffer list (v2)Dave Airlie2012-05-23
| | | | | | | | | | If userspace attempts to import a buffer it exported on the same device, we need to return the same GEM handle for it, not a new handle pointing at the same GEM object. v2: move removals into a single fn, no need to set to NULL. (Chris Wilson) Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/prime: introduce sg->pages/addr arrays helperDave Airlie2012-05-23
| | | | | | | | | | the ttm drivers need this currently, in order to get fault handling working and efficient. It also allows addrs to be NULL for devices like udl. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: add plane propertiesRob Clark2012-05-22
| | | | | | | | | | The omapdrm driver uses this for setting per-overlay rotation. It is likely also useful for setting YUV->RGB colorspace conversion matrix, etc. Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: add bitmask property typeRob Clark2012-05-22
| | | | | | | | | | | | 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]). [airlied: 1LL -> 1ULL] Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'exynos-drm-next' of ↵Dave Airlie2012-05-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.infradead.org/users/kmpark/linux-samsung into drm-core-next * 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: add G2D driver drm/exynos: added vp scaling feature for hdmi drm/exynos: added source size to overlay structure drm/exynos: add additional display mode for hdmi drm/exynos: enable dvi mode for dvi monitor drm/exynos: fixed wrong pageflip finish event for interlace mode drm/exynos: add PM functions for hdmi and mixer drm/exynos: add dpms for hdmi drm/exynos: use threaded irq for hdmi hotplug drm/exynos: use platform_get_irq_byname for hdmi drm/exynos: cleanup for hdmi platform data drm/exynos: added a feature to get gem buffer information. drm/exynos: added drm prime feature. drm/exynos: added cache attribute support for gem. vgaarb: Provide dummy default device functions
| * drm/exynos: add G2D driverJoonyoung Shim2012-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changelog v3: - use __u64 instead of pointer in ioctl struct. The G2D is a 2D graphic accelerator that supports Bit Block Transfer. This G2D driver is exynos drm specific and supports only G2D(version 4.1) of later Exynos series from Exynos4X12 because supporting DMA. The G2D is performed by two tasks simply. 1. Configures the rendering parameters, such as foreground color and coordinates data by setting the drawing context registers. 2. Start the rendering process by setting thre relevant command registers accordingly. The G2D version 4.1 supports DMA mode as host interface. User can make command list to reduce HOST(ARM) loads. The contents of The command list is setted to relevant registers of G2D by DMA. The command list is composed Header and command sets and Tail. - Header: The number of command set(4Bytes) - Command set: Register offset(4Bytes) + Register data(4Bytes) - Tail: Pointer of base address of the other command list(4Bytes) By Tail field, the G2D can process many command lists without halt at one go. The G2D has following the rendering pipeline. --> Primitive Drawing --> Rotation --> Clipping --> Bilinear Sampling --> Color Key --> ROP --> Mask Operation --> Alpha Blending --> Dithering --> FrameBuffer And supports various operations from the rendering pipeline. - copy - fast solid color fill - window clipping - rotation - flip - 4 operand raster operation(ROP4) - masking operation - alpha blending - color key - dithering - etc User should make the command list to data and registers needed by operation to use. The Exynos G2D driver only manages the command lists received from user. Some registers needs memory base address(physical address) of image. User doesn't know its physical address, so fills the gem handle of that memory than address to command sets, then G2D driver converts it to memory base address. We adds three ioctls and one event for Exynos G2D. - ioctls DRM_EXYNOS_G2D_GET_VER: get the G2D hardware version DRM_EXYNOS_G2D_SET_CMDLIST: set the command list from user to driver DRM_EXYNOS_G2D_EXEC: execute the command lists setted to driver - event DRM_EXYNOS_G2D_EVENT: event to give notification completion of the command list to user Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added vp scaling feature for hdmiSeung-Woo Kim2012-05-17
| | | | | | | | | | | | | | | | | | | | This patch adds vp scaling feature for exynos hdmi. Scaling ratio between source and destination is used for width and height. Also meaningless variables to set registers are cleaned. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: added source size to overlay structureSeung-Woo Kim2012-05-17
| | | | | | | | | | | | | | | | | | | | Set plane has source size but exynos overlay structure did not consider it. This patch adds source size to overlay structure. For set crtc, source size is set from crtc size. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: add additional display mode for hdmiSeung-Woo Kim2012-05-17
| | | | | | | | | | | | | | | | 1080p@30Hz mode is added to hdmi display mode. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: enable dvi mode for dvi monitorSeung-Woo Kim2012-05-17
| | | | | | | | | | | | | | | | | | | | | | Hdmi monitor and dvi monitor can be distinguished with edid. This patch enables dvi mode if dvi monitor is connected and does not enable audio feature for dvi mode because dvi has no audio feature. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: fixed wrong pageflip finish event for interlace modeSeung-Woo Kim2012-05-17
| | | | | | | | | | | | | | | | | | | | Pageflip finish event for interlace mode has bug on checking top field vsync because of comparing between dma address converted by start coordinates and non-converted dma address. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: add PM functions for hdmi and mixerJoonyoung Shim2012-05-08
| | | | | | | | | | | | | | | | | | | | This patch supports the PM for hdmi and mixer. Turn off hdmi and mixer when suspended, and when resume, will turn on them by hdmi hotplug detection if hdmi is attached. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: add dpms for hdmiJoonyoung Shim2012-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power and clocks turns on always in exynos hdmi and mixer driver, but we should turn off the power and clocks of exynos hdmi and mixer when the hdmi cable unplugged or when hdmi unused. There are two interrupt to detect hotplug of hdmi cable - internal interrupt and external interrupt. The internal interrupt can use only when hdmi is dpms on so if hdmi is dpms off, we should use external interrupt to detect hotplug of hdmi cable. If hdmi is dpms on, we cannot external interrupt because the gpio pin for external interrupt is used to hdmi HPD pin for internal interrupt. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: use threaded irq for hdmi hotplugJoonyoung Shim2012-05-08
| | | | | | | | | | | | | | | | We can use irq thread instead of workqueue Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: use platform_get_irq_byname for hdmiJoonyoung Shim2012-05-08
| | | | | | | | | | | | | | | | | | The exynos hdmi supports two hdmi interrupts - external and internal, so use platform_get_irq_byname to distinguish their resources. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: cleanup for hdmi platform dataJoonyoung Shim2012-05-08
| | | | | | | | | | | | | | | | | | The exynos_drm_hdmi_pdata struct have owned unnessary members. Remove them and add a function pointer to configure hdmi hotplug detection pin. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: added a feature to get gem buffer information.Inki Dae2012-05-08
| | | | | | | | | | | | | | | | this patch adds a feature to get a gem buffer information and user application can get the gem buffer information simply in runtime through gem handle. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added drm prime feature.Inki Dae2012-05-08
| | | | | | | | | | | | | | | | | | | | | | this patch adds exynos specific codes for DRM Prime feature. with this patch, user application can get file descriptor from gem handle through DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl command(export) and also gem handle from file descriptor through DRM_IOCTL_PRIME_FD_TO_HANLDE(import) ioctl command. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: added cache attribute support for gem.Inki Dae2012-05-08
| | | | | | | | | | | | | | | | | | with this patch, user application can set cache attribute(such as cachable, writecombime or non-cachable) of the memory region allocated by gem framework. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | drm: Make the CRTC gamma_set operation optionalLaurent Pinchart2012-05-22
| | | | | | | | | | | | | | | | | | Drivers for hardware without gamma support should not be forced to implement a no-op gamma set operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Rob Clark <rob.clark@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: Constify drm_mode_config_funcs pointerLaurent Pinchart2012-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DRM mode config functions structure declared by drivers and pointed to by the drm_mode_config funcs field is never modified. Make it a const pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Rob Clark <rob.clark@linaro.org> Reviwed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>