aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/android (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-06-17staging/android: remove drv_name from sync_timelineGustavo Padovan3-11/+4
As it is internal to sw_sync now this value will always be "sw_sync". Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove sync_timeline_destroy()Gustavo Padovan1-16/+3
This function was just used by the file release function, so we just fold its content there and remove sync_timeline_destroy(). Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove 'destroyed' member from struct sync_timelineGustavo Padovan2-9/+1
'destroyed' was set but not used ny anyone. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: make sw_ioctl info internal to sw_sync.cGustavo Padovan2-33/+12
We don't want to export this from the kernel. This is interface is only for testing and debug. So testers shall copy the ioctl info in their own projects. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: make sync_timeline internal to sw_syncGustavo Padovan6-273/+225
The only use sync_timeline will have in upstream kernel is for debugging through the SW_SYNC interface. So make it internal to SW_SYNC to avoid people use it in the future. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: clean up #includes in the sync frameworkGustavo Padovan3-25/+0
Most of the includes there are not necessary anymore. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: move sw_sync related code to sw_sync.cGustavo Padovan4-115/+139
Split sync_debug and sw_sync in two different files. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: bring struct sync_pt backGustavo Padovan3-32/+53
Move the list_head members from sync_pt to struct fence was a mistake, they will not be used by struct fence as planned before, so here we create sync_pt again to bring the list heads back. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove size arg of sync_timeline_create()Gustavo Padovan3-11/+5
After we removed sw_sync_timeline this arg has not been really used by anyone, all its users pass the size of struct sync_timeline there. So simplify this function but not requiring the size anymore. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove unnecessary check for fenceGustavo Padovan1-3/+2
When we call sync_print_fence() fence is always valid. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: rename android_fence to timeline_fenceGustavo Padovan1-18/+18
We are moving out of staging/android so rename it to a name that is not related to android anymore. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove sw_sync.[ch] filesGustavo Padovan4-97/+13
We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove sw_sync_timeline and sw_sync_ptGustavo Padovan3-41/+19
As we moved value storage to sync_timeline and fence those two structs became useless and can be removed now. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove struct sync_timeline_opsGustavo Padovan4-32/+16
Move drv_name, the last field of sync_timeline_ops, to sync_timeline and remove sync_timeline_ops. struct sync_timeline_ops was just an extra abstraction on top of fence_ops, and in the last few commits we removed all it ops in favor of cleaner fence_ops. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: remove .{fence, timeline}_value_str() from timeline_opsGustavo Padovan5-59/+7
Now that the value of fence and the timeline are not stored by sw_sync anymore we can remove this extra abstraction to retrieve this data. This patch changes both fence_ops (.fence_value_str and .timeline_value_str) to return the str directly. It also clean up struct sync_timeline_ops by removing both ops from there. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17staging/android: store last signaled value on sync timelineGustavo Padovan3-31/+14
Now fence timeline is aware of the last signaled fence, as it receives the increment to the current value in sync_timeline_signal(). That allow us to remove .has_signaled() from timeline_ops as we can directly compare using timeline->value and fence->seqno in sync.c Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-02dma-buf/fence: make fence context 64 bit v2Christian König1-1/+2
Fence contexts are created on the fly (for example) by the GPU scheduler used in the amdgpu driver as a result of an userspace request. Because of this userspace could in theory force a wrap around of the 32bit context number if it doesn't behave well. Avoid this by increasing the context number to 64bits. This way even when userspace manages to allocate a billion contexts per second it takes more than 500 years for the context number to wrap around. v2: fix printf formats as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1464786612-5010-2-git-send-email-deathsimple@vodafone.de
2016-04-29staging: lowmemorykiller: remove bogus NULL checkDan Carpenter1-1/+1
The NULL checking here doesn't make sense, so it causes a static checker warning. It turns out that p->mm can't be NULL so the inconsistency is harmless and we should just remove the check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging: android: ion: dummy: fix dereference of ERR_PTRSudip Mukherjee1-0/+2
ion_device_create() can fail and if it fails then it returns the error value in ERR_PTR. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29Staging: android: modify memory allocation style in ion_chunk_heap.cBen Marsh1-2/+2
Modify memory allocation style in order to silence a checkpatch.pl warning. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29Staging: android: modify memory allocation style in ion_test.cBen Marsh1-1/+1
Modifies the memory allocation style ion_test.c in order to remove a checkpatch.pl warning Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging: android: ion: make locally used functions staticMarkus Böhme1-3/+3
Functions ion_handle_put and ion_handle_get_by_id are only used locally in ion.c, so they should be made static as they used to be before 9590232b ("staging/android/ion : fix a race condition in the ion driver"). Signed-off-by: Markus Böhme <markus.boehme@mailbox.org> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29dma-buf/sync_file: de-stage sync_fileGustavo Padovan3-396/+2
sync_file is useful to connect one or more fences to the file. The file is used by userspace to track fences between drivers that share DMA bufs. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29dma-buf/sync_file: de-stage sync_file headersGustavo Padovan5-162/+5
Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: style fix: alignment to match the open parenthesisGustavo Padovan1-4/+4
Fix checks reported by checkpatch.pl. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: improve documentation for sync_fileGustavo Padovan2-3/+4
num_fences was missing a colon mark and sync_file_create() now have better description. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: prepare sync_file for de-stagingGustavo Padovan7-411/+455
Move its functions and structs to their own file. Also moves function's docs to the .c file. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: remove name arg from sync_file_create()Gustavo Padovan3-10/+11
Simplifies the API to only receive the fence it needs to add to the sync and create a name for the sync_file based on the fence context and seqno. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: make sync_file_fdget() staticGustavo Padovan2-3/+1
There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: make sync_file_merge() staticGustavo Padovan2-5/+2
There is no plan in the near future to use this function outside of this file so keep it as static. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: move sync_file functions comments to sync.cGustavo Padovan2-32/+25
To keep comments in line with drivers/dma-buf/ move all sync_file comments to sync.c. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: drop sync_file_install() and sync_file_put()Gustavo Padovan3-37/+6
These two functions are just wrappers for one line functions, they call fd_install() and fput() respectively, so just get rid of them and use fd_install() and fput() directly for more simplicity. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: remove redundant comments on sync_merge_dataGustavo Padovan1-5/+5
struct sync_merge_data already have documentation on top of the struct definition. No need to duplicate it. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging/android: refactor SYNC IOCTLsGustavo Padovan2-45/+67
Change SYNC_IOC_FILE_INFO (former SYNC_IOC_FENCE_INFO) behaviour to avoid future API breaks and optimize buffer allocation. Now num_fences can be filled by the caller to inform how many fences it wants to retrieve from the kernel. If the num_fences passed is greater than zero info->sync_fence_info should point to a buffer with enough space to fit all fences. However if num_fences passed to the kernel is 0, the kernel will reply with number of fences of the sync_file. Sending first an ioctl with num_fences = 0 can optimize buffer allocation, in a first call with num_fences = 0 userspace will receive the actual number of fences in the num_fences filed. Then it can allocate a buffer with the correct size on sync_fence_info and call SYNC_IOC_FILE_INFO again, but now with the actual value of num_fences in the sync_file. info->sync_fence_info was converted to __u64 pointer to prevent 32bit compatibility issues. And a flags member was added. An example userspace code for the later would be: struct sync_file_info *info; int err, size, num_fences; info = malloc(sizeof(*info)); info.flags = 0; err = ioctl(fd, SYNC_IOC_FILE_INFO, info); num_fences = info->num_fences; if (num_fences) { info.flags = 0; size = sizeof(struct sync_fence_info) * num_fences; info->num_fences = num_fences; info->sync_fence_info = (uint64_t) calloc(num_fences, sizeof(struct sync_fence_info)); err = ioctl(fd, SYNC_IOC_FILE_INFO, info); } Finally the IOCTLs numbers were changed to avoid any potential old userspace running the old API to get weird errors. Changing the opcodes will make them fail right away. This is just a precaution, there no upstream users of these interfaces yet and the only user is Android, but we don't expect anyone trying to run android userspace and all it dependencies on top of upstream kernels. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Greg Hackmann <ghackmann@google.com> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-29staging: android: Fix grammar error in Kconfig fileLeo Sperling1-1/+1
Remove the "s" from kills so that the help message is easier to understand Signed-off-by: Leo Sperling <leosperling97@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-04android,lowmemorykiller: Don't abuse TIF_MEMDIE.Tetsuo Handa1-7/+2
Currently, lowmemorykiller (LMK) is using TIF_MEMDIE for two purposes. One is to remember processes killed by LMK, and the other is to accelerate termination of processes killed by LMK. But since LMK is invoked as a memory shrinker function, there still should be some memory available. It is very likely that memory allocations by processes killed by LMK will succeed without using ALLOC_NO_WATERMARKS via TIF_MEMDIE. Even if their allocations cannot escape from memory allocation loop unless they use ALLOC_NO_WATERMARKS, lowmem_deathpending_timeout can guarantee forward progress by choosing next victim process. On the other hand, mark_oom_victim() assumes that it must be called with oom_lock held and it must not be called after oom_killer_disable() was called. But LMK is calling it without holding oom_lock and checking oom_killer_disabled. It is possible that LMK calls mark_oom_victim() due to allocation requests by kernel threads after current thread returned from oom_killer_disabled(). This will break synchronization for PM/suspend. This patch introduces per a task_struct flag for remembering processes killed by LMK, and replaces TIF_MEMDIE with that flag. By applying this patch, assumption by mark_oom_victim() becomes true. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Arve Hjonnevag <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30Staging: android: change memory allocation style in ion.cBen Marsh1-5/+5
Chnages memory allocation style in order to silence a checkpatch.pl warning. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30android: remove timed output/gpio driverRob Herring6-362/+0
timed_output was only used by the Android vibrator HAL which has now learned how to use LED triggers instead[1]. Any users of it in AOSP are on ancient kernels. Adding support for LED triggers is purely DT changes and proper kernel config. [1] https://android.googlesource.com/platform%2Fhardware%2Flibhardware/+/61701df363310a5cbd95e3e1638baa9526e42c9b Cc: John Stultz <john.stultz@linaro.org> Cc: "Arve Hjønnevåg" <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-25Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-2/+4
Pull drm fixes from Dave Airlie: "Just a couple of dma-buf related fixes and some amdgpu fixes, along with a regression fix for radeon off but default feature, but makes my 30" monitor happy again" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: drm/radeon/mst: cleanup code indentation drm/radeon/mst: fix regression in lane/link handling. drm/amdgpu: add invalidate_page callback for userptrs drm/amdgpu: Revert "remove the userptr rmn->lock" drm/amdgpu: clean up path handling for powerplay drm/amd/powerplay: fix memory leak of tdp_table dma-buf/fence: fix fence_is_later v2 dma-buf: Update docs for SYNC ioctl drm: remove excess description dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access() drm/atmel-hlcdc: use helper to get crtc state drm/atomic: use helper to get crtc state
2016-03-22staging: android: ion_test: fix check of platform_device_register_simple() error codeVladimir Zapolskiy1-2/+2
On error platform_device_register_simple() returns ERR_PTR() value, check for NULL always fails. The change corrects the check itself and propagates the returned error upwards. Fixes: 81fb0b901397 ("staging: android: ion_test: unregister the platform device") Cc: stable <stable@vger.kernel.org> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-21Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2-6/+4
Pull drm updates from Dave Airlie: "This is the main drm pull request for 4.6 kernel. Overall the coolest thing here for me is the nouveau maxwell signed firmware support from NVidia, it's taken a long while to extract this from them. I also wish the ARM vendors just designed one set of display IP, ARM display block proliferation is definitely increasing. Core: - drm_event cleanups - Internal API cleanup making mode_fixup optional. - Apple GMUX vga switcheroo support. - DP AUX testing interface Panel: - Refactoring of DSI core for use over more transports. New driver: - ARM hdlcd driver i915: - FBC/PSR (framebuffer compression, panel self refresh) enabled by default. - Ongoing atomic display support work - Ongoing runtime PM work - Pixel clock limit checks - VBT DSI description support - GEM fixes - GuC firmware scheduler enhancements amdkfd: - Deferred probing fixes to avoid make file or link ordering. amdgpu/radeon: - ACP support for i2s audio support. - Command Submission/GPU scheduler/GPUVM optimisations - Initial GPU reset support for amdgpu vmwgfx: - Support for DX10 gen mipmaps - Pageflipping and other fixes. exynos: - Exynos5420 SoC support for FIMD - Exynos5422 SoC support for MIPI-DSI nouveau: - GM20x secure boot support - adds acceleration for Maxwell GPUs. - GM200 support - GM20B clock driver support - Power sensors work etnaviv: - Correctness fixes for GPU cache flushing - Better support for i.MX6 systems. imx-drm: - VBlank IRQ support - Fence support - OF endpoint support msm: - HDMI support for 8996 (snapdragon 820) - Adreno 430 support - Timestamp queries support virtio-gpu: - Fixes for Android support. rockchip: - Add support for Innosilicion HDMI rcar-du: - Support for 4 crtcs - R8A7795 support - RCar Gen 3 support omapdrm: - HDMI interlace output support - dma-buf import support - Refactoring to remove a lot of legacy code. tilcdc: - Rewrite of pageflipping code - dma-buf support - pinctrl support vc4: - HDMI modesetting bug fixes - Significant 3D performance improvement. fsl-dcu (FreeScale): - Lots of fixes tegra: - Two small fixes sti: - Atomic support for planes - Improved HDMI support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (1063 commits) drm/amdgpu: release_pages requires linux/pagemap.h drm/sti: restore mode_fixup callback drm/amdgpu/gfx7: add MTYPE definition drm/amdgpu: removing BO_VAs shouldn't be interruptible drm/amd/powerplay: show uvd/vce power gate enablement for tonga. drm/amd/powerplay: show uvd/vce power gate info for fiji drm/amdgpu: use sched fence if possible drm/amdgpu: move ib.fence to job.fence drm/amdgpu: give a fence param to ib_free drm/amdgpu: include the right version of gmc header files for iceland drm/radeon: fix indentation. drm/amd/powerplay: add uvd/vce dpm enabling flag to fix the performance issue for CZ drm/amdgpu: switch back to 32bit hw fences v2 drm/amdgpu: remove amdgpu_fence_is_signaled drm/amdgpu: drop the extra fence range check v2 drm/amdgpu: signal fences directly in amdgpu_fence_process drm/amdgpu: cleanup amdgpu_fence_wait_empty v2 drm/amdgpu: keep all fences in an RCU protected array v2 drm/amdgpu: add number of hardware submissions to amdgpu_fence_driver_init_ring drm/amdgpu: RCU protected amd_sched_fence_release ...
2016-03-20Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-2/+2
Pull x86 protection key support from Ingo Molnar: "This tree adds support for a new memory protection hardware feature that is available in upcoming Intel CPUs: 'protection keys' (pkeys). There's a background article at LWN.net: https://lwn.net/Articles/643797/ The gist is that protection keys allow the encoding of user-controllable permission masks in the pte. So instead of having a fixed protection mask in the pte (which needs a system call to change and works on a per page basis), the user can map a (handful of) protection mask variants and can change the masks runtime relatively cheaply, without having to change every single page in the affected virtual memory range. This allows the dynamic switching of the protection bits of large amounts of virtual memory, via user-space instructions. It also allows more precise control of MMU permission bits: for example the executable bit is separate from the read bit (see more about that below). This tree adds the MM infrastructure and low level x86 glue needed for that, plus it adds a high level API to make use of protection keys - if a user-space application calls: mmap(..., PROT_EXEC); or mprotect(ptr, sz, PROT_EXEC); (note PROT_EXEC-only, without PROT_READ/WRITE), the kernel will notice this special case, and will set a special protection key on this memory range. It also sets the appropriate bits in the Protection Keys User Rights (PKRU) register so that the memory becomes unreadable and unwritable. So using protection keys the kernel is able to implement 'true' PROT_EXEC on x86 CPUs: without protection keys PROT_EXEC implies PROT_READ as well. Unreadable executable mappings have security advantages: they cannot be read via information leaks to figure out ASLR details, nor can they be scanned for ROP gadgets - and they cannot be used by exploits for data purposes either. We know about no user-space code that relies on pure PROT_EXEC mappings today, but binary loaders could start making use of this new feature to map binaries and libraries in a more secure fashion. There is other pending pkeys work that offers more high level system call APIs to manage protection keys - but those are not part of this pull request. Right now there's a Kconfig that controls this feature (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) that is default enabled (like most x86 CPU feature enablement code that has no runtime overhead), but it's not user-configurable at the moment. If there's any serious problem with this then we can make it configurable and/or flip the default" * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits) x86/mm/pkeys: Fix mismerge of protection keys CPUID bits mm/pkeys: Fix siginfo ABI breakage caused by new u64 field x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA mm/core, x86/mm/pkeys: Add execute-only protection keys support x86/mm/pkeys: Create an x86 arch_calc_vm_prot_bits() for VMA flags x86/mm/pkeys: Allow kernel to modify user pkey rights register x86/fpu: Allow setting of XSAVE state x86/mm: Factor out LDT init from context init mm/core, x86/mm/pkeys: Add arch_validate_pkey() mm/core, arch, powerpc: Pass a protection key in to calc_vm_flag_bits() x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU x86/mm/pkeys: Add Kconfig prompt to existing config option x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps x86/mm/pkeys: Dump PKRU with other kernel registers mm/core, x86/mm/pkeys: Differentiate instruction fetches x86/mm/pkeys: Optimize fault handling in access_error() mm/core: Do not enforce PKEY permissions on remote mm access um, pkeys: Add UML arch_*_access_permitted() methods mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys x86/mm/gup: Simplify get_user_pages() PTE bit handling ...
2016-03-19dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()Chris Wilson1-2/+4
Drivers, especially i915.ko, can fail during the initial migration of a dma-buf for CPU access. However, the error code from the driver was not being propagated back to ioctl and so userspace was blissfully ignorant of the failure. Rendering corruption ensues. Whilst fixing the ioctl to return the error code from dma_buf_start_cpu_access(), also do the same for dma_buf_end_cpu_access(). For most drivers, dma_buf_end_cpu_access() cannot fail. i915.ko however, as most drivers would, wants to avoid being uninterruptible (as would be required to guarrantee no failure when flushing the buffer to the device). As userspace already has to handle errors from the SYNC_IOCTL, take advantage of this to be able to restart the syscall across signals. This fixes a coherency issue for i915.ko as well as reducing the uninterruptible hold upon its BKL, the struct_mutex. Fixes commit c11e391da2a8fe973c3c2398452000bed505851e Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Thu Feb 11 20:04:51 2016 -0200 dma-buf: Add ioctls to allow userspace to flush Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible Testcase: igt/prime_mmap_coherency/ioctl-errors Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tiago Vignatti <tiago.vignatti@intel.com> Cc: Stéphane Marchesin <marcheu@chromium.org> Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Daniel Vetter <daniel.vetter@intel.com> CC: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Cc: intel-gfx@lists.freedesktop.org Cc: devel@driverdev.osuosl.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk
2016-03-11staging: android: ion: fix up file modeGreg Kroah-Hartman1-0/+0
An older accidentally changed this to executable, so fix it back up. Gotta love windows editors... Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: ion: debugfs invalid gfp maskDerek Yerger1-2/+2
The current code attempts assignment of -1 to an unsigned type. Note that in a downstream function ion_page_pool_shrink this mask is only ever evaluated against __GFP_HIGHMEM (drivers/staging/android/ion/ion_page_pool.c, line 125). Signed-off-by: Derek Yerger <dy@drexel.edu> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: lowmemorykiller: fix 2 checks that checkpatch complainedSandeep Jain1-0/+2
Specifically: lowmemorykiller.c:53: CHECK: use a blank line after enum declarations lowmemorykiller.c:60: CHECK: use a blank line after enum declarations Signed-off-by: Sandeep Jain <sandeepjain.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: android: ashmem.c: Convert macros page_range_{subsumes/subsumed_by/in}_range to static inline functionBhumika Goyal1-7/+16
Convert macros page_range_{subsumes/subsumed_by/in}_range to static inline function as static inline functions are preferred over macros. The change can be done as the arguments at all call sites have the same type. Also, all three macro have same type of arguments and return values so they can converted using a common semantic patch. @r@ identifier f; expression e; @@ #define f(...) e @r2@ identifier r.f; identifier range,start,end; expression r.e; @@ - #define f(range,start,end) e + static inline int f(struct ashmem_range *range, size_t start, size_t end) +{ + return e; +} Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: android: ashmem.c: Redefine macros as static inline functionsBhumika Goyal1-4/+8
Convert macros page_in_range and range_before_page into static inline functions as static inline functions are preferred over macros. The change can be done as the arguments at all call sites have the same type. Also, both the macros have same type of arguments and return values. Done using coccinelle: @r@ identifier f; expression e; @@ #define f(...) e @r1@ identifier r.f; identifier range,page; expression r.e; @@ - #define f(range,page) e + static inline int f(struct ashmem_range *range, size_t page) + { + return e; + } Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: android: Use devm_kcalloc instead of devm_kzallocAmitoj Kaur Chawla1-3/+2
Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof. The following Coccinelle semantic patch was used to make this change: //<smpl> @@ expression dev,E1,E2,E3; @@ - devm_kzalloc(dev,E1*sizeof(E2),E3) + devm_kcalloc(dev,E1,sizeof(E2),E3) //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: android: Replace min_t/max_t with min/maxAmitoj Kaur Chawla1-2/+2
Replace min_t/max_t with min/max when both variables are of the same type. The Coccinelle semantic patch used to make this change is as follows: @@ type T; T a,b; @@ - min_t(T, a, b) + min(a, b) @@ type T; T a,b; @@ - max_t(T, a, b) + max(a, b) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>