aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-04-07drm/rockchip: analogix_dp: Disable clock when unbindingJeffy Chen1-1/+2
The clock is enabled when binding cdn dp. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm/rockchip: vop: Unprepare clocks when unbindingJeffy Chen1-0/+4
The clocks are prepared when binding vop. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm/rockchip: vop: Enable pm domain before vop_initialJeffy Chen1-8/+21
We're trying to access vop registers here, so need to make sure the pm domain is on. Normally it should be enabled by the bootloader, but there's no guarantee of it. And if we wanna do unbind/bind, it would also cause the device to hang. And this patch also does these: 1/ move vop_initial to the end of vop_bind for eaiser error handling. 2/ correct the err_put_pm_runtime of vop_enable. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm/rockchip: cdn-dp: Don't unregister audio dev when unbindingJeffy Chen1-3/+3
After snd_soc_unregister_codec, the dai link would remain bound to the invalid codec. That would cause crashes after unbind dp driver. Let's unregister audio codec when removing dp driver to prevent that. Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm/rockchip: cdn-dp: Don't try to release firmware when not loadedJeffy Chen1-1/+3
Signed-off-by: Jeffy Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: bridge: analogix: Destroy connector & encoder when unbindingJeffy Chen1-0/+2
Normally we do this in drm_mode_config_cleanup. But: 1/ analogix dp's connector is allocated in bind, and freed after unbind. So we need to destroy it in unbind to avoid further access. 2/ the drm bridge is attached in bind, and detached in encoder cleanup. So we need to destroy encoder in unbind. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: bridge: analogix: Disable clock when unbindingJeffy Chen1-0/+1
The clock is enabled when binding analogix dp. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: bridge: analogix: Unregister dp aux when unbindingJeffy Chen1-0/+1
The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: bridge: analogix: Detach panel when unbinding analogix dpJeffy Chen1-0/+2
The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: Don't allow interruptions when opening debugfs/crcChris Wilson1-5/+1
The code does not like to be interrupted when waiting for the first vblank after opening a debugfs/crc channel, so don't. [66285.716870] WARNING: CPU: 1 PID: 16615 at drivers/gpu/drm/drm_debugfs_crc.c:185 crtc_crc_open+0x1d0/0x1f0 [drm] [66285.716877] Modules linked in: i915 intel_powerclamp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel cryptd intel_gtt i2c_algo_bit lpc_ich mfd_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers drm video button autofs4 sd_mod ahci libahci libata i2c_i801 scsi_mod i2c_designware_platform i2c_designware_core i2c_core [66285.716929] CPU: 1 PID: 16615 Comm: kms_frontbuffer Not tainted 4.11.0-rc5+ #7 [66285.716935] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016 [66285.716941] Call Trace: [66285.716955] dump_stack+0x4d/0x6f [66285.716966] __warn+0xc1/0xe0 [66285.716975] warn_slowpath_null+0x18/0x20 [66285.717004] crtc_crc_open+0x1d0/0x1f0 [drm] [66285.717014] ? wake_atomic_t_function+0x50/0x50 [66285.717024] full_proxy_open+0xf0/0x1b0 [66285.717032] ? full_proxy_release+0x80/0x80 [66285.717042] do_dentry_open.isra.17+0x14b/0x2d0 [66285.717051] vfs_open+0x42/0x60 [66285.717064] path_openat+0x5e7/0x13d0 [66285.717074] ? refcount_dec_and_test+0x11/0x20 [66285.717081] ? down_read+0xd/0x30 [66285.717087] do_filp_open+0x85/0xf0 [66285.717093] ? __vfs_write+0x23/0x120 [66285.717100] ? __alloc_fd+0x3a/0x170 [66285.717107] do_sys_open+0x11e/0x1f0 [66285.717113] ? do_sys_open+0x11e/0x1f0 [66285.717119] SyS_openat+0xf/0x20 [66285.717125] entry_SYSCALL_64_fastpath+0x17/0x98 [66285.717131] RIP: 0033:0x7f5f2235146a [66285.717135] RSP: 002b:00007ffd892e6bc0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [66285.717142] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5f2235146a [66285.717147] RDX: 0000000000000000 RSI: 00007ffd892e6c40 RDI: 0000000000000006 [66285.717151] RBP: 00007ffd892e6b20 R08: 0000000000000000 R09: 000000000000000f [66285.717156] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [66285.717161] R13: 00007ffd892e6b10 R14: 0000000000000004 R15: 00000000007e61f4 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100610 Fixes: e8fa5671183c ("drm: crc: Wait for a frame before returning from open()") Signed-off-by: Chris Wilson <[email protected]> Cc: Tomeu Vizoso <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm/virtio: don't leak bo on drm_gem_object_init failureGerd Hoffmann1-1/+3
Reported-by: 李强 <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-07drm: bridge: dw-hdmi: fix input format/encoding from plat_dataNeil Armstrong1-2/+2
The plat_data->input_bus_format and plat_data->input_bus_encoding are unsigned long and are always >=0, but the value 0 was still considered as RGB888 for input_bus_format and default color space for input_bus_encoding in the reworked code. This patch changes the if statement check for a non-zero value to either use the default input bus_format and/or bus_encoding for a zero value and the provided bus_format and/or bus_encoding for a non zero value. Thanks to Dan Carpenter for his bug report at [1]. Tested on Amlogic P230 (with CSC enabled for YUV444 to RGB) and Rockchip RK3288 ACT8846 EVB Board (no CSC involved, direct RGB passthrough). [1] http://lkml.kernel.org/r/20170406052120.GA26578@mwanda Cc: Dan Carpenter <[email protected]> Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Archit Taneja <[email protected]> [[email protected]: reworded commit message and added Fixes tag] Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-06drm: omap: use common OF graph helpersRob Herring9-164/+26
The OMAP driver has its own OF graph helpers that are similar to the common helpers. This commit replaces most of the calls with the common helpers. There's still a couple of custom helpers left, but the driver needs more extensive changes to get rid of them. In dss_init_ports, we invert the loop, looping through the known ports and matching them to DT nodes rather than looping thru DT nodes and matching them to the ports. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2017-04-06drm: convert drivers to use drm_of_find_panel_or_bridgeRob Herring14-396/+95
Similar to the previous commit, convert drivers open coding OF graph parsing to use drm_of_find_panel_or_bridge instead. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Tested-by: Philipp Zabel <[email protected]> Acked-by: Maxime Ripard <[email protected]> [seanpaul dropped rockchip changes since they're now obsolete] Signed-off-by: Sean Paul <[email protected]>
2017-04-06drm: convert drivers to use of_graph_get_remote_nodeRob Herring17-310/+48
Convert drivers to use the new of_graph_get_remote_node() helper instead of parsing the endpoint node and then getting the remote device node. Now drivers can just specify the device node and which port/endpoint and get back the connected remote device node. The details of the graph binding are nicely abstracted into the core OF graph code. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <[email protected]> Acked-by: Neil Armstrong <[email protected]> Tested-by: Liviu Dudau <[email protected]> Tested-by: Eric Anholt <[email protected]> Tested-by: Jyri Sarha <[email protected]> Tested by: Archit Taneja <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2017-04-06drm: of: introduce drm_of_find_panel_or_bridgeRob Herring2-0/+65
Many drivers have a common pattern of searching the OF graph for either an attached panel or bridge and then finding the DRM struct for the panel or bridge. Also, most drivers need to handle deferred probing when the DRM device is not yet instantiated. Create a common function, drm_of_find_panel_or_bridge, to find the connected node and the associated DRM panel or bridge device. Signed-off-by: Rob Herring <[email protected]> Acked-by: Philipp Zabel <[email protected]> [seanpaul dropped extern from drm_of.h] Signed-off-by: Sean Paul <[email protected]>
2017-04-06drm: make of_drm_find_panel also depend on CONFIG_DRM_PANELRob Herring1-1/+1
For drm_of_find_panel_or_bridge() added in the next commit, an empty version of of_drm_find_panel is needed for !CONFIG_DRM_PANEL. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2017-04-06drm/atomic: Add connector atomic_check function, v2.Maarten Lankhorst2-4/+74
The atomic_check function is useful for implementing properties, but it can be used for other connector modeset related checks as well. Similar to plane check functions, on a modeset atomic_check() is always called. Changes since v1: - Make sure atomic_check() is called on any modeset. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Dhinakaran Pandiyan <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-5-git-send-email-maarten.lankhorst@linux.intel.com
2017-04-06drm/atomic: Move enable/connector check up in check_modeset()Maarten Lankhorst1-10/+10
Now that handle_conflicting_encoders no longer touches active state, so there's no need to do the check quite that late any more. Doing it with all the other checks makes it a lot more clear what the below block tries to accomplish, and this feels like a better place to put the check. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-4-git-send-email-maarten.lankhorst@linux.intel.com
2017-04-06drm/atomic: Set all the changed flags in one place.Maarten Lankhorst1-11/+6
Now that handle_conflicting_encoders cannot disable crtc's any more it makes sense to set all the changed flags in 1 place. This makes the code slightly less magical. The (now removed) comment is out of date. The only reason the active_changed was set late was because handle_conflicting_encoders could disable connectors. This is no longer the case, and we can put everything in 1 place. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-3-git-send-email-maarten.lankhorst@linux.intel.com
2017-04-06drm/atomic: Unify conflicting encoder handling.Maarten Lankhorst2-4/+5
Currently we use a flag to change behavior in atomic commit whether a conflicting encoder should be enabled or disabled. This is used for the legacy set_config helper, which disables connectors that have a conflicting encoder but not part of the active crtc list. There's no need for this to be handled in atomic commit, it could be done in the set_config helper instead. This will let the atomic check function reject any conflicting encoders, while set_config can disable conflicting crtc's. This makes it possible to recalculate the changed flags in 1 loop. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-2-git-send-email-maarten.lankhorst@linux.intel.com
2017-04-06drm: Take mode_config.mutex in setcrtc ioctlDaniel Vetter1-0/+2
Legacy drivers insist that we really take all the locks in this path, and the harm in doing so is minimal. v2: Like git add, it exists :( Fixes: 2ceb585a956c ("drm: Add explicit acquire ctx handling around ->set_config") Cc: Harry Wentland <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: [email protected] Cc: Alex Deucher <[email protected]> Reported-by: Alex Deucher <[email protected]> Acked-and-tested-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-06drm/atomic: Acquire connection_mutex lock in ↵Maarten Lankhorst10-61/+187
drm_helper_probe_single_connector_modes, v4. mode_valid() called from drm_helper_probe_single_connector_modes() may need to look at connector->state because what a valid mode is may depend on connector properties being set. For example some HDMI modes might be rejected when a connector property forces the connector into DVI mode. Some implementations of detect() already lock all state, so we have to pass an acquire_ctx to them to prevent a deadlock. This means changing the function signature of detect() slightly, and passing the acquire_ctx for locking multiple crtc's. For the callbacks, it will always be non-zero. To allow callers not to worry about this, drm_helper_probe_detect_ctx is added which might handle -EDEADLK for you. Changes since v1: - Always set ctx parameter. Changes since v2: - Always take connection_mutex when probing. Changes since v3: - Remove the ctx from intel_dp_long_pulse, and add WARN_ON(!connection_mutex) (danvet) - Update docs to clarify the locking situation. (danvet) Signed-off-by: Maarten Lankhorst <[email protected]> Cc: Boris Brezillon <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1491504920-4017-1-git-send-email-maarten.lankhorst@linux.intel.com
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 <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
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 <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> 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 <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Sinclair Yeh <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Eric Anholt <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Stone <[email protected]> Cc: Maarten Lankhorst <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-04drm/doc: Small markup fixupDaniel Vetter1-1/+1
Drive-by cleanup. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Reviewed-by: Brian Norris <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
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 <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-04-04drm/meson: Add RST to bring together kerneldocNeil Armstrong2-0/+62
Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2017-04-04drm/meson: Convert existing documentation to actual kerneldocNeil Armstrong7-30/+65
Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2017-04-04dt-bindings: Add bindings for the Amlogic Meson dw-hdmi extensionNeil Armstrong1-0/+111
This binding describes the Amlogic Meson specific extension to the Synopsys Designware HDMI Controller. Acked-by: Rob Herring <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>