summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-01-11drm/nouveau/nvif: move internal class identifiers to class.hBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/gr/gm107-: make use of gpc_addr() macro for tpc ramchain setupBen Skeggs
Should be no functional change here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/instmem/gk20a: use DMA API CPU mappingAlexandre Courbot
Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access") tried to be smart while using the DMA-API by managing the CPU mappings of buffers allocated with the DMA-API by itself. In doing so, it relied on dma_to_phys() which is an architecture-private function not available everywhere. This broke the build on several architectures. Since there is no reliable and portable way to obtain the physical address of a DMA-API buffer, stop trying to be smart and just use the CPU mapping that the DMA-API can provide. This means that buffers will be CPU-mapped for all their life as opposed to when we need them, but anyway using the DMA-API here is a fallback for when no IOMMU is available so we should not expect optimal behavior. This makes the IOMMU and DMA-API implementations of instmem diverge enough that we should maybe put them into separate files... Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/instmem/gk20a: fix race conditionsAlexandre Courbot
The LRU list used for recycling CPU mappings was handling concurrency very poorly. For instance, if an instobj was acquired twice before being released once, it would end up into the LRU list even though there is still a client accessing it. This patch fixes this by properly counting how many clients are currently using a given instobj. While at it, we also raise errors when inconsistencies are detected, and factorize some code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/gk20a: Add MODULE_FIRMWARE for gk20aNicolas Chauvet
This patch is needed by initramfs tools to detect the required firmware files for the module. This patch tests for either TEGRA_124_SOC or TEGRA_132_SOC for the firmwares related to the Tegra K1 generation. v2: move the MODULE_FIRMWARE to the nvidia_platform.c file. This will avoid to test for NOUVEAU_PLATFORM_DRIVER Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/fifo/gk104: fix engine status register offsetVince Hsu
The offset should be 8 on Kepler and later. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/ce/gk104: attempt at better handling of LAUNCHERRBen Skeggs
Very rough, no idea how correct it is at this point, but it prevents getteximage-depth from piglit from hanging the GPU. v2: updated with NV_PCE_FE_LAUNCHERR_REPORT values provided by NVIDIA Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/fifo/gf100: fix race condition when updating engine runlistsBen Skeggs
Similar in spirit to the gk104 fix with a similar title. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/fifo/gk104: fix race condition when updating engine runlistsBen Skeggs
The CPU-side tracking of engine runlists was not protected by a lock, leading to list corruption, eventually causing runlist_update() to overrun the GPU-side runlist, triggering an OOPS. Fixes some of the issues noticed during parallel piglit runs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibblesIlia Mirkin
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/kms: no need to check for empty edid before drm_detect_hdmi_monitorIlia Mirkin
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/core: fix return in error path of device probeAlexandre Courbot
We want to unlock nv_devices_mutex in this error path as well. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/kms: allow 225/297MHz pixel clocks for HDMI on Fermi/KeplerIlia Mirkin
Some Fermi's apparently alow allow 297MHz clocks, so create a parameter which allows end-users to set it themselves until we have a reliable way to determine the board's maximum pixel clocks. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-01-11drm/nouveau/disp: activate dual link TMDS links only when possibleHauke Mehrtens
Without this patch a pixel clock rate above 165 MHz on a TMDS link is assumed to be dual link. This is true for DVI, but not for HDMI. HDMI supports no dual link, but it supports pixel clock rates above 165 MHz. Only activate Dual Link mode when it is actually possible and requested. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [imirkin: check for hdmi monitor for computing proto, use sor ctrl to enable extra config bit] Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-12-31drm/omap: remove obsolete manager assignmentTomi Valkeinen
omap_encoder_update() assigns an overlay manager to dssdev->src->manager. This assignment is not needed, as the connections in the display chain have already been made at connect step. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm/omap: set DRIVER_ATOMIC for omapdrmTomi Valkeinen
omapdrm supports atomic modesetting, and it seems to work ok. So let's set the flag to enable the atomic modesetting API support. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-12-31drm/omap: remove unused plugin definesTomi Valkeinen
Remove unused defines related to SGX plugin which are not used. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-12-31drm/omap: Use bitmaps for TILER placementAndy Gross
Modified Tiler placement to utilize bitmaps for bookkeeping and all placement algorithms. This resulted in a substantial savings in time for all Tiler reservation and free operations. Typical savings are in the range of 28% decrease in time taken with larger buffers showing a 80%+ decrease. Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Remove check for impossible conditionLaurent Pinchart
The GEM object can't be tiled without a usergart as that condition is checked and considered as an error when creating the GEM object. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Simplify error handling when creating GEM objectLaurent Pinchart
The goto error statement end up just returning NULL without performing any cleanup, replace it with a direct return. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Don't free mmap offset twiceLaurent Pinchart
The drm_gem_free_mmap_offset() call in omap_gem_free_object() is redundant as the same function is called from drm_gem_object_release(). Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Fix GEM object destroy in error pathLaurent Pinchart
Use the omap_gem_free_object() function to destroy the GEM object in the omap_gem_new_handle() error path instead of doing it manually (and incorrectly). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Free the correct memory objectLaurent Pinchart
The GEM object free handler frees memory allocated by the driver using the pointer to the drm_gem_object instead of the pointer to the omap_gem_object that embeds it. This doesn't cause any issue in practice as the drm_gem_object is the first field of omap_gem_object, but would cause memory corruption if the structure layout changes. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Mask out private flags passed from userspaceLaurent Pinchart
The 8 high order bits of the buffer flags are reserved for internal use. Mask them out from the flags passed by userspace. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Move global usergart variable to omap_drm_privateLaurent Pinchart
The structure contains data related to a device instance, it shouldn't be a global variable. While at it rename the usergart structures with an omap_drm_ prefix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Group functions by purposeLaurent Pinchart
Divide the GEM implementation in groups of functions to improve readability. No code change is performed by this commit. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Remove forward declarationsLaurent Pinchart
Reorder functions to get rid of forward declarations Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: gem: Remove unused function prototypesLaurent Pinchart
Several DRM core function prototypes refer to functions that don't exist anymore and are thus obviously never called. Remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: Make fbdev emulation optionalLaurent Pinchart
Don't compile the fbdev emulation code when fbdev emulation support is disabled. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: Fix plane state free in plane reset handlerLaurent Pinchart
The plane reset handler frees the plane state and allocates a new default state, but when doing so attempt to free the plane state using the base plane state pointer instead of casting it to the driver-specific state object that has been allocated. Fix it by using the omap_plane_atomic_destroy_state() function to destroy the plane state instead of duplicating the code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [tomi.valkeinen@ti.com: move of the func into separate patch] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: move omap_plane_reset()Tomi Valkeinen
Move omap_plane_reset() function to avoid forward declarations in the next patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm/omap: Use platform_register/unregister_drivers()Thierry Reding
These new helpers simplify implementing multi-driver modules and properly handle failure to register one driver by unregistering all previously registered drivers. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm: omapdrm: tiler: Remove unneded module alias for tilerLuis de Bethencourt
omap_dmm_tiler.c can't be compiled as a module and it is built unconditionally as part of omapdrm. Since it can't be used as a module, there is no need for it to have an unused MODULE_ALIAS(). Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-31drm/rockchip: vop: export vop_component_ops to modulesStephen Rothwell
Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-12-28drm/rockchip: vop: add rk3036 vop supportMark Yao
RK3036 registers layout is quite difference with rk3288 layout, The IC design with different framework, rk3036 vop is VOP LITE, and rk3288 is VOP FULL. RK3036 support two overlay plane and one hwc plane, max output resolution is 1080p. it support IOMMU, and its IOMMU same as rk3288's. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: vop: spilt scale regstersMark Yao
There are two version scale control register found on vop, scale full version found on rk3288, support extension registers. and scale little version found on rk3036, only support common scale. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: vop: spilt register related into rockchip_reg_vop.cMark Yao
No functional updates. Spilt register related into another file would be nice to multi vop driver, Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: vop: move interrupt registers into vop_dataMark Yao
Move interrupt registers into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: vop: merge vop cfg_done into vop_dataMark Yao
Move cfg_done register into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: dw_hdmi: use encoder enable functionMark Yao
encoder.enable is more compatible to atomic api than encoder.prepare/commit Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm: bridge/dw_hdmi: add atomic API supportMark Yao
Fill atomic needed funcs with default atomic helper library. Rockchip use dw_hdmi, and drm/rockchip will covert to atomic api, we need dw_hdmi support atomic funcs. Now another drm driver use dw_hdmi is imx, not yet atomic, so check DRIVER_ATOMIC at runtime to spilt atomic and not atomic. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: direct config connecter gate and out_modeMark Yao
Both connecter gate and out_mode are not conflict with mode set configure. Direct setting connecter gate and out_mode, that allow connector do rockchip_drm_crtc_mode_config after mode set. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: support atomic asynchronous commitMark Yao
If drm core requests a async commit, rockchip_drm_atomic_commit will schedule a work task to update later. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: Optimization vop mode setMark Yao
Rk3288 vop timing registers is immediately register, when configure timing on display active time, will cause tearing. use dclk reset is not a good idea to avoid this tearing. we can avoid tearing by using standby register. Vop standby register will take effect at end of current frame, and go back to work immediately when exit standby. So we can use standby register to protect this context. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: Convert to support atomic APIMark Yao
Rockchip vop not support hw vblank counter, needed check the committed register if it's really take effect. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: vop: replace dpms with enable/disableMark Yao
For vop, power by enable/disable is more suitable then legacy dpms function, and enable/disable more closely to the new atomic API. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-28drm/rockchip: Use new vblank api drm_crtc_vblank_*Mark Yao
No functional update, drm_vblank_* is the legacy version of drm_crtc_vblank_*. and use new api make driver more clean. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-12-24Backmerge drm-fixes merge into Linus's tree into drm-next.Dave Airlie
This merges '5b726e06d6e8309e5c9ef4109a32caf27c71dfc8' into drm-next Just to resolve some merges to make Daniel's life easier. Signed-off-by: DAve Airlie <airlied@redhat.com>
2015-12-23Merge tag 'drm-intel-fixes-2015-12-23' of ↵Linus Torvalds
git://anongit.freedesktop.org/drm-intel Pull i915 drm fixes from Jani Nikula: "Here's a batch of i915 fixes all around. It may be slightly bigger than one would hope for at this stage, but they've all been through testing in our -next before being picked up for v4.4. Also, I missed Dave's fixes pull earlier today just because I wanted an extra testing round on this. So I'm fairly confident. Wishing you all the things it is customary to wish this time of the year" * tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel: drm/i915: Correct max delay for HDMI hotplug live status checking drm/i915: mdelay(10) considered harmful drm/i915: Kill intel_crtc->cursor_bo drm/i915: Workaround CHV pipe C cursor fail drm/i915: Only spin whilst waiting on the current request drm/i915: Limit the busy wait on requests to 5us not 10ms! drm/i915: Break busywaiting for requests on pending signals drm/i915: Disable primary plane if we fail to reconstruct BIOS fb (v2) drm/i915: Set the map-and-fenceable flag for preallocated objects drm/i915: Drop the broken cursor base==0 special casing
2015-12-23Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm fixes from Dave Airlie: "Not much happening, should have dequeued this lot earlier. One amdgpu, one nouveau and one exynos fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/exynos: atomic check only enabled crtc states drm/nouveau/bios/fan: hardcode the fan mode to linear drm/amdgpu: fix user fence handling