summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/mediatek: use layer_nr function to get layer number to init planeStu Hsieh2018-08-272-8/+14
| | | | | | | | | | | | | | | | | This patch use layer_nr function to get layer number to init plane When plane init in crtc create, it use the number of OVL layer to init plane. That's OVL can read 4 memory address. For mt2712 third ddp, it use RDMA to read memory. RDMA can read 1 memory address, so it just init one plane. For compatibility, this patch use mtk_ddp_comp_layer_nr function to get layer number from their HW component in ddp for plane init. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add function to return RDMA layer numberStu Hsieh2018-08-271-0/+6
| | | | | | | | | This patch add function to return RDMA layer number RDMA always has one layer. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add function to return OVL layer numberStu Hsieh2018-08-271-0/+6
| | | | | | | | | This patch add function to return OVL layer number For now, MT8173, MT2712, MT2701 OVL all has 4 layer. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add function to get layer number for componentStu Hsieh2018-08-271-0/+9
| | | | | | | This patch add function to get layer number for component Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add YUYV/UYVY color format support for RDMAStu Hsieh2018-08-271-0/+20
| | | | | | | | This patch add YUYV/UYVY color format support for RDMA and transform matrix for YUYV/UYVY. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add the comment about color format setting for OVLStu Hsieh2018-08-271-0/+5
| | | | | | | This patch add the comment about color format setting for OVL Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add RGB color format support for RDMAStu Hsieh2018-08-271-0/+45
| | | | | | | | This patch add RGB color format support for RDMA, including RGB565, RGB888, RGBA8888 and ARGB8888. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add memory mode and layer_config for RDMAStu Hsieh2018-08-271-0/+21
| | | | | | | | | | | This patch add memory mode for RDMA and layer_config for RDMA If use RDMA to read data from memory, it should set memory mode to RDMA Layer config set the data address and pitch to RDMA from plane setting. Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add connection from RDMA2 to DSI0Stu Hsieh2018-08-271-0/+4
| | | | | | | This patch add connection from RDMA2 to DSI0 Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add connection from RDMA1 to DSI0Stu Hsieh2018-08-271-0/+4
| | | | | | | This patch add connection from RDMA1 to DSI0 Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add connection from RDMA0 to DSI1Stu Hsieh2018-08-271-0/+4
| | | | | | | This patch add connection from RDMA0 to DSI1 Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: add connection from RDMA0 to DPI1Stu Hsieh2018-08-271-0/+4
| | | | | | | This patch add connection from RDMA0 to DPI1 Signed-off-by: Stu Hsieh <stu.hsieh@mediatek.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: Replace drm_dev_unref with drm_dev_putThomas Zimmermann2018-08-271-3/+3
| | | | | | | | | | This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* drm/mediatek: Convert drm_atomic_helper_suspend/resume()Souptick Joarder2018-08-271-13/+8
| | | | | | | | | convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Signed-off-by: Ajit Negi <ajitn.linux@gmail.com> Signed-off-by: CK Hu <ck.hu@mediatek.com>
* Linux 4.19-rc1v4.19-rc1Linus Torvalds2018-08-261-2/+2
|
* Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds2018-08-261-0/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer update from Thomas Gleixner: "New defines for the compat time* types so they can be shared between 32bit and 64bit builds. Not used yet, but merging them now allows the actual conversions to be merged through different maintainer trees without dependencies We still have compat interfaces for 32bit on 64bit even with the new 2038 safe timespec/val variants because pointer size is different. And for the old style timespec/val interfaces we need yet another 'compat' interface for both 32bit native and 32bit on 64bit" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: y2038: Provide aliases for compat helpers
| * y2038: Provide aliases for compat helpersArnd Bergmann2018-08-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the system call rework for 64-bit time_t, we are restructuring the way that compat syscalls deal with 32-bit time_t, reusing the implementation for 32-bit architectures. Christoph Hellwig suggested a rename of the associated types and interfaces to avoid the confusing usage of the 'compat' prefix for 32-bit architectures. To prepare for doing that in linux-4.20, add a set of macros that allows to convert subsystems separately to the new names and avoids some of the nastier merge conflicts. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Christoph Hellwig <hch@lst.de> Cc: y2038@lists.linaro.org Cc: John Stultz <john.stultz@linaro.org> Cc: Deepa Dinamani <deepa.kernel@gmail.com> Link: https://lkml.kernel.org/r/20180821203329.2089473-1-arnd@arndb.de
* | Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-daxLinus Torvalds2018-08-2628-679/+485
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull IDA updates from Matthew Wilcox: "A better IDA API: id = ida_alloc(ida, GFP_xxx); ida_free(ida, id); rather than the cumbersome ida_simple_get(), ida_simple_remove(). The new IDA API is similar to ida_simple_get() but better named. The internal restructuring of the IDA code removes the bitmap preallocation nonsense. I hope the net -200 lines of code is convincing" * 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax: (29 commits) ida: Change ida_get_new_above to return the id ida: Remove old API test_ida: check_ida_destroy and check_ida_alloc test_ida: Convert check_ida_conv to new API test_ida: Move ida_check_max test_ida: Move ida_check_leaf idr-test: Convert ida_check_nomem to new API ida: Start new test_ida module target/iscsi: Allocate session IDs from an IDA iscsi target: fix session creation failure handling drm/vmwgfx: Convert to new IDA API dmaengine: Convert to new IDA API ppc: Convert vas ID allocation to new IDA API media: Convert entity ID allocation to new IDA API ppc: Convert mmu context allocation to new IDA API Convert net_namespace to new IDA API cb710: Convert to new IDA API rsxx: Convert to new IDA API osd: Convert to new IDA API sd: Convert to new IDA API ...
| * | ida: Change ida_get_new_above to return the idMatthew Wilcox2018-08-211-18/+12
| | | | | | | | | | | | | | | | | | | | | This calling convention makes more sense for the implementation as well as the callers. It even shaves 32 bytes off the compiled code size. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | ida: Remove old APIMatthew Wilcox2018-08-213-67/+11
| | | | | | | | | | | | | | | | | | | | | | | | Delete ida_pre_get(), ida_get_new(), ida_get_new_above() and ida_remove() from the public API. Some of these functions still exist as internal helpers, but they should not be called by consumers. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | test_ida: check_ida_destroy and check_ida_allocMatthew Wilcox2018-08-212-66/+58
| | | | | | | | | | | | | | | | | | | | | Move these tests from the userspace test-suite to the kernel test-suite. Also convert check_ida_random to the new API. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | test_ida: Convert check_ida_conv to new APIMatthew Wilcox2018-08-212-46/+40
| | | | | | | | | | | | | | | | | | | | | | | | Move as much as possible to kernel space; leave the parts in user space that rely on checking memory allocation failures to detect the transition between an exceptional entry and a bitmap. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | test_ida: Move ida_check_maxMatthew Wilcox2018-08-212-28/+23
| | | | | | | | | | | | | | | | | | Convert to new API and move to kernel space. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | test_ida: Move ida_check_leafMatthew Wilcox2018-08-212-27/+25
| | | | | | | | | | | | | | | | | | | | | Convert to new API and move to kernel space. Take the opportunity to test the situation a little more thoroughly (ie at different offsets). Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | idr-test: Convert ida_check_nomem to new APIMatthew Wilcox2018-08-211-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | We can't move this test to kernel space because there's no way to force kmalloc to fail. But we can use the new API and check this works when the test is in userspace. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | ida: Start new test_ida moduleMatthew Wilcox2018-08-217-7/+71
| | | | | | | | | | | | | | | | | | | | | Start transitioning the IDA tests into kernel space. Framework heavily cribbed from test_xarray.c. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | target/iscsi: Allocate session IDs from an IDAMatthew Wilcox2018-08-213-30/+10
| | | | | | | | | | | | | | | | | | | | | Since the session is never looked up by ID, we can use the more space-efficient IDA instead of the IDR. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | iscsi target: fix session creation failure handlingMike Christie2018-08-211-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that iscsi_login_zero_tsih_s1 sets conn->sess early in iscsi_login_set_conn_values. If the function fails later like when we alloc the idr it does kfree(sess) and leaves the conn->sess pointer set. iscsi_login_zero_tsih_s1 then returns -Exyz and we then call iscsi_target_login_sess_out and access the freed memory. This patch has iscsi_login_zero_tsih_s1 either completely setup the session or completely tear it down, so later in iscsi_target_login_sess_out we can just check for it being set to the connection. Cc: stable@vger.kernel.org Fixes: 0957627a9960 ("iscsi-target: Fix sess allocation leak in...") Signed-off-by: Mike Christie <mchristi@redhat.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | drm/vmwgfx: Convert to new IDA APIMatthew Wilcox2018-08-211-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reorder allocation to avoid an awkward lock/unlock/lock sequence. Simpler code due to being able to use ida_alloc_max(), even if we can't eliminate the driver's spinlock. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
| * | dmaengine: Convert to new IDA APIMatthew Wilcox2018-08-211-16/+7
| | | | | | | | | | | | | | | | | | | | | Simpler and shorter code. Signed-off-by: Matthew Wilcox <willy@infradead.org> Acked-by: Vinod Koul <vkoul@kernel.org>
| * | ppc: Convert vas ID allocation to new IDA APIMatthew Wilcox2018-08-211-22/+4
| | | | | | | | | | | | | | | | | | | | | Removes a custom spinlock and simplifies the code. Also fix an error where we could allocate one ID too many. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | media: Convert entity ID allocation to new IDA APIMatthew Wilcox2018-08-211-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | Removes a call to ida_pre_get(). Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * | ppc: Convert mmu context allocation to new IDA APIMatthew Wilcox2018-08-211-40/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | ida_alloc_range is the perfect fit for this use case. Eliminates a custom spinlock, a call to ida_pre_get and a local check for the allocated ID exceeding a maximum. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
| * | Convert net_namespace to new IDA APIMatthew Wilcox2018-08-211-10/+6
| | | | | | | | | | | | Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | cb710: Convert to new IDA APIMatthew Wilcox2018-08-211-18/+5
| | | | | | | | | | | | | | | | | | | | | Eliminates the custom spinlock and the call to ida_pre_get. Signed-off-by: Matthew Wilcox <willy@infradead.org> Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
| * | rsxx: Convert to new IDA APIMatthew Wilcox2018-08-211-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | Eliminate the custom spinlock and the call to ida_pre_get. Also add a call to ida_free() in the card remove routine, which I believe fixes a bug in this driver. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | osd: Convert to new IDA APIMatthew Wilcox2018-08-211-15/+7
| | | | | | | | | | | | | | | | | | Slightly simpler code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | sd: Convert to new IDA APIMatthew Wilcox2018-08-211-17/+4
| | | | | | | | | | | | | | | | | | Allows us to remove an explicit spinlock. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | devpts: Convert to new IDA APIMatthew Wilcox2018-08-211-34/+13
| | | | | | | | | | | | | | | | | | | | | | | | ida_alloc_max() matches what this driver wants to do. Also removes a call to ida_pre_get(). We no longer need the protection of the mutex, so convert pty_count to an atomic_t and remove the mutex entirely. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | fs: Convert namespace IDAs to new APIMatthew Wilcox2018-08-211-38/+12
| | | | | | | | | | | | | | | | | | We don't need to keep track of the starting value; the IDA is efficient. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | fs: Convert unnamed_dev_ida to new APIMatthew Wilcox2018-08-211-43/+24
| | | | | | | | | | | | | | | | | | | | | The new API is much easier for this user. Also add kerneldoc for get_anon_bdev(). Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | mtip32xx: Convert to new IDA APIMatthew Wilcox2018-08-211-23/+6
| | | | | | | | | | | | | | | | | | | | | Removes a use of ida_pre_get() and a personalised spinlock. Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
| * | ida: Add new APIMatthew Wilcox2018-08-212-42/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ida_alloc(), ida_alloc_min(), ida_alloc_max(), ida_alloc_range() and ida_free(). The ida_alloc_max() and ida_alloc_range() functions differ from ida_simple_get() in that they take an inclusive 'max' parameter instead of an exclusive 'end' parameter. Callers are about evenly split whether they'd like inclusive or exclusive parameters and 'max' is easier to document than 'end'. Change the IDA allocation to first attempt to allocate a bit using existing memory, and only allocate memory afterwards. Also change the behaviour of 'min' > INT_MAX from being a BUG() to returning -ENOSPC. Leave compatibility wrappers in place for ida_simple_get() and ida_simple_remove() to avoid changing all callers. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | ida: Lock the IDA in ida_destroyMatthew Wilcox2018-08-211-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The user has no need to handle locking between ida_simple_get() and ida_simple_remove(). They shouldn't be forced to think about whether ida_destroy() might be called at the same time as any of their other IDA manipulation calls. Improve the documnetation while I'm in here. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | radix-tree: Fix UBSAN warningMatthew Wilcox2018-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_slot_offset() can be called with a NULL 'parent' argument. In this case, the calculated value will not be used, but calculating it is undefined. Rather than fixing the caller (__radix_tree_delete) to not call get_slot_offset(), make get_slot_offset() robust against being called with a NULL parent. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | radix tree test suite: Enable ubsanMatthew Wilcox2018-08-212-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | Add support for the undefined behaviour sanitizer and fix the bugs that ubsan pointed out. Nothing major, and all in the test suite, not the code. Signed-off-by: Matthew Wilcox <willy@infradead.org>
| * | radix tree test suite: Fix compilationMatthew Wilcox2018-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | An include of xarray.h was added to lib/idr.c without updating the test suite. Signed-off-by: Matthew Wilcox <willy@infradead.org>
* | | Merge tag 'gcc-plugins-v4.19-rc1-fix' of ↵Linus Torvalds2018-08-261-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc plugin fix from Kees Cook: "Lift gcc test into Kconfig. This is for better behavior when the kernel is built with Clang, reported by Stefan Agner" * tag 'gcc-plugins-v4.19-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: Disable when building under Clang
| * | | gcc-plugins: Disable when building under ClangKees Cook2018-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to doing compiler feature detection in Kconfig, attempts to build GCC plugins with Clang would fail the build, much in the same way missing GCC plugin headers would fail the build. However, now that this logic has been lifted into Kconfig, add an explicit test for GCC (instead of duplicating it in the feature-test script). Reported-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | | | Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds2018-08-2693-1628/+3259
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Thomas Gleixner: "Kernel: - Improve kallsyms coverage - Add x86 entry trampolines to kcore - Fix ARM SPE handling - Correct PPC event post processing Tools: - Make the build system more robust - Small fixes and enhancements all over the place - Update kernel ABI header copies - Preparatory work for converting libtraceevnt to a shared library - License cleanups" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits) tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' tools arch x86: Update tools's copy of cpufeatures.h perf python: Fix pyrf_evlist__read_on_cpu() interface perf mmap: Store real cpu number in 'struct perf_mmap' perf tools: Remove ext from struct kmod_path perf tools: Add gzip_is_compressed function perf tools: Add lzma_is_compressed function perf tools: Add is_compressed callback to compressions array perf tools: Move the temp file processing into decompress_kmodule perf tools: Use compression id in decompress_kmodule() perf tools: Store compression id into struct dso perf tools: Add compression id into 'struct kmod_path' perf tools: Make is_supported_compression() static perf tools: Make decompress_to_file() function static perf tools: Get rid of dso__needs_decompress() call in __open_dso() perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble() perf tools: Get rid of dso__needs_decompress() call in read_object_code() tools lib traceevent: Change to SPDX License format perf llvm: Allow passing options to llc in addition to clang perf parser: Improve error message for PMU address filters ...