aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-09-08drm/exynos: Remove useless EXPORT_SYMBOL_GPLsHEADmasterDaniel Kurtz2-9/+0
All the user of these functions are inside exynos-drm driver and you don't need to export the symbols for that case. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add cursor plane supportGustavo Padovan7-10/+23
Set one of the planes for each crtc driver as a cursor plane enabled window managers to fully work on exynos. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> --- v2: use the top window for cursor on each crtc
2015-09-08drm/exynos: add global macro for the default primary planeGustavo Padovan6-18/+13
Define DEFAULT_WIN as zero to help set the primary plane on all CRTCs. Some CRTCs were defining a variable to store the default window, but that is not necessary as the default (primary) window is always the window zero. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to DECON 7Gustavo Padovan1-72/+53
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to DECON 5433Gustavo Padovan1-50/+39
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: Enable DP clock directly from FIMDGustavo Padovan3-36/+21
Instead of having a .clock_enable callback enable the dp clock directly from FIMD. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to FIMDGustavo Padovan3-56/+37
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: Remove exynos_crtc commit() callbackGustavo Padovan2-12/+0
This callback is no longer used by any of the exynos_crtc drivers, remove it. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: remove exynos_crtc commit() callbackGustavo Padovan1-1/+0
It turns out that .commit() was never executed, because at the time .mode_set_nofb() called it ctx->suspended was still false and .commit() would return. It removes the callback from FIMD DECON 7 and DECON 5433. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to MixerGustavo Padovan1-64/+61
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to HDMIGustavo Padovan1-17/+39
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: add pm_runtime to DPGustavo Padovan1-14/+26
Let pm_runtime handle the enabling/disabling of the device with proper refcnt instead of rely on specific flags to track the enabled state. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-08drm/exynos: do not start enabling DP at bind() phaseGustavo Padovan1-4/+0
The DP device will be properly enabled at the enable() call just after the bind call finishes. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2015-09-05Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie22-52/+127
into drm-next A few more fixes for amdgpu from the last few days: - Fix several copy paste typos - Resume from suspend fixes for VCE - Fix the GPU scheduler warning in kfifo_out - Re-enable GPUVM fault interrupts which were inadvertently disabled - GPUVM page table hang fix when paging * 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: rename gmc_v8_0_init_compute_vmid drm/amdgpu: fix vce3 instance handling drm/amdgpu: remove ib test for the second VCE Ring drm/amdgpu: properly enable VM fault interrupts drm/amdgpu: fix warning in scheduler drm/amdgpu: fix buffer placement under memory pressure drm/amdgpu/cz: fix cz_dpm_update_low_memory_pstate logic drm/amdgpu: fix typo in dce11 watermark setup drm/amdgpu: fix typo in dce10 watermark setup drm/amdgpu: use top down allocation for non-CPU accessible vram drm/amdgpu: be explicit about cpu vram access for driver BOs (v2)
2015-09-04drm/amdgpu: rename gmc_v8_0_init_compute_vmidAlex Deucher1-3/+3
It should be gfx_v8_0_init_compute_vmid since it's part of the gfx block. Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-04drm/amdgpu: fix vce3 instance handlingAlex Deucher1-6/+42
Need to properly handle the instances for the idle checks and soft reset. Acked-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-04drm/amdgpu: remove ib test for the second VCE RingLeo Liu1-0/+4
it seems the VCE ring 1 ib test not reliable, remove it for now. 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> Tested-and-Reviewed-by: Sonny Jiang <sonny.jiang@amd.com>
2015-09-04drm/amdgpu: properly enable VM fault interruptsChristian König2-15/+18
This fixes not printing VM faults. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-04drm/amdgpu: fix warning in schedulerAlex Deucher1-2/+3
This should never happen so warn when the count does not equal the expected size. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-04Merge tag 'drm-intel-next-fixes-2015-09-02' of ↵Dave Airlie12-82/+147
git://anongit.freedesktop.org/drm-intel into drm-next i915 display fixes headed for v4.3. Mostly SKL, but some regression fixes too. * tag 'drm-intel-next-fixes-2015-09-02' of git://anongit.freedesktop.org/drm-intel: i915: Set ddi_pll_sel in DP MST path drm/i915: Don't use link_bw for PLL setup drm/i915: Preserve SSC earlier drm/i915/skl: Adding DDI_E power well domain drm/i915: eDP can be present on DDI-E drm/i915/skl: Enable DDI-E drm/i915: Enable HDMI on DDI-E drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6 drm/i915: Check DP link status on long hpd too drm/i915: set CDCLK if DPLL0 enabled during resuming from S3
2015-09-04Merge branch 'drm-rockchip-2015-08-26' of ↵Dave Airlie2-9/+348
https://github.com/markyzq/kernel-drm-rockchip into drm-next Here are some fixes and some new features for rockchip drm, tested on popmetal rk3288 board, can you land them? * 'drm-rockchip-2015-08-26' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: vop: support plane scale drm/rockchip: vop: restore vop registers when resume drm/rockchip: vop: Default enable win2/3 area0 bit drm/rockchip: vop: Add yuv plane support drm/rockchip: vop: Fix window dest start point drm/rockchip: vop: Fix virtual stride calculation
2015-09-04Merge tag 'vmwgfx-next-15-09-01' of ↵Dave Airlie2-1/+12
git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2015-09-01 A single commit. Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1227193 * tag 'vmwgfx-next-15-09-01' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Allow dropped masters render-node like access on legacy nodes v2
2015-09-04Merge branch 'exynos-drm-next' of ↵Dave Airlie5-156/+110
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next This is a last pull request, which includes two g2d patches I missed, and more cleanup series of Exynos drm driver. The cleanup series makes Exynos drm driver more simple, and removes unnecessary codes, and considers multiple plane format of framebuffer. I hope this not to be late. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: remove buf_cnt from struct exynos_drm_fb drm/exynos: remove exynos_drm_fb_get_buf_cnt() drm/exynos: cleanup exynos_user_fb_create() drm/exynos: update exynos_drm_framebuffer_init() for multiple buffers drm/exynos: cleanup to get gem object for fb drm/exynos: update fb_info via only one function drm/exynos: cleanup exynos_drm_fbdev_update() drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c drm/exynos: remove exynos_drm_fb_set_buf_cnt() drm/exynos: remove superfluous checks in g2d_check_reg_offset() drm/exynos: fix size check in g2d_check_buf_desc_is_valid()
2015-09-04Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie29-164/+360
into drm-next More fixes for radeon and amdgpu for 4.3: - Send full DP aux address fixes for radeon and amdgpu - Fix an HDMI display regression for pre-DCE5 parts - UVD suspend fixes for amdgpu - Add an rs480 suspend quirk - Fix bo reserve handling in amdgpu GEM_OP ioctl - GPU scheduler fixes - SDMA optimizations - MEC fix for Fiji * 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux: (21 commits) drm/amdgpu: set MEC doorbell range for Fiji drm/amdgpu: implement burst NOP for SDMA drm/amdgpu: add insert_nop ring func and default implementation drm/amdgpu: add amdgpu_get_sdma_instance helper function drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCES drm/amdgpu: add burst_nop flag for sdma drm/amdgpu: add count field for the SDMA NOP packet v2 drm/amdgpu: use PT for VM sync on unmap drm/amdgpu: make wait_event uninterruptible in push_job drm/amdgpu: fix amdgpu_bo_unreserve order in GEM_OP IOCTL v2 drm/amdgpu: partially revert "modify amdgpu_fence_wait_any() to amdgpu_fence_wait_multiple()" v2 Add radeon suspend/resume quirk for HP Compaq dc5750. drm/amdgpu: re-work sync_resv drm/amdgpu/atom: Send out the full AUX address drm/radeon/native: Send out the full AUX address drm/radeon/atom: Send out the full AUX address drm/amdgpu: use IB for fill_buffer instead of direct command drm/amdgpu: stop trying to suspend UVD sessions v2 drm/amdgpu: add scheduler dependency callback v2 drm/amdgpu: let the scheduler work more with jobs v2 ...
2015-09-03drm/amdgpu: fix buffer placement under memory pressureChristian König1-1/+1
Some buffers (UVD/VM page tables) must be placed in VRAM, but the byte restriction for moving buffers didn't took this into account. Port of radeon commit 4b09556660bfe1b43d72ca858524c6baf2c6cb1d. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-09-03drm/amdgpu/cz: fix cz_dpm_update_low_memory_pstate logicAlex Deucher1-2/+2
The logic was reversed. This feature is not enabled at the moment, but fix it now for the future. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-03drm/amdgpu: fix typo in dce11 watermark setupAlex Deucher1-1/+1
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-09-03drm/amdgpu: fix typo in dce10 watermark setupAlex Deucher1-1/+1
Using the wrong watermwark value for the secondary watermark. Copy paste typo. Noticed by Mykola. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-09-03drm/amdgpu: use top down allocation for non-CPU accessible vramAlex Deucher1-1/+1
Should help avoid fragmentation of vram due to CPU access requirements. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-03drm/amdgpu: be explicit about cpu vram access for driver BOs (v2)Alex Deucher12-20/+51
For kernel driver BOs, be explicit about whether we need vram access up front. This avoids unecessary migrations and avoids using visible vram for buffers were it's not needed. v2: line wrap fixes Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: set MEC doorbell range for FijiJammy Zhou1-1/+2
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: implement burst NOP for SDMAJammy Zhou3-15/+86
Customize the insert_nop func for SDMA rings, and use burst NOP for ring/IB submissions in other places as well Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: add insert_nop ring func and default implementationJammy Zhou12-3/+36
The insert_nop function is added to amdgpu_ring_funcs structure as well as the default implementation Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: add amdgpu_get_sdma_instance helper functionJammy Zhou1-0/+15
This function is added to map the ring to sdma instance Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: add AMDGPU_MAX_SDMA_INSTANCESJammy Zhou1-1/+4
Remove the hardcoded usage Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: add burst_nop flag for sdmaJammy Zhou4-0/+7
The burst NOP is supported for SDMA when feature_version is >= 20. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: add count field for the SDMA NOP packet v2Jammy Zhou3-0/+11
This is added to support the burst NOP v2: squash the typo fix Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02drm/amdgpu: use PT for VM sync on unmapChristian König1-13/+6
Instead of the array which is used for ID management. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-09-02drm/amdgpu: make wait_event uninterruptible in push_jobChunming Zhou1-4/+3
with interruptible, the push_job maybe return -ERESTARTSYS, then result in push_job error. E.g. bug trace: [ 181.618860] *****amdgpu_copy_buffer:fence->seq:0x0000000048d8758b, contxt:1207959552, ref:683967304, r:-512 [ 181.618929] BUG: unable to handle kernel paging request at ffffffff811aa266 [ 181.625887] IP: [<ffffffff81548ffc>] reservation_object_add_excl_fence+0x3c/0x120 ... [ 181.859767] [<ffffffff811aa266>] ? unmap_mapping_range+0x66/0x110 [ 181.865928] [<ffffffffc0608ac1>] ttm_bo_move_accel_cleanup+0x41/0x3c0 [ttm] [ 181.872971] [<ffffffffc062d382>] amdgpu_move_blit.isra.18+0x122/0x150 [amdgpu] [ 181.880254] [<ffffffff811aa266>] ? unmap_mapping_range+0x66/0x110 [ 181.886420] [<ffffffffc062d709>] amdgpu_bo_move+0xa9/0x200 [amdgpu] [ 181.892753] [<ffffffffc0606e8d>] ttm_bo_handle_move_mem+0x26d/0x5c0 [ttm] Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-09-02drm/amdgpu: fix amdgpu_bo_unreserve order in GEM_OP IOCTL v2Christian König1-1/+4
No copy_(to|from)_user while BO is reserved. v2: handle default path as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
2015-09-02drm/amdgpu: partially revert "modify amdgpu_fence_wait_any() to ↵Christian König3-43/+16
amdgpu_fence_wait_multiple()" v2 That isn't used any more. v2: rebase Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-09-02Add radeon suspend/resume quirk for HP Compaq dc5750.Jeffery Miller1-0/+8
With the radeon driver loaded the HP Compaq dc5750 Small Form Factor machine fails to resume from suspend. Adding a quirk similar to other devices avoids the problem and the system resumes properly. Signed-off-by: Jeffery Miller <jmiller@neverware.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-09-02drm/amdgpu: re-work sync_resvChunming Zhou1-6/+18
sync_resv is to handle both amdgpu_fence and sched_fence. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
2015-09-02drm/amdgpu/atom: Send out the full AUX addressAlex Deucher1-1/+2
AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits. Port of: drm/radeon/atom: Send out the full AUX address to amdgpu Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-09-02drm/exynos: remove buf_cnt from struct exynos_drm_fbJoonyoung Shim1-9/+0
Looking other drm drivers, there is no the restriction that framebuffer has only one buffer in .create_handle() callback. They use just first buffer. If this limitation is removed, there is no reason keeping buffer count for framebuffer, so we can remove buf_cnt from struct exynos_drm_fb. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: remove exynos_drm_fb_get_buf_cnt()Joonyoung Shim3-13/+1
We can get buffer count of framebuffer using drm_format_num_planes(), so keeping exynos_drm_fb_get_buf_cnt() is unnecessary. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: cleanup exynos_user_fb_create()Joonyoung Shim1-34/+13
Using exynos_drm_framebuffer_init(), redundant codes can be removed. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: update exynos_drm_framebuffer_init() for multiple buffersJoonyoung Shim3-19/+25
This modifies exynos_drm_framebuffer_init() to be possible to support multiple buffers. Then it can be used by exynos_user_fb_create(). Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: cleanup to get gem object for fbJoonyoung Shim1-15/+8
Current codes get first gem object and then again get remain gem objects. They can be unified to one routine. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: update fb_info via only one functionJoonyoung Shim1-16/+13
This patch moves codes to update fb_info into exynos_drm_fbdev_update(), so fb_info is updated via only one function. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: cleanup exynos_drm_fbdev_update()Joonyoung Shim1-11/+4
It can get exynos_gem object via function argument, so no need to call exynos_drm_fb_gem_obj() in exynos_drm_fbdev_update. It also can get struct drm_framebuffer *fb via helper->fb, so can remove a function argument for it. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.cJoonyoung Shim1-16/+14
The variable name "exynos_gem_obj" is too long, so some lines exceed 80 characters. It's simple to use "obj" instead of "exynos_gem_obj". Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: remove exynos_drm_fb_set_buf_cnt()Joonyoung Shim3-17/+3
The exynos_drm_fb_set_buf_cnt() is used to set buffer count only in exynos_drm_fbdev_update(). This patch sets directly buffer count in exynos_drm_framebuffer_init() without using exynos_drm_fb_set_buf_cnt(), so there is no any reason to keep exynos_drm_fb_set_buf_cnt(). Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: remove superfluous checks in g2d_check_reg_offset()Tobias Jakobi1-8/+0
The cases of the switch statement ensure that reg_type can never be REG_TYPE_NONE here. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-02drm/exynos: fix size check in g2d_check_buf_desc_is_valid()Tobias Jakobi1-10/+41
The size check was incomplete. It only computed the size of area of the drawing rectangle and checked if the size still fit inside the buffer. The correct check is to compute the position of the last byte that the G2D engine is going to access and then check if that position is still contained in the buffer. In particular we need the stride information to determine this. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-09-01i915: Set ddi_pll_sel in DP MST pathAnder Conselvan de Oliveira3-1/+7
The DP MST encoder config function never sets ddi_pll_sel, even though its value is programmed in its ->pre_enable() hook. That used to work because a new pipe_config was kzalloc'ed at every modeset, and the value of zero selects the highest clock for the PLL. Starting with the commit below, the value of ddi_pll_sel is preserved through modesets, and since the correct value wasn't properly setup by the MST code, it could lead to warnings and blank screens. commit 8504c74c7ae48b4b8ed1f1c0acf67482a7f45c93 Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Date: Fri May 15 11:51:50 2015 +0300 drm/i915: Preserve ddi_pll_sel when allocating new pipe_config Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91628 Cc: stable@vger.kernel.org # 7e6313a2516d drm/i915: Don't use link_bw for PLL setup Cc: stable@vger.kernel.org Cc: Timo Aaltonen <tjaalton@ubuntu.com> Cc: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-09-01drm/i915: Don't use link_bw for PLL setupVille Syrjälä2-29/+26
Use port_clock instead of link_bw when picking the PLL parameters for DP. link_bw may be zero with an eDP 1.4 sink that supports DP_LINK_RATE_SET so we shouldn't use it for anything other than feed it to the sink appropriately. v2: Fix typo in commit message (Sivakumar) Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> [Jani: cherry-picked from future.] Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-09-01drm/vmwgfx: Allow dropped masters render-node like access on legacy nodes v2Thomas Hellstrom2-1/+12
Applications like gnome-shell may try to render after dropping master privileges. Since the driver should now be safe against this scenario, allow those applications to use their legacy node like a render node. v2: Add missing return statement. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
2015-09-01drm/i915: Preserve SSC earlierLukas Wunner1-11/+18
Commit 92122789b2d6 ("drm/i915: preserve SSC if previously set v3") added code to intel_modeset_gem_init to override the SSC status read from VBT with the SSC status set by BIOS. However, intel_modeset_gem_init is invoked *after* intel_modeset_init, which calls intel_setup_outputs, which *modifies* SSC status by way of intel_init_pch_refclk. So unlike advertised, intel_modeset_gem_init doesn't preserve the SSC status set by BIOS but whatever intel_init_pch_refclk decided on. This is a problem on dual gpu laptops such as the MacBook Pro which require either a handler to switch DDC lines, or the discrete gpu to proxy DDC/AUX communication: Both the handler and the discrete gpu may initialize after the i915 driver, and consequently, an LVDS connector may initially seem disconnected and the SSC therefore is disabled by intel_init_pch_refclk, but on reprobe the connector may turn out to be connected and the SSC must then be enabled. Due to 92122789b2d6 however, the SSC is not enabled on reprobe since it is assumed BIOS disabled it while in fact it was disabled by intel_init_pch_refclk. Also, because the SSC status is preserved so late, the preserved value only ever gets used on resume but not on panel initialization: intel_modeset_init calls intel_init_display which indirectly calls intel_panel_use_ssc via multiple subroutines, *before* the BIOS value overrides the VBT value in intel_modeset_gem_init (intel_panel_use_ssc is the sole user of dev_priv->vbt.lvds_use_ssc). Fix this by moving the code introduced by 92122789b2d6 from intel_modeset_gem_init to intel_modeset_init before the invocation of intel_setup_outputs and intel_init_display. Add a DRM_DEBUG_KMS as suggested way back by Jani: http://lists.freedesktop.org/archives/intel-gfx/2014-June/046666.html Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Paul Hordiienko <pvt.gord@gmail.com> [MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina] Tested-by: William Brown <william@blackhats.net.au> [MBP 8,2 2011 intel SNB + amd turks pre-retina] Tested-by: Lukas Wunner <lukas@wunner.de> [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina] Tested-by: Bruno Bierbaumer <bruno@bierbaumer.net> [MBP 11,3 2013 intel HSW + nvidia GK107 retina -- work in progress] Fixes: 92122789b2d6 ("drm/i915: preserve SSC if previously set v3") Signed-off-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/i915/skl: Adding DDI_E power well domainXiong Zhang4-1/+7
From B spec, DDI_E port belong to PowerWell 2, but DDI_E share the powerwell_req/staus register bit with DDI_A which belong to DDI_A_E_POWER_WELL. In order to communicate with the connector on DDI-E, both DDI_A_E_POWER_WELL and POWER_WELL_2 must be enabled. Currently intel_dp_power_get(DDI_E) only enable DDI_A_E_POWER_WELL, this patch will not only enable DDI_a_E_POWER_WELL but also enable POWER_WELL_2. This patch also fix the DDI-E hotplug function. Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/radeon/native: Send out the full AUX addressAlex Deucher1-2/+2
AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits. Port of: drm/radeon/atom: Send out the full AUX address to radeon non-atom aux path Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-08-31drm/radeon/atom: Send out the full AUX addressVille Syrjälä1-2/+3
AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-08-31drm/i915: eDP can be present on DDI-ERodrigo Vivi2-9/+5
Enable eDP on DDI-E. Also let's remove duplicated definitions to avoid later confusion. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Xiong Zhang <xiong.y.zhang@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/i915/skl: Enable DDI-ERodrigo Vivi3-7/+18
There are OEMs using DDI-E out there, so let's enable it. Unfortunately there is no detection bit for DDI-E So we need to rely on VBT for that. I also need to give credits to Xiong since before seing his approach to check info->support_* I was creating an ugly vbt->ddie_sfuse_strap in order to propagate the ddi presence info v2: Rebased as last patch in the series. since all other patches in this series are needed for anything working propperly on DDI-E. Credits-to: "Zhang, Xiong Y" <xiong.y.zhang@intel.com> Cc: "Zhang, Xiong Y" <xiong.y.zhang@intel.com> Reviewed-by: Xiong Zhang <xiong.y.zhang@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/i915: Enable HDMI on DDI-EXiong Zhang3-4/+47
DDI-E doesn't have the correspondent GMBUS pin. We rely on VBT to tell us which one it being used instead. The DVI/HDMI on shared port couldn't exist. This patch isn't tested without hardware wchich has HDMI on DDI-E. v2: fix trailing whitespace v3: MISSING_CASE take place of BUG() Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6Imre Deak1-6/+9
commit da2bc1b9db3351addd293e5b82757efe1f77ed1d Author: Imre Deak <imre.deak@intel.com> Date: Thu Oct 23 19:23:26 2014 +0300 drm/i915: add poweroff_late handler introduced a regression on old platforms during hibernation. A workaround was added in commit ab3be73fa7b43f4c3648ce29b5fd649ea54d3adb Author: Imre Deak <imre.deak@intel.com> Date: Mon Mar 2 13:04:41 2015 +0200 drm/i915: gen4: work around hang during hibernation using an explicit blacklist for the GENs/BIOS vendors where the issue was reported. Later there we had reports of the same failure on platforms not on this list. To my best knowledge the correct thing to do is still to put the device to PCI D3 state during hibernation, see [1] and [2] for the reasons. This also aligns with our future plans to unify more the runtime and system suspend/resume paths. Since an exact blacklist seems to be impractical (multiple GENs and BIOS vendors are affected) apply the workaround on everything pre GEN6. [1] http://lists.freedesktop.org/archives/intel-gfx/2015-February/060710.html [2] https://lkml.org/lkml/2015/6/22/274 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95061 Reported-by: Ilya Tumaykin <itumaykin@gmail.com> Reported-by: Dirk Griesbach <spamthis@freenet.de> Reported-by: Pavel Machek <pavel@ucw.cz> Reported-by: Mikko Rapeli <mikko.rapeli@iki.fi> Tested-by: Mikko Rapeli <mikko.rapeli@iki.fi> Reported-by: Paul Bolle <pebolle@tiscali.nl> CC: stable@vger.kernel.org Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31drm/i915: Check DP link status on long hpd tooVille Syrjälä1-6/+5
We are no longer checkling the DP link status on long hpd. We used to do that from the .hot_plug() handler, but it was removed when MST got introduced. If there's no userspace we now fail to retrain the link if the sink power is toggled (or cable yanked and replugged), meaning the user is left staring at a blank screen. With the retraining put back that should be fixed. Also remove the leftover comment that referred to the old retraining from .hot_plug(). Fixes a regression introduced in: commit 0e32b39ceed665bfa4a77a4bc307b6652b991632 Author: Dave Airlie <airlied@redhat.com> Date: Fri May 2 14:02:48 2014 +1000 drm/i915: add DP 1.2 MST support (v0.7) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89453 Tested-by: Palmer Dabbelt <palmer@dabbelt.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91407 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89461 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89594 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85641 Cc: Dave Airlie <airlied@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-31Merge branch 'exynos-drm-next' of ↵Dave Airlie14-153/+452
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next This is a second pull-request which adds last part of atomic modeset/pageflip support, render node support, clean-up, and fix-up. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: fix build warning to exynos_drm_gem.c drm/exynos: Properly report supported formats for each device drm/exynos: add render node support drm/exynos: implement atomic_{begin/flush} of DECON drm/exynos: remove legacy ->suspend()/resume() drm/exynos: Enable atomic modesetting feature drm/exynos: remove wait queue for pending page flip drm/exynos: wait all planes updates to finish drm/exynos: add atomic asynchronous commit drm/exynos: fimd: only finish update if START == START_S drm/exynos: add macro to get the address of START_S reg drm/exynos: check for pending fb before finish update drm/exynos: fimd: move window protect code to prepare/cleanup_plane drm/exynos: add prepare and cleanup phases for planes drm/exynos: fimd: unify call to exynos_drm_crtc_finish_pageflip() drm/exynos: don't track enabled state at exynos_crtc
2015-08-31Merge tag 'drm-intel-next-fixes-2015-08-28' of ↵Dave Airlie10-94/+165
git://anongit.freedesktop.org/drm-intel into drm-next Some i915 fixes headed for v4.3. SKL DDI-E is a wip, but here's the first in a series. * tag 'drm-intel-next-fixes-2015-08-28' of git://anongit.freedesktop.org/drm-intel: drm/i915/skl: enable DDI-E hotplug drm/i915: Fix build warning on 32-bit drm/i915/skl: Update DDI buffer translation programming. drm/i915: Allow parsing of variable size child device entries from VBT drm/i915: fix link rates reported for SKL drm/i915: fix VBT parsing for SDVO child device mapping
2015-08-31Merge tag 'drm-amdkfd-next-fixes-2015-08-30' of ↵Dave Airlie2-2/+2
git://people.freedesktop.org/~gabbayo/linux into drm-next Just one small fix before 4.3 merge window: - Use linux/mman.h instead of uapi's mman-common.h inside the driver. * tag 'drm-amdkfd-next-fixes-2015-08-30' of git://people.freedesktop.org/~gabbayo/linux: amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h>
2015-08-31drm/exynos: fix build warning to exynos_drm_gem.cInki Dae1-1/+1
Signed-off-by: Inki Dae <daeinki@gmail.com>
2015-08-31drm/exynos: Properly report supported formats for each deviceMarek Szyprowski7-14/+73
Exynos DRM reported that all planes for all supported sub-devices supports only three pixel formats: XRGB24, ARGB24 and NV12. This patch lets each Exynos DRM sub-drivers to provide the list of supported pixel formats and registers this list to DRM core. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: add render node supportJoonyoung Shim1-19/+19
This patch allows clients who want to use render node to access rendering relevant ioctls - g2d, post processor and gem allocation. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: implement atomic_{begin/flush} of DECONHyungwon Hwang2-13/+51
Each CRTC's atomic_{begin/flush} must stop/start the update of shadow registers to active register in the functions. This patch achieves these purpose by moving the setting of protection bits to those functions from decon_update_plane. v2: rebased to the branch exynos-drm-next Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: remove legacy ->suspend()/resume()Gustavo Padovan1-2/+0
These legacy helpers should only be used by shadow-attaching drivers. KMS drivers has its own way to handle suspend/resume and don't need to use these two helpers. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <daeinki@gmail.com>
2015-08-31drm/exynos: Enable atomic modesetting featureGustavo Padovan1-1/+2
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Now that atomic modesetting is implemented for exynos enable the DRIVER_ATOMIC flag on the driver's features. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: remove wait queue for pending page flipGustavo Padovan2-11/+1
Exynos atomic commit procedures already does this job of waiting for pending updates to finish, that means using pending_flip_queue is pointless now because the disable CRTC procedure will never happen during a page_flip. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: wait all planes updates to finishGustavo Padovan4-6/+61
Add infrastructure to wait for all planes updates to finish by using an atomic_t variable to track how many pending updates we are waiting plus a wait_queue for the wait part. It also changes vblank behaviour and keeps it enabled for all types of updates Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: add atomic asynchronous commitGustavo Padovan3-35/+124
The atomic modesetting interfaces supports async commits that should be implemented by the drivers. If drm core requests an async commit exynos_atomic_commit() will now schedule a work task to run the update later. It also serializes commits that needs to run on the same crtc, putting the following commit to wait until the current one is finished. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: fimd: only finish update if START == START_SGustavo Padovan1-2/+6
fimd_update_plane() programs BUF_START[win] and during the update BUF_START[win] is copied to BUF_START_S[win] (its shadow register) and starts scanning out, then it raises a irq. The fimd_irq_handler, in the case we have a pending_fb, will check the fb value was copied to START_S register and finish the update in case of success. Based on patch from Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: add macro to get the address of START_S regGustavo Padovan1-0/+1
This macro is need to get the value of the START shadow register, that will tell if an framebuffer is currently displayed on the screen or not. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: check for pending fb before finish updateGustavo Padovan9-9/+54
The current code was ignoring the end of update for all overlay planes, caring only for the primary plane update in case of pageflip. This change adds a change to start to check for pending updates for all planes through exynos_plane->pending_fb. At the start of plane update the pending_fb is set with the fb to be shown on the screen. Then only when to fb is already presented in the screen we set pending_fb to NULL to signal that the update was finished. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com> fixup! drm/exynos: check for pending fb before finish update
2015-08-31drm/exynos: fimd: move window protect code to prepare/cleanup_planeGustavo Padovan1-23/+34
Only set/clear the update bit in the CRTC's .atomic_begin()/flush() so all planes are really committed at the same time. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: add prepare and cleanup phases for planesGustavo Padovan2-0/+25
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk> .prepare_plane() and .cleanup_plane() allows to perform extra operations before and after the update of planes. For FIMD for example this will be used to enable disable the shadow protection bit. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: fimd: unify call to exynos_drm_crtc_finish_pageflip()Gustavo Padovan1-5/+5
Unify handling of finished plane update to prepare for a following patch that will check for the START and START_S regs to really make sure that the plane was updated. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-31drm/exynos: don't track enabled state at exynos_crtcGustavo Padovan2-17/+0
struct drm_crtc already stores the enabled state of the crtc thus we don't need to replicate enabled in exynos_drm_crtc. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-08-30amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h>Christoph Hellwig2-2/+2
The latter is a default version of <asm/mman.h> and not for driver use. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-08-28drm/amdgpu: use IB for fill_buffer instead of direct commandChunming Zhou4-20/+20
Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-28drm/amdgpu: stop trying to suspend UVD sessions v2Christian König2-24/+19
Saving the current UVD state on suspend and restoring it on resume just doesn't work reliable. Just close cleanup all sessions on suspend. Ported from radeon commit "12e49feadff6d7b7ebbe852b36943a71524d8d34". v2: rebased Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
2015-08-28drm/amdgpu: add scheduler dependency callback v2Christian König5-0/+55
This way the scheduler doesn't wait in it's work thread any more. v2: fix race conditions Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-28drm/amdgpu: let the scheduler work more with jobs v2Christian König1-24/+37
v2: fix another race condition Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-28drm/radeon: fix HDMI quantization_range for pre-DCE5 asicsAlex Deucher1-7/+9
Support for output_csc is only available on DCE5 and newer so don't mess with the HDMI quantization_range on pre-DCE5 asics. bug: https://bugs.freedesktop.org/show_bug.cgi?id=83226 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2015-08-28drm/i915: set CDCLK if DPLL0 enabled during resuming from S3Gary Wang1-8/+5
Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then driver needs to set CDCLK to avoid display corruption if DPLL0 enabled. References: https://bugs.freedesktop.org/show_bug.cgi?id=91697 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Cooper Chiou <cooper.chiou@intel.com> Reviewed-by: Wei Shun Chang <wei.shun.chang@intel.com> Tested-by: Gary Wang <gary.c.wang@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Gavin Hindman <gavin.hindman@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Xiong Y Zhang <xiong.y.zhang@intel.com> Signed-off-by: Gary Wang <gary.c.wang@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-28drm/nouveau/dispnv04: fix build on powerpcDave Airlie1-1/+1
align with mask code in overlay.c, Ben can clean the naming up later if necessary. Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-28nouveau: fix powerpc buildDave Airlie1-2/+2
Reported-by: Ilia Mirkin on irc. Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-28Merge branch 'linux-4.3' of ↵Dave Airlie728-37930/+43062
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next Rather large pull request this time around, due to the long-pending cleanup of the kernel driver being here. There's a stupidly large number of commits for that, as I wanted to have the series be bisectable at a fairly fine-grained level. That said, a very large portion of the churn in the rework was automated, and a very large number of boards from right across the whole range we support have been tested. I'm fairly confident there shouldn't be (too many) issues from this. Beyond correcting some not-so-great design decisions and making the code a lot easier to work with, there's not much exciting (lower memory usage, GPU VM should be a lot faster, etc) to be gained by the end-user as a result of the cleanup, it mostly lays the groundwork for future improvements. A big thanks goes to Alexandre Courbot for testing/debugging the GK20A codepaths for me :) Highlights: - A heap of perfmon work, providing a more useful userspace interface and specifying counters for a bunch of boards - Support for GT200 reclocking + other misc pm improvements - Initial patches towards supporting GM20B (Tegra X1) - Maxwell DisplayPort fixes - Cleanup of the kernel driver - The usual collection of random fixes * 'linux-4.3' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (312 commits) drm/nouveau: bump driver version for release drm/nouveau/tegra: merge platform setup from nouveau drm drm/nouveau/pci: merge agp handling from nouveau drm drm/nouveau/device: remove pci/platform_device from common struct drm/nouveau/device: import pciid list and integrate quirks with it drm/nouveau/device: cleaner abstraction for device resource functions drm/nouveau/mc: move device irq handling to platform-specific code drm/nouveau/mc/gf100-: handle second interrupt tree drm/nouveau/mc: abstract interface to master intr registers drm/nouveau/pci: new subdev drm/nouveau/object: merge with handle drm/nouveau/core: remove the remainder of the previous style drm/nouveau/mpeg: convert to new-style nvkm_engine drm/nouveau/sw: convert to new-style nvkm_engine drm/nouveau/pm: convert to new-style nvkm_engine drm/nouveau/gr: convert to new-style nvkm_engine drm/nouveau/fifo: convert to new-style nvkm_engine drm/nouveau/disp: convert to new-style nvkm_engine drm/nouveau/dma: convert to new-style nvkm_engine drm/nouveau/cipher: convert to new-style nvkm_engine ...
2015-08-28drm/nouveau: bump driver version for releaseBen Skeggs1-2/+5
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/tegra: merge platform setup from nouveau drmBen Skeggs9-285/+221
The copyright header in nvkm/engine/device/platform.c has been replaced with the NVIDIA one from drm/nouveau_platform.c, as most of the actual code is now theirs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/pci: merge agp handling from nouveau drmBen Skeggs18-239/+271
This commit reinstates the pre-DEVINIT AGP fiddling that was broken in an earlier commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: remove pci/platform_device from common structBen Skeggs27-108/+106
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: import pciid list and integrate quirks with itBen Skeggs5-26/+1577
PCI IDs taken from the NVIDIA binary driver, with permission. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: cleaner abstraction for device resource functionsBen Skeggs18-62/+71
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mc: move device irq handling to platform-specific codeBen Skeggs19-324/+182
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mc/gf100-: handle second interrupt treeBen Skeggs4-9/+38
Doesn't fix any known issue, but best be safe in case control is handed to us from firmware with these left enabled. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mc: abstract interface to master intr registersBen Skeggs13-11/+84
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/pci: new subdevBen Skeggs15-39/+491
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/object: merge with handleBen Skeggs18-442/+219
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/core: remove the remainder of the previous styleBen Skeggs68-1856/+496
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mpeg: convert to new-style nvkm_engineBen Skeggs14-363/+166
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/sw: convert to new-style nvkm_engineBen Skeggs19-292/+115
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/pm: convert to new-style nvkm_engineBen Skeggs21-400/+219
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gr: convert to new-style nvkm_engineBen Skeggs59-1847/+1744
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fifo: convert to new-style nvkm_engineBen Skeggs56-801/+640
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/disp: convert to new-style nvkm_engineBen Skeggs32-890/+696
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/dma: convert to new-style nvkm_engineBen Skeggs22-242/+162
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/cipher: convert to new-style nvkm_engineBen Skeggs4-61/+27
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/ce: convert to new-style nvkm_engineBen Skeggs9-278/+86
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/xtensa: convert to new-style nvkm_engineBen Skeggs8-148/+84
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/falcon: convert to new-style nvkm_engineBen Skeggs36-771/+640
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/volt: convert to new-style nvkm_subdevBen Skeggs12-253/+161
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/tmr: convert to new-style nvkm_subdevBen Skeggs27-427/+501
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/therm: convert to new-style nvkm_subdevBen Skeggs24-714/+507
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/pmu: convert to new-style nvkm_subdevBen Skeggs21-261/+229
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mxm: convert to new-style nvkm_subdevBen Skeggs11-123/+66
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mmu: convert to new-style nvkm_subdevBen Skeggs21-478/+387
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mc: convert to new-style nvkm_subdevBen Skeggs28-381/+265
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/ltc: convert to new-style nvkm_subdevBen Skeggs13-342/+235
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/imem: convert to new-style nvkm_subdevBen Skeggs21-391/+285
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/devinit: run devinit scripts right after preinitBen Skeggs3-11/+15
This ensures we have a valid mask of disabled engines before we start trying to execute fini()/init() on the subdevs, potentially touching devices that don't exist. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/ibus: convert to new-style nvkm_subdevBen Skeggs9-209/+101
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/i2c: convert to new-style nvkm_subdevBen Skeggs23-327/+200
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gpio: convert to new-style nvkm_subdevBen Skeggs30-370/+252
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fuse: convert to new-style nvkm_subdevBen Skeggs12-221/+100
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fb: convert to new-style nvkm_subdevBen Skeggs47-812/+648
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/devinit: convert to new-style nvkm_subdevBen Skeggs32-466/+424
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/clk: convert to new-style nvkm_subdevBen Skeggs31-706/+537
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/bus: convert to new-style nvkm_subdevBen Skeggs22-318/+246
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/bios: convert to new-style nvkm_subdevBen Skeggs42-249/+158
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/bar: convert to new-style nvkm_subdevBen Skeggs23-342/+354
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/core: kill some (now) dead codeBen Skeggs10-675/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/sw: convert user classes to new-style nvkm_objectBen Skeggs12-229/+277
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/pm: convert user classes to new-style nvkm_objectBen Skeggs6-131/+132
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mpeg: convert user classes to new-style nvkm_objectBen Skeggs9-333/+249
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gr: convert user classes to new-style nvkm_objectBen Skeggs55-1738/+1760
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/cipher: convert user classes to new-style nvkm_objectBen Skeggs2-58/+38
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/ce: convert user classes to new-style nvkm_objectBen Skeggs3-82/+28
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/xtensa: convert user classes to new-style nvkm_objectBen Skeggs7-87/+63
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/falcon: convert user classes to new-style nvkm_objectBen Skeggs14-400/+132
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fifo: convert user classes to new-style nvkm_objectBen Skeggs61-2121/+2025
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fifo: split user classes out from engine implementationsBen Skeggs45-2754/+3147
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/disp: convert user classes to new-style nvkm_objectBen Skeggs73-1053/+2346
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/disp: split user classes out from engine implementationsBen Skeggs59-3525/+4329
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/dma: convert user classes to new-style nvkm_objectBen Skeggs18-264/+362
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/dma: split user classes out from engine implementationsBen Skeggs22-202/+349
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: convert ctrl class to new-style nvkm_objectBen Skeggs5-45/+73
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: convert user class to new-style nvkm_objectBen Skeggs7-88/+180
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/client: convert to new-style nvkm_objectBen Skeggs9-52/+70
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/sw: remove dependence on namedb/engctx lookupBen Skeggs15-301/+251
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mpeg: remove dependence on namedb/engctx lookupBen Skeggs4-76/+118
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gr: remove dependence on namedb/engctx lookupBen Skeggs15-533/+593
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fifo: remove dependence on namedb/engctx lookupBen Skeggs2-41/+28
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/cipher: remove dependence on namedb/engctx lookupBen Skeggs1-11/+7
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/falcon: remove dependence on namedb/engctx lookupBen Skeggs14-113/+131
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fb: remove dependence on namedb/engctx lookupBen Skeggs7-92/+125
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/sw: turn flip completion into an eventBen Skeggs18-53/+240
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/sw/nv04: replace direct context access with GetRef methodBen Skeggs5-10/+65
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/ramht: remove dependence on namedbBen Skeggs11-82/+162
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gpuobj: separate allocation from nvkm_objectBen Skeggs20-379/+373
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/gr: directly use instmem where currently possibleBen Skeggs15-63/+87
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/fifo: directly use instmem for runlists and polling areasBen Skeggs7-66/+64
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/xtensa: directly use instmem for ucode imageBen Skeggs2-9/+10
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/falcon: directly use instmem for ucode imageBen Skeggs2-5/+7
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/imem/nv04-nv40: directly use instmem for vbios/ramfc/ramroBen Skeggs8-99/+91
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/bar/gf100: directly use instmem for channel descriptorsBen Skeggs1-8/+13
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mmu: directly use instmem for page tablesBen Skeggs12-76/+75
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/imem: improve management of instance memoryBen Skeggs34-656/+968
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/mmu: protect each vm with its own mutexBen Skeggs10-50/+46
An upcoming commit requires being able to modify the PRAMIN BAR page tables while already holding the MMU subdev mutex. To solve this issue, each VM has been given its own mutex. As a nice side-effect, this also allows separate VMs to be updated concurrently. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/core: prepare for new-style objectsBen Skeggs7-50/+135
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: prepare for new-style subdevsBen Skeggs28-437/+2378
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/device: separate construction of pci/tegra devicesBen Skeggs11-54/+307
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/engine: implement support for new-style nvkm_engineBen Skeggs2-0/+164
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/subdev: implement support for new-style nvkm_subdevBen Skeggs6-17/+217
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/object: implement support for new-style nvkm_objectBen Skeggs10-65/+271
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/engine: rename some functions to avoid upcoming conflictsBen Skeggs10-19/+19
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/subdev: rename some functions to avoid upcoming conflictsBen Skeggs24-46/+48
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/object: rename some functions to avoid upcoming conflictsBen Skeggs22-51/+51
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: device time mthdBen Skeggs4-2/+33
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: replace pushbuf with vm in fermi/kepler gpfifo class argsBen Skeggs11-34/+77
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: return chipset/board names from device info methodBen Skeggs2-0/+4
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: add supported engines query to kepler gpfifo classBen Skeggs1-10/+17
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: return min/max versions for supported object classesBen Skeggs8-42/+92
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: assign internal class identifiers to sw classesBen Skeggs12-26/+87
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: use negative oclass identifier for internal classesBen Skeggs12-39/+29
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: return success from sclass even for objects without childrenBen Skeggs1-6/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: extend nop ioctl to return nvif version identifierBen Skeggs4-4/+18
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: replace path-based object identificationBen Skeggs24-116/+152
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/nvif: simplify and tidy library interfacesBen Skeggs42-574/+365
A variety of tweaks to the NVIF library interfaces, mostly ripping out things that turned out to be not so useful. - Removed refcounting from nvif_object, callers are expected to not be stupid instead. - nvif_client is directly reachable from anything derived from nvif_object, removing the need for heuristics to locate it - _new() versions of interfaces, that allocate memory for the object they construct, have been removed. The vast majority of callers used the embedded _init() interfaces. - No longer storing constructor arguments (and the data returned from nvkm) inside nvif_object, it's more or less unused and just wastes memory. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/client: store default device by handle, not referenceBen Skeggs4-16/+9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/parent: remove some (now) unnecessary special-case handlingBen Skeggs2-49/+14
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-08-28drm/nouveau/object: store object type data outside of handleBen Skeggs6-8/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>