summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/bios: add proper support for opcode 0x59Ilia Mirkin2015-07-271-4/+20
| | | | | | | | | More analysis shows that this is identical to 0x79 except that it loads the frequency indirectly from elsewhere in the VBIOS. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91025 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: add 0x59 and 0x5a opcodesIlia Mirkin2015-07-271-0/+24
| | | | | | | | | | | Opcode 0x5a is a register write for data looked up from another part of the VBIOS image. 0x59 is a more complex opcode, but we may as well recognize it. These occur on a single known instance of Riva TNT2 hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91025 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: Use NULL for pointersThierry Reding2015-07-271-1/+1
| | | | | | | | | The return type of exec_lookup() is struct nvkm_output *, so it should return NULL rather than 0. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: fix a potential race condition when creating an engine contextSamuel Pitoiset2015-07-271-4/+3
| | | | | | | | | | | There is always the possiblity that the ppm->context pointer would get partially updated and accidentally would equal ctx. This would allow two contexts to co-exist, which is not acceptable. Moving the test to the critical section takes care of this problem. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: prevent freeing the wrong engine contextSamuel Pitoiset2015-07-271-2/+5
| | | | | | | | This fixes a crash when multiple PM engine contexts are created. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100: wait for GR idle after GO_IDLE bundleAlexandre Courbot2015-07-272-0/+38
| | | | | | | | | | After submitting a GO_IDLE bundle, one must wait for GR to effectively be idle before submitting the next bundle. Failure to do so may result in undefined behavior in some rare cases. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reported-by: Kary Jin <karyj@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100: wait on bottom half of FE's pipelineAlexandre Courbot2015-07-271-1/+1
| | | | | | | | | When emitting the ICMD bundle, wait on the bottom half (bit 3 of the GR_STATUS register) instead of upper half (bit 2) to make sure methods are effectively emitted. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo/gk104: kick channels when deactivating themAlexandre Courbot2015-07-271-8/+21
| | | | | | | | | | | | | Kicking channels is part of their deactivation process. Maxwell chips are particularly sensitive to this, and can start fetching the previous pushbuffer of a recycled channel if this is not done. While we are at it, improve the channel preemption code to only wait for bit 20 of 0x002634 to turn to 0, as it is the bit indicating a preempt is pending. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/ibus/gk20a: increase SM wait timeoutAlexandre Courbot2015-07-271-0/+8
| | | | | | | | Increase clock timeout for SYS, FPB and GPC in order to avoid operation failure at high gpcclk rate. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/platform: fix compile error if !CONFIG_IOMMUAlexandre Courbot2015-07-271-0/+16
| | | | | | | | | | The lack of IOMMU API support can make nouveau_platform_probe_iommu() fail to compile because struct iommu_ops is then empty. Fix this by skipping IOMMU probe in that case - lack of IOMMU on platform devices is sub-optimal, but is not an error. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Do not leak client objectsThierry Reding2015-07-271-0/+1
| | | | | | | | | | | | The memory allocated for a nouveau_cli object in nouveau_cli_create() is never freed. Free the memory in nouveau_cli_destroy() to plug this leak. kmemleak recorded this after running a couple of nouveau test programs. Note that kmemleak points at drm_open_helper() because for some reason it thinks that skipping the first two stack frames is a good idea. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/gt215: u32->s32 for difference in req. and set clockRoy Spliet2015-07-271-1/+2
| | | | | | | This difference can of course be negative too... Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm/nv04-nv40/instmem: protect access to priv->heap by mutexKamil Dudka2015-07-271-0/+8
| | | | | | | This fixes the list_del corruption reported at <https://bugzilla.redhat.com/1205985>. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
* drm/nouveau: hold mutex when calling nouveau_abi16_fini()Kamil Dudka2015-07-271-0/+2
| | | | | | This was the only access to cli->abi16 without holding the mutex. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
* Merge tag 'drm-atmel-hlcdc/fixes-for-4.2' of ↵Dave Airlie2015-07-242-6/+7
|\ | | | | | | | | | | | | | | | | https://github.com/bbrezillon/linux-at91 into drm-fixes single hlcdc fix. * tag 'drm-atmel-hlcdc/fixes-for-4.2' of https://github.com/bbrezillon/linux-at91: drm: atmel-hlcdc: fix vblank initial state
| * drm: atmel-hlcdc: fix vblank initial stateBoris Brezillon2015-07-202-6/+7
| | | | | | | | | | | | | | | | drm_vblank_on() now warns on nested use or if vblank is not properly initialized. This patch fixes Atmel HLCDC vblank initial state. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reported-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
* | Merge tag 'topic/drm-fixes-2015-07-23' of ↵Dave Airlie2015-07-241-4/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-fixes Regression fix for systemd getting confused about unknown connector state after resume. Just stop setting the state to unknown, turned out to be a silly idea anyway. What drivers imo really should do (and i915 still does that) is forcing a full reprobe on resume to make sure connector changes while suspended are caught. Most drivers seem to get this wrong. Otoh it took us years to get fixes merged where some probe races resulted in eating uevents, I guess userspace expectations for reliable hpd are just really low :( * tag 'topic/drm-fixes-2015-07-23' of git://anongit.freedesktop.org/drm-intel: drm: Stop resetting connector state to unknown
| * | drm: Stop resetting connector state to unknownDaniel Vetter2015-07-221-4/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's causing piles of issues since we've stopped forcing full detect cycles in the sysfs interfaces with commit c484f02d0f02fbbfc6decc945a69aae011041a27 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Mar 6 12:36:42 2015 +0000 drm: Lighten sysfs connector 'status' The original justification for this was that the hpd handlers could use the unknown state as a hint to force a full detection. But current i915 code isn't doing that any more, and no one else really uses reset on resume. So instead just keep the old state around. References: http://article.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/62584 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=100641 Cc: Rui Matos <tiagomatos@gmail.com> Cc: Julien Wajsberg <felash@gmail.com> Cc: kuddel.mail@gmx.de Cc: Lennart Poettering <mzxreary@0pointer.de> Cc: stable@vger.kernel.org Acked-by: Rob Clark <robdclark@gmail.com> Tested-by: Rui Tiago Cação Matos <tiagomatos@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* | Merge tag 'drm-intel-fixes-2015-07-23' of ↵Dave Airlie2015-07-241-7/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-fixes arb_timer kernel side fix from Chris. * tag 'drm-intel-fixes-2015-07-23' of git://anongit.freedesktop.org/drm-intel: drm/i915: Use two 32bit reads for select 64bit REG_READ ioctls
| * | drm/i915: Use two 32bit reads for select 64bit REG_READ ioctlsChris Wilson2015-07-211-7/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the hardware sometimes mysteriously totally flummoxes the 64bit read of a 64bit register when read using a single instruction, split the read into two instructions. Since the read here is of automatically incrementing timestamp counters, we also have to be very careful in order to make sure that it does not increment between the two instructions. However, since userspace tried to workaround this issue and so enshrined this ABI for a broken hardware read and in the process neglected that the read only fails in some environments, we have to introduce a new uABI flag for userspace to request the 2x32 bit accurate read of the timestamp. v2: Fix alignment check and include details of the workaround for userspace. Reported-by: Karol Herbst <freedesktop@karolherbst.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91317 Testcase: igt/gem_reg_read Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: stable@vger.kernel.org Tested-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | Merge branch 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2015-07-246-16/+115
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-fixes Some amdgpu fixes. * 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu/cz/dpm: properly report UVD and VCE clock levels drm/amdgpu/cz: implement voltage validation properly drm/amdgpu: add VCE harvesting instance query drm/amdgpu: implement VCE 3.0 harvesting support (v4) drm/amdgpu/dce10: Re-set VBLANK interrupt state when enabling a CRTC drm/amdgpu/dce11: Re-set VBLANK interrupt state when enabling a CRTC
| * | drm/amdgpu/cz/dpm: properly report UVD and VCE clock levelsAlex Deucher2015-07-231-16/+45
| | | | | | | | | | | | | | | | | | | | | VCE, UVD DPM work similarly to SCLK DPM. Report the current clock levels for UVD and VCE via debugfs. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/amdgpu/cz: implement voltage validation properlyAlex Deucher2015-07-231-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | CZ uses a different set of registers compared to previous asics and supports separate NB and GFX planes. Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/amdgpu: add VCE harvesting instance queryLeo Liu2015-07-231-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
| * | drm/amdgpu: implement VCE 3.0 harvesting support (v4)Alex Deucher2015-07-232-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For boards with bad VCE blocks, only configure the working block. v2: use the harvest info for pipe setup v3: fix mask check as noted by Leo v4: add dGPU support Reviewed-by: Christian König <christian.koenig@amd.com> (v2) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/amdgpu/dce10: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer2015-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This doesn't seem strictly necessary with Tonga right now, but that might change with future power management enhancements. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
| * | drm/amdgpu/dce11: Re-set VBLANK interrupt state when enabling a CRTCMichel Dänzer2015-07-231-0/+4
| |/ | | | | | | | | | | | | | | | | | | Something (ATOM BIOS?) seems to be clobbering the LB_INTERRUPT_MASK register while the CRTC is off, which caused e.g. glxgears or gnome-shell to hang after a modeset. Reviewed-and-Tested-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
* | drm/ttm: recognize ARM64 arch in ioprot handlerAlexandre Courbot2015-07-241-1/+2
|/ | | | | | | | Return proper pgprot for ARM64. This is required for objects like Nouveau fences to be mapped with expected coherency. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ttm: improve uncached page deallocation.Jérôme Glisse2015-07-171-6/+6
| | | | | | | | | | | | | | Calls to set_memory_wb() incure heavy TLB flush and IPI cost. To minimize those wait until pool grow beyond batch size before draining the pool. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-and-Tested-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ttm: fix uncached page deallocation to properly fill page pool v3.Jérôme Glisse2015-07-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | Current code never allowed the page pool to actualy fill in anyway. This fix it, so that we only start freeing page from the pool when we go over the pool size. Changed since v1: - Move the page batching optimization to its separate patch. Changed since v2: - Do not remove code part of the batching optimization with this patch. - Better commit message. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-rockchip-2015-07-13' of ↵Dave Airlie2015-07-173-15/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/markyzq/kernel-drm-rockchip into drm-fixes misc rockchip fixes. * 'drm-rockchip-2015-07-13' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: vop: remove hardware cursor window drm/rockchip: vop: switch cursor plane to window 3 drm/rockchip: Drop owner assignment from platform_driver drm/rockchip: use drm_gem_mmap helpers drm/rockchip: only call drm_fb_helper_hotplug_event if fb_helper present drm/rockchip: Add BGR formats to VOP
| * drm/rockchip: vop: remove hardware cursor windowyao mark2015-07-131-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | hardware cursor windows only have some fixed size, and not support width virtual, when move hardware cursor windows outside of left, the display would be wrong, so this window can't for cursor now. And Tag hardware cursor window as a overlay is wrong, will make userspace wrong behaviour. So just remove the hardware cursor window Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
| * drm/rockchip: vop: switch cursor plane to window 3yao mark2015-07-131-3/+4
| | | | | | | | | | | | | | | | Window 1 support scale and yuv format, it's waste use it for a cursor, use window 3 is enough. Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org>
| * drm/rockchip: Drop owner assignment from platform_driverKrzysztof Kozlowski2015-07-131-1/+0
| | | | | | | | | | | | | | platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| * drm/rockchip: use drm_gem_mmap helpersDaniel Kurtz2015-07-131-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than (incompletely [0]) re-implementing drm_gem_mmap() and drm_gem_mmap_obj() helpers, call them directly from the rockchip mmap routines. Once the core functions return successfully, the rockchip mmap routines can still use dma_mmap_attrs() to simply mmap the entire buffer. [0] Previously, we were performing the mmap() without first taking a reference on the underlying gem buffer. This could leak ptes if the gem object is destroyed while userspace is still holding the mapping. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org
| * drm/rockchip: only call drm_fb_helper_hotplug_event if fb_helper presentHeiko Stübner2015-07-131-1/+2
| | | | | | | | | | | | | | | | | | Add a check for the presence of fb_helper to rockchip_drm_output_poll_changed() to only call drm_fb_helper_hotplug_event if there is actually a fb_helper available. Without this check I see NULL pointer dereferences when the hdmi hotplug irq fires before the fb_helper got initialized. Signed-off-by: Heiko Stuebner <heiko@sntech.de>
| * drm/rockchip: Add BGR formats to VOPTomasz Figa2015-07-131-0/+33
| | | | | | | | | | | | | | | | VOP can support BGR formats in all windows thanks to red/blue swap option provided in WINx_CTRL0 registers. This patch enables support for ABGR8888, XBGR8888, BGR888 and BGR565 formats by using this feature. Signed-off-by: Tomasz Figa <tfiga@chromium.org>
* | Merge tag 'imx-drm-fixes-2015-07-14' of ↵Dave Airlie2015-07-173-7/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm: fixes for parallel-display, imx-tve, and ipu-common These patches fix the parallel-display driver to use the standard OF graph bindings for connecting a drm_panel via device tree instead of an undocumented, driver specific device tree property, take care to disable all IPU interrupts before setting up the irq chip to fix a kexec lockup, and fix VGA output on i.MX53-QSB boards by correcting the media bus format set by the imx-tve driver. * tag 'imx-drm-fixes-2015-07-14' of git://git.pengutronix.de/git/pza/linux: drm/imx: tve: fix media bus format for VGA output GPU: ipu: fix lockup caused by pending chained interrupts drm/imx: parallel-display: fix drm_panel support
| * | drm/imx: tve: fix media bus format for VGA outputPhilipp Zabel2015-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit a7c6e76feeb1 ("drm/imx: switch to use media bus formats") accidentally replaced IPU_PIX_FMT_GBR24 with MEDIA_BUS_FMT_YUV8_1X24 instead of the correct MEDIA_BUS_FMT_GBR888_1X24. This patch is needed to fix VGA output in i.MX53. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | GPU: ipu: fix lockup caused by pending chained interruptsRussell King2015-07-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even with the oops fixed by a previous patch, the system still fails to kexec, due to a stuck chained interrupt locking the system. We must disable the child interrupts prior to setting up the irq chip to ensure we don't get stuck here. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
| * | drm/imx: parallel-display: fix drm_panel supportPhilipp Zabel2015-07-101-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parallel-display driver used an undocumented, non-standard property "fsl,panel" to optionally associate with a drm_panel device. This patch fixes the driver to use the same OF graph bindings as the LDB driver instead: parallel-display { compatible = "fsl,imx-parallel-display"; ... port@1 { reg = <1>; parallel_out: endpoint { remote_endpoint = <&panel_in>; }; }; }; panel { ... port { panel_in: endpoint { remote-endpoint = <&parallel_out>; }; }; }; Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>
* | | Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm ↵Dave Airlie2015-07-173-50/+78
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-fixes A range of fixes for the Armada DRM driver: - A missing wakeup could result in overlay frames being delayed, causing video playback to hiccup. - Avoid unmapping a dma-buf attachment which was never mapped - Fix the overlay when partially off the screen by switching to the drm_plane_helper_check_update() helper and using the calculated coordinates to set the start address. - Remove an incorrect assignment to crtc->mode - which should be the unadjusted mode. - Fix a missing call to drm_plane_cleanup() in the overlay code. * 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: drm/armada: avoid saving the adjusted mode to crtc->mode drm/armada: fix overlay when partially off-screen drm/armada: convert overlay to use drm_plane_helper_check_update() drm/armada: fix gem object free after failed prime import drm/armada: fix incorrect overlay plane cleanup drm/armada: fix missing overlay wake-up
| * | | drm/armada: avoid saving the adjusted mode to crtc->modeRussell King2015-07-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're not supposed to store the adjusted mode into crtc->mode. We don't use it anyway, so we can safely remove this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | drm/armada: fix overlay when partially off-screenRussell King2015-07-151-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the start address calculation when overlay is partially off screen. fb->bits_per_pixel is not set for YUV formats, and is always zero, which led to the first component always starting at zero. Use drm_format_plane_cpp() instead. This also revealed a problem in that YUYV formats toggle the U/V data for odd pixel start address offsets. We try to rectify that by toggling the U/V swap, which for the most part works, but seemingly introduces a flicker for one scan frame of swapped U/V. However, these changes result in an overall improvement. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | drm/armada: convert overlay to use drm_plane_helper_check_update()Russell King2015-07-151-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use drm_plane_helper_check_update() rather than our own code to validate and limit the size of the displayed image. As we are able to support scaling, permit the full scaling ability. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | drm/armada: fix gem object free after failed prime importRussell King2015-07-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the gem object freeing after a partial import of a dma buffer, eg, one which has been imported, but not mapped. This was provoking a warning from the dma_buf code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | drm/armada: fix incorrect overlay plane cleanupRussell King2015-07-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Armada overlay plane wasn't being properly cleaned up as it was missing a call to drm_plane_cleanup(). It also wasn't freeing the right type of pointer (although we were still freeing the right pointer value.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | drm/armada: fix missing overlay wake-upRussell King2015-07-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing was waking up the overlay plane wait queue, so we were fully reliant on the HZ/25 wait timing out to make progress. Fix the lack of wake-up. We were also mis-handling the wait_event_timeout() return value - this returns an unsigned integer of the remaining time, or zero on timeout and the condition evaluated false. Checking this for less than zero is not sane. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | Merge tag 'drm-intel-fixes-2015-07-15' of ↵Dave Airlie2015-07-1713-63/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-fixes Next batch of i915 fixes. Note that the compat32 patch here needs the drm core one to be actually useful, I'll send you that one with a separate drm-fixes pull request. One revert because a fix in -rc2 did break existing userspace. * tag 'drm-intel-fixes-2015-07-15' of git://anongit.freedesktop.org/drm-intel: drm/i915: Do not call intel_crtc_disable if the crtc is already disabled. Revert "drm/i915: Declare the swizzling unknown for L-shaped configurations" drm/i915: Forward all core DRM ioctls to core compat handling drm/i915: fix oops in primary_check_plane drm/i915: remove unused has_dma_mapping flag drm/i915: Fix missing return warning for !CONFIG_DEBUGFS drm/i915: avoid leaking DMA mappings drm/i915: Snapshot seqno of most recently submitted request. drm/i915: Store device pointer in contexts for late tracepoint usafe
| * | | | drm/i915: Do not call intel_crtc_disable if the crtc is already disabled.Maarten Lankhorst2015-07-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resuming with dpms off, the following warn can happen: [ 118.334082] ------------[ cut here ]------------ [ 118.334105] WARNING: CPU: 2 PID: 2274 at drivers/gpu/drm/i915/intel_display.c:6319 __intel_set_mode+0xae5/0xb90 [i915]() [ 118.334106] WARN_ON(!crtc->state->enable) [ 118.334137] Modules linked in: i915 [ 118.334139] CPU: 2 PID: 2274 Comm: kworker/u16:117 Not tainted 4.2.0-rc2-fixes+ #4148 [ 118.334140] Hardware name: LENOVO 2349AV8/2349AV8, BIOS G1ETA5WW (2.65 ) 04/15/2014 [ 118.334144] Workqueue: events_unbound async_run_entry_fn [ 118.334147] ffffffffc017eef0 ffff8800ada93998 ffffffff817aa62a 0000000080000001 [ 118.334149] ffff8800ada939e8 ffff8800ada939d8 ffffffff810807e1 ffff8800ada939c8 [ 118.334151] ffff8800cea3b3d8 0000000000000000 ffff8800ad86b008 ffff880117705668 [ 118.334151] Call Trace: [ 118.334155] [<ffffffff817aa62a>] dump_stack+0x4f/0x7b [ 118.334157] [<ffffffff810807e1>] warn_slowpath_common+0x81/0xc0 [ 118.334158] [<ffffffff81080861>] warn_slowpath_fmt+0x41/0x50 [ 118.334173] [<ffffffffc0120375>] __intel_set_mode+0xae5/0xb90 [i915] [ 118.334188] [<ffffffffc0121312>] ? intel_modeset_compute_config+0x52/0xb40 [i915] [ 118.334191] [<ffffffff8144de53>] ? drm_atomic_set_fb_for_plane+0x63/0x80 [ 118.334205] [<ffffffffc01269d9>] intel_set_mode+0x29/0x60 [i915] [ 118.334219] [<ffffffffc012730a>] intel_crtc_restore_mode+0x13a/0x1f0 [i915] [ 118.334232] [<ffffffffc0101160>] ? gen6_write16+0x250/0x250 [i915] [ 118.334246] [<ffffffffc01283ec>] intel_modeset_setup_hw_state+0x89c/0xcd0 [i915] [ 118.334248] [<ffffffff8137d260>] ? pci_pm_thaw+0x90/0x90 [ 118.334255] [<ffffffffc00ac11b>] i915_drm_resume+0xcb/0x160 [i915] [ 118.334262] [<ffffffffc00ac1d2>] i915_pm_resume+0x22/0x30 [i915] [ 118.334263] [<ffffffff8137d2c3>] pci_pm_resume+0x63/0xa0 [ 118.334266] [<ffffffff81467550>] dpm_run_callback+0x70/0x420 [ 118.334267] [<ffffffff81467cbd>] device_resume+0x9d/0x1c0 [ 118.334269] [<ffffffff814673d0>] ? initcall_debug_start+0x60/0x60 [ 118.334270] [<ffffffff81467dfc>] async_resume+0x1c/0x50 [ 118.334271] [<ffffffff810a6a94>] async_run_entry_fn+0x34/0xd0 [ 118.334273] [<ffffffff8109d4ad>] process_one_work+0x1dd/0x7e0 [ 118.334275] [<ffffffff8109d41a>] ? process_one_work+0x14a/0x7e0 [ 118.334276] [<ffffffff8109daf9>] worker_thread+0x49/0x450 [ 118.334278] [<ffffffff8109dab0>] ? process_one_work+0x7e0/0x7e0 [ 118.334280] [<ffffffff810a3cb9>] kthread+0xf9/0x110 [ 118.334282] [<ffffffff810a3bc0>] ? insert_kthread_work+0x90/0x90 [ 118.334284] [<ffffffff817b414f>] ret_from_fork+0x3f/0x70 [ 118.334286] [<ffffffff810a3bc0>] ? insert_kthread_work+0x90/0x90 [ 118.334287] ---[ end trace 01f2cf6371b82d7a ]--- This warn is harmless, and can be fixed by not calling intel_crtc_disable when the crtc is already disabled. Reported-and-Tested-by: Jörg Otte <jrg.otte@gmail.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
OpenPOWER on IntegriCloud