- 26 Jun, 2017 3 commits
-
-
Daniel Vetter authored
On the load error path we can't have pending vblank interrupts, and on unload we already call drm_atomic_helper_shutdown beforehand! So all good to nuke it. Reviewed-by:
Sean Paul <seanpaul@chromium.org> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-5-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
Again we probably want a drm_atomic_helper_shutdown somewhere, but that's a bit more analysis. Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Chen Feng <puck.chen@hisilicon.com> Reviewed-by:
Sean Paul <seanpaul@chromium.org> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-4-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
So this seems to be the first driver that does it the right way round, so fix it up by calling drm_atomic_helper_shutdown instead. We need to do that before the last kms user is gone (fbdev emulation), but before we start shutting down hw stuff like interrupts. Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Chen Feng <puck.chen@hisilicon.com> Reviewed-by:
Sean Paul <seanpaul@chromium.org> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-3-daniel.vetter@ffwll.ch
-
- 23 Jun, 2017 10 commits
-
-
Chris Wilson authored
When the caller maps their dmabuf and we return an sg_table, the caller doesn't expect the pages beneath that sg_table to vanish on a whim (i.e. under mempressure). The contract is that the pages are pinned for the duration of the mapping (from dma_buf_map_attachment() to dma_buf_unmap_attachment). To comply, we need to introduce our own vgem_object.pages_pin_count and elevate it across the mapping. However, the drm_prime interface we use calls drv->prime_pin on dma_buf_attach and drv->prime_unpin on dma_buf_detach, which while that does cover the mapping is much broader than is desired -- but it will do for now. v2: also hold the pin across prime_vmap/vunmap Reported-by:
Tomi Sarvela <tomi.p.sarvela@intel.com> Testcase: igt/gem_concurrent_blit/*swap*vgem* Fixes: 5ba6c9ff ("drm/vgem: Fix mmaping") Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Sean Paul <seanpaul@chromium.org> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: <stable@vger.kernel.org> # needs a backport Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170622134617.17912-1-chris@chris-wilson.co.uk
-
kbuild test robot authored
Signed-off-by:
Fengguang Wu <fengguang.wu@intel.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170623095418.GA68865@lkp-sbx04
-
Daniel Vetter authored
Almost right but still racy, it's called before the interrupts are uninstalled. So let's just drop it. Cc: Marek Vasut <marex@denx.de> Reviewed-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-7-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
Both drivers shut down all crtc beforehand already, which will shut up any pending vblank (the only thing vblank_cleanup really does is disable the disable timer). Hence we don't need this here and can remove it. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Acked-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-2-daniel.vetter@ffwll.ch
-
Gerd Hoffmann authored
Flagged by sparse. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Acked-by:
Daniel Vetter <daniel@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-4-kraxel@redhat.com
-
Gerd Hoffmann authored
Flagged by sparse. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Acked-by:
Daniel Vetter <daniel@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-3-kraxel@redhat.com
-
Gerd Hoffmann authored
Drop them from u64 fields, tag local variables correctly instead. While being at it switch the code to use u64_to_user_ptr(). Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Acked-by:
Daniel Vetter <daniel@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170620113916.6967-2-kraxel@redhat.com
-
Mark Yao authored
For RK3399's GRF module, if we want to operate the graphic related grf registers, we need to enable the pclk_vio_grf which supply power for VIO GRF IOs, so it's better to introduce an optional grf clock in driver. Signed-off-by:
Yakir Yang <ykk@rock-chips.com> Signed-off-by:
Mark Yao <mark.yao@rock-chips.com> Acked-by:
Rob Herring <robh@kernel.org>
-
Mark Yao authored
For RK3399 HDMI, there is an external clock need for HDMI PHY, and it should keep the same clock rate with VOP DCLK. VPLL have supported the clock for HDMI PHY, but there is no clock divider bewteen VPLL and HDMI PHY. So we need to set the VPLL rate manually in HDMI driver. Signed-off-by:
Yakir Yang <ykk@rock-chips.com> Signed-off-by:
Mark Yao <mark.yao@rock-chips.com> Acked-by:
Rob Herring <robh@kernel.org>
-
Mark Yao authored
RK3399 and RK3288 shared the same HDMI IP controller, only some light difference with GRF configure. Signed-off-by:
Yakir Yang <ykk@rock-chips.com> Signed-off-by:
Mark Yao <mark.yao@rock-chips.com> Acked-by:
Rob Herring <robh@kernel.org>
-
- 22 Jun, 2017 11 commits
-
-
Peter Rosin authored
All layers of all supported chips support this, the only variable is the base address of the lookup table in the register map. Acked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1498107791-17450-3-git-send-email-peda@axentia.se
-
Peter Rosin authored
The default implementation should be used. Signed-off-by:
Peter Rosin <peda@axentia.se> Signed-off-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1498107791-17450-2-git-send-email-peda@axentia.se
-
Eric Anholt authored
It is no longer used as of commit 34c8ea40 ("drm/vc4: Mimic drm_atomic_helper_commit() behavior") Signed-off-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-4-eric@anholt.netAcked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by:
Boris Brezillon <boris.brezillon@free-electrons.com>
-
Eric Anholt authored
Now that we're using the atomic helpers for fence waits, we can use the same codepath as drm_atomic_helper_commit() does for async, getting rid of our custom vc4_commit struct. Signed-off-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-3-eric@anholt.netAcked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by:
Boris Brezillon <boris.brezillon@free-electrons.com>
-
Eric Anholt authored
We should allow SIGIO and things to interrupt us before we get to the no-error stage of the commit process. This code is effectively copied from drm_atomic_helper_commit(). Signed-off-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-2-eric@anholt.netAcked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by:
Boris Brezillon <boris.brezillon@free-electrons.com>
-
Eric Anholt authored
This way drm_atomic_helper_wait_for_fences() will actually do something. The vc4_seqno_cb has been doing the fence waits on V3D manually, so far. Signed-off-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170621185002.28563-1-eric@anholt.netAcked-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by:
Boris Brezillon <boris.brezillon@free-electrons.com>
-
Mario Kleiner authored
With instantaneous high precision vblank timestamping that updates at leading edge of vblank, the emulated "hw vblank counter" from vblank timestamping which increments at leading edge of vblank, and reliable page flip execution and completion at leading edge of vblank, we should meet the requirements for fast vblank irq disable/enable. Testing against rpi-4.12-rc5 Linux kernel with timing measurement equipment indicates this works fine, so allow immediate vblank disable for power saving. For debugging in case of unexpected trouble, booting with kernel cmdline option drm.vblankoffdelay=0 would keep vblank irqs on to approximate old behavior. v2: Respin onto drm-misc-next, per Eric's suggestion. Drop !vc4->firmware_kms check, as the firmware_kms implementation does not exist in upstream. Signed-off-by:
Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170622012811.2139-1-mario.kleiner.de@gmail.com
-
Boris Brezillon authored
Add an helper to wait for all page flips of an atomic state to be done. v2: - Pimp kerneldoc as discussed with Boris on irc - Add missing doc for @dev. - Use old_state for consitency with wait_for_vblanks Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> (v1) Acked-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1496392332-8722-2-git-send-email-boris.brezillon@free-electrons.com
-
Jose Abreu authored
Now that we have a callback to check if crtc supports a given mode we can use it in arcpgu so that we restrict the number of probbed modes to the ones we can actually display. This is specially useful because arcpgu crtc is responsible to set a clock value in the commit() stage but unfortunatelly this clock does not support all the needed ranges. Also, remove the atomic_check() callback as mode_valid() callback will be called before. Signed-off-by:
Jose Abreu <joabreu@synopsys.com> Reviewed-by:
Alexey Brodkin <abrodkin@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@linux.ie> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Changes v4->v5: - Change commit message to "arcpgu" (Alexey) Changes v3->v4: - Do not use aux function (Laurent) Reviewed-by:
Neil Armstrong <narmstrong@baylibre.com> Acked-by:
Dave Airlie <airlied@gmail.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/c3bcd69016c77f68a03ff3cb6b22ca6f90e930b0.1495720737.git.joabreu@synopsys.com
-
Daniel Vetter authored
It again looks all cargo-culted for no good reasons. Cc: Shawn Guo <shawnguo@kernel.org> Acked-by:
Shawn Guo <shawnguo@kernel.org> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-13-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
It doesn't do anything in the driver load error paths that the drm core doesn't also do (cleanup is done in drm_dev_fini). Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621082850.13224-10-daniel.vetter@ffwll.ch
-
- 21 Jun, 2017 6 commits
-
-
Boris Brezillon authored
VBLANK events are missed when the CRTC is being disabled because the driver does not wait till the end of the frame before stopping the HVS and PV blocks. In this case, we should explicitly issue a VBLANK event if there's one waiting. Signed-off-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by:
Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/1497601833-24588-1-git-send-email-boris.brezillon@free-electrons.com
-
Daniel Vetter authored
I've failed to remember that we have virtual drivers like vgem which have no underlying struct device. Fix this asap. Reported-by:
Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Fixes: 5c484cee ("drm: Remove drm_driver->set_busid hook") Cc: Thierry Reding <treding@nvidia.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170621130429.20537-1-daniel.vetter@ffwll.ch
-
Arvind Yadav authored
Undo preparation of a clock source, if sti_hqvdp_start_xp70 and sti_hqvdp_atomic_check are not successful. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/7afad3012fb6e40f43a1eb5a64dc6364c38bd052.1498039961.git.arvind.yadav.cs@gmail.com
-
Thierry Reding authored
The expression &private->fbdev_helper can never be NULL, so the check is completely unnecessary. Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-12-thierry.reding@gmail.com
-
Thierry Reding authored
drm_fbdev_cma_hotplug_event() already checks for NULL pointers before dereferencing, so callers don't need to do that. Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-11-thierry.reding@gmail.com
-
Arvind Yadav authored
of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 8836 744 0 9580 256c drivers/gpu/drm/armada/armada_crtc.o File size after constify armada_lcd_of_match: text data bss dec hex filename 9220 328 0 9548 254c drivers/gpu/drm/armada/armada_crtc.o Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/ff9a9a908cf347775ab62cfadfde986de72dcf13.1497935382.git.arvind.yadav.cs@gmail.com
-
- 20 Jun, 2017 10 commits
-
-
Liviu Dudau authored
drm_fbdev_cma_set_suspend{,_unlocked} use an integer parameter to describe whether the intended state is a suspend or a resume. It then passes the value to drm_fb_helper_set_suspend{,_unlocked} which uses a boolean. Switch to using bool everywhere. Signed-off-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170620102320.8849-1-Liviu.Dudau@arm.com
-
Arvind Yadav authored
of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 15845 640 0 16485 4065 drivers/gpu/drm/sti/sti_hqvdp.o File size after constify hqvdp_of_match: text data bss dec hex filename 16229 224 0 16453 4045 drivers/gpu/drm/sti/sti_hqvdp.o Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/0a6ae44cf7d0fb54380809ae0e52234dbd3f367a.1497934979.git.arvind.yadav.cs@gmail.com
-
Arvind Yadav authored
of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 4222 664 0 4886 1316 drivers/gpu/drm/sti/sti_dvo.o File size after constify dvo_of_match: text data bss dec hex filename 4638 248 0 4886 1316 drivers/gpu/drm/sti/sti_dvo.o Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/d5ac3cb4c43338419308d658b9bcb59b7540471e.1497868332.git.arvind.yadav.cs@gmail.com
-
Daniel Vetter authored
It's not obvious that when using the new color manager stuff you still need to wire up the legacy helper to get legacy LUT support. Improve this with more links. drm_crtc_funcs->gamma_set already explains this properly. Cc: Peter Rosin <peda@axentia.se> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170620094228.4757-1-daniel.vetter@ffwll.ch
-
Jose Abreu authored
Now that we have a callback to check if crtc and encoder supports a given mode we can use it in vc4 so that we restrict the number of probed modes to the ones we can actually display. Also, remove the mode_fixup() calls as these are no longer needed because mode_valid() will be called before. Signed-off-by:
Jose Abreu <joabreu@synopsys.com> Cc: Carlos Palminha <palminha@synopsys.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Eric Anholt <eric@anholt.net> Cc: David Airlie <airlied@linux.ie> Reviewed-by:
Neil Armstrong <narmstrong@baylibre.com> Compile-tested and Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/5bea792f91074688c88a2dab8b0a90eec6e98fdf.1495720737.git.joabreu@synopsys.com
-
Daniel Vetter authored
I spotted a markup issue, plus adding the descriptions in drm_driver. Plus a few more links while at it. I'm still mildly unhappy with the split between fops and ioctls, but I still think having the ioctls in the uapi chapter makes more sense. Oh well ... v2: Rebase. v3: Move misplace hunk to the right patch. Cc: Stefan Agner <stefan@agner.ch> Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170531092045.3950-1-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
The magic switching between proper pci driver and shadow-attach isn't useful anymore since there's no ums+kms drivers left. Let's split this up properly, calling pci_register_driver for kms drivers and renaming the shadow-attach init to drm_legacy_pci_init/exit. Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-6-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
The only special-case is pci devices, and we can easily handle this in the core. Do so and drop a pile of boilerplate from drivers. Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-5-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
Since commit ca8e2ad7 Author: Thierry Reding <treding@nvidia.com> Date: Fri Apr 11 15:23:00 2014 +0200 drm: Introduce drm_dev_set_unique() the ->set_busid callback is optional. On top of that the udl one isn't really fully compliant with the drm uabi, but since only modesetting ever binds to it (there's no 3d accel on udl) it doesn't matter. Still, can't harm to aling and use the default used by everyone else. Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-4-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
We use drm_crtc_ for all the new-style vblank functions which directly take a struct drm_crtc *. drm_accurate_vblank_count was the odd one out, correct this to appease my OCD. Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-13-daniel.vetter@ffwll.ch
-