aboutsummaryrefslogtreecommitdiffstats
path: root/tools (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2017-04-06drm: virtio: fix virtio_gpu_cursor_formatsLaurent Vivier1-0/+4
When we use virtio-vga with a big-endian guest, the mouse pointer disappears. To fix that, on big-endian use DRM_FORMAT_BGRA8888 instead of DRM_FORMAT_ARGB8888. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170405080915.823-1-lvivier@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-04-06drm: bridge: dw-hdmi: Add a missing break statementDan Carpenter1-0/+1
There was supposed to be a break before the next case statement. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170406052132.GA26605@mwanda
2017-04-06drm: bridge: dw-hdmi: remove unused hdmi_bus_fmt_is_yuv420Neil Armstrong1-14/+0
Remove usused yet hdmi_bus_fmt_is_yuv420 function. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: http://patchwork.freedesktop.org/patch/msgid/1491377579-9353-1-git-send-email-narmstrong@baylibre.com
2017-04-06drm/fb-helper: Extract _legacy kms functionsDaniel Vetter1-28/+44
The goal is to push all the kms locking down into these separate _atomic and _legacy functions, so that we can correctly pass the acquire ctx into all atomic drivers. Instead of playing games with hidden ctx in mode_config.acquire_ctx. All the fbdev state will be protected by a new fbdev private lock that Thierry is working on. This here is just prep by creating a clean split between atomic and legacy paths, which also simplifies the control flow a bit. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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/20170403083304.9083-16-daniel.vetter@ffwll.ch
2017-04-06drm: extract legacy framebuffer removeDaniel Vetter3-111/+115
I got confused every time I audited what that lock_all is doing in there until realizing it's for legacy kms only. Make that a notch more obvious by having 2 entirely different paths. While at it also move the atomic version of this into drm_framebuffer.c, there's no reason it needs to be in drm_atomic.c. That way it becomes a simple static function. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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/20170403083304.9083-15-daniel.vetter@ffwll.ch
2017-04-06drm/atomic-helper: Remove legacy backoff hack from gamma_setDaniel Vetter2-12/+2
Another one knocked down. With this we can also remove the temporary hack in the gamma_set ioctl. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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/20170403083304.9083-14-daniel.vetter@ffwll.ch
2017-04-06drm: Add acquire ctx to ->gamma_set hookDaniel Vetter21-21/+43
Atomic helpers really want this instead of the hacked-up legacy backoff trick, which unfortunately prevents drivers from using their own private drm_modeset_locks. Aside: There's a few atomic drivers (nv50, vc4, soon vmwgfx) which don't yet use the new atomic color mgmt/gamma table stuff. Would be nice if they could switch over and just hook up drm_atomic_helper_legacy_gamma_set() instead. Cc: Dave Airlie <airlied@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Sinclair Yeh <syeh@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-13-daniel.vetter@ffwll.ch
2017-04-06drm: Add explicit acquire ctx handling around ->gamma_setDaniel Vetter1-13/+20
Just the groundwork to prepare for adding the acquire cxt parameter to the ->gamma_set hook. Again we need a temporary hack to fill out mode_config.acquire_ctx until the atomic helpers are switched over. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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/20170403083304.9083-12-daniel.vetter@ffwll.ch
2017-04-06drm/fb-helper: Give up on kgdb for atomic driversDaniel Vetter3-22/+6
It just doesn't work. It probably stopped working way, way before that (e.g. i915 grabbed random mutexes all over in modeset code at least since gen6), but with atomic and all the ww_mutex stuff it's indeed hopeless. Remove ->mode_set_base_atomic from the 2 atomic drivers (i915 and nouveau) that still had one (both had dummy implementations already anyway), and shunt atomic drivers in the helpers debug_enter/leave functions. I'll leave the code in for radeon and amdgpu, but I think as soon as amdgpu is atomic we should think about just ripping it out. Only having it around for radeon and pre-nv50 is rather pointless. This would also allow us to nuke all that code from fbdev. Funny part is that _all_ kms drivers set this hook, despite that no one else provides the required ->mode_set_base_atomic implementation. The reason I'm jumping on this is that I want to wire up a full acquire ctx for the benefit of atomic drivers, everywhere. And the debug_enter/leave implementations call ->gamma_set. And there's just no way ever we can create an acquire_ctx in the nmi context of kgdb. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.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/20170403083304.9083-11-daniel.vetter@ffwll.ch
2017-04-05drm/i915: Nuke intel_atomic_legacy_gamma_setDaniel Vetter1-43/+1
We do set DRIVER_ATOMIC now. Note that the comment is outdated, the property paths switched over to checking drm_drv_uses_atomic_modeset() a while ago. Which means this can't even break if we revert DRIVER_ATOMIC again. v2: Add note that this is even safer (Maarten). Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-9-daniel.vetter@ffwll.ch
2017-04-05drm: Only take crtc lock in get_gamma ioctlDaniel Vetter1-10/+6
We don't call into drivers at all here, this is enough. Also, we can reduce the critical section a bit to simplify the code. crtc->gamma_size is set up once at driver load and then invariant, so also doesn't need any protection. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-8-daniel.vetter@ffwll.ch
2017-04-05drm: Drop modeset_lock_all from the getproperty ioctlDaniel Vetter1-43/+29
Properties, i.e. the struct drm_property specifying the type and value range of a property, not the instantiation on a given object, are invariant over the lifetime of a driver. Hence no locking at all is needed, we can just remove it. While at it give the function some love and simplify it, to get it under the 80 char limit: - Straighten the loops to reduce the nesting. - use u64_to_user_ptr casting helper - use put_user for fixed u64 copies. Note there's a small behavioural change in that we now copy parts of the values to userspace if the arrays are a bit too small. Since userspace will immediately retry anyway, this doesn't matter. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-7-daniel.vetter@ffwll.ch
2017-04-05drm: drop modeset_lock_all from drm_state_infoDaniel Vetter1-21/+39
If we push the locks down we don't have to take them all at the same time. Aside: Making dump_info fully safe should be fairly simple, if we protect the ->state pointers with rcu. Simply putting a synchronize_rcu() into the drm_atomic_state free function should be all that's roughly needed. Well except we shouldn't block in there, so better to put that into a work_struct. But I've not set out to fix that little issue. Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-6-daniel.vetter@ffwll.ch
2017-04-05drm/atomic-helper: remove modeset_lock_all from helper_resumeDaniel Vetter1-4/+12
Atomic code rely shouldn't rely on the magic hidden acquire context. v2: Remove unused config local var (gcc). Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-5-daniel.vetter@ffwll.ch
2017-04-05drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctxDaniel Vetter7-50/+4
With all the callers of drm_modeset_lock_crtc gone, and all the places it was formerly used properly wiring the acquire ctx through, we can remove this. The only hidden context magic we still have is now the global one. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-4-daniel.vetter@ffwll.ch
2017-04-05drm: Remove drm_modeset_(un)lock_crtcDaniel Vetter4-96/+24
The last user, the cursor ioctl, can just open-code this too. We simply have to move the acquire ctx dance from the universal function up into the top-level ioctl handler. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-3-daniel.vetter@ffwll.ch
2017-04-05drm: Make drm_modeset_lock_crtc internalDaniel Vetter3-16/+3
This is only for legacy paths that need to grab the crtc/plane lock combo. If you want to lock a crtc, just use drm_modeset_lock(). Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-2-daniel.vetter@ffwll.ch
2017-04-04drm: Pass CRTC ID in userspace vblank eventsAnder Conselvan de Oliveira3-1/+7
With the atomic API, it is possible that a single commit affects multiple crtcs. If the user requests an event with that commit, one event will be sent for each CRTC, but it is not possible to distinguish which crtc an event is for in user space. To solve this, the reserved field in struct drm_vblank_event is repurposed to include the crtc_id which the event is for. The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if the crtc field will be set properly. [daniels: Rebased, using Maarten's forward-port.] Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170404165221.28240-2-daniels@collabora.com
2017-04-04drm/doc: Small markup fixupDaniel Vetter1-1/+1
Drive-by cleanup. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-11-daniel.vetter@ffwll.ch
2017-04-04drm: document drm_ioctl.[hc]Daniel Vetter5-103/+203
Also unify/merge with the existing stuff. I was a bit torn where to put this, but in the end I decided to put all the ioctl/sysfs/debugfs stuff into drm-uapi.rst. That means we have a bit a split with the other uapi related stuff used internally, like drm_file.[hc], but I think overall this makes more sense. If it's too confusing we can always add more cross-links to make it more discoverable. But the auto-sprinkling of links kernel-doc already does seems sufficient. Also for prettier docs and more cross-links, switch the internal defines over to an enum, as usual. v2: Update kerneldoc fro drm_compat_ioctl too (caught by 0day), plus a bit more drive-by polish. v3: Fix typo, spotted by xerpi on irc (Sergi). v4: Add missing space in comment (Neil). Cc: Sergi Granell <xerpi.g.12@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-4-daniel.vetter@ffwll.ch
2017-04-04drm: Consolidate and document sysfs supportDaniel Vetter4-51/+42
- remove docs for internal func, doesn't add value - add short overview snippet instead explaining that drivers don't have to bother themselves with reg/unreg concerns - drop the ttm comment about drmP.h, drmP.h is disappearing ... Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-2-daniel.vetter@ffwll.ch
2017-04-04drm: update todo.rstDaniel Vetter1-27/+4
Just drive-by, but we have gsoc running so better to update it now. Great news is that two entries can be removed because essentially all done. v2: Keep a bunch of the todos, Gabriel is working on them. Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170404095304.17599-1-daniel.vetter@ffwll.ch
2017-04-04dt-bindings: display: rk3288-mipi-dsi: add reset propertyJohn Keeping1-0/+5
This reset is required in order to fully reset the internal state of the MIPI controller. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170303113945.3bd2cbd9.john@metanate.com
2017-04-04MAINTAINERS: update files for Amlogic DRM DriverNeil Armstrong1-0/+2
This patch adds the dw-hdmi bindings and RST kerneldoc to maintained files. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: http://patchwork.freedesktop.org/patch/msgid/1491308131-22071-2-git-send-email-narmstrong@baylibre.com
2017-04-04drm/meson: Add RST to bring together kerneldocNeil Armstrong2-0/+62
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-04-04drm/meson: Convert existing documentation to actual kerneldocNeil Armstrong7-30/+65
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>