aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2017-02-04Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidAlex Shi
2017-02-01fbdev: color map copying bounds checkingKees Cook
commit 2dc705a9930b4806250fbf5a76e55266e59389f2 upstream. Copying color maps to userspace doesn't check the value of to->start, which will cause kernel heap buffer OOB read due to signedness wraps. CVE-2016-8405 Link: http://lkml.kernel.org/r/20170105224249.GA50925@beast Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kees Cook <keescook@chromium.org> Reported-by: Peter Pi (@heisecode) of Trend Micro Cc: Min Chong <mchong@google.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01ANDROID: video: goldfishfb: fix platform_no_drv_owner.cocci warningskbuild test robot
drivers/video/fbdev/goldfishfb.c:318:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Greg Hackmann <ghackmann@google.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-12-01ANDROID: goldfish_fb: Set pixclock = 0Christoffer Dall
User space Android code identifies pixclock == 0 as a sign for emulation and will set the frame rate to 60 fps when reading this value, which is the desired outcome. Change-Id: I759bf518bf6683446bc786bf1be3cafa02dd8d42 Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-12-01ANDROID: goldfish: Enable ACPI-based enumeration for goldfish framebufferYu Ning
Follow the same way in which ACPI was enabled for goldfish battery. See commit d3be10e for details. Note that this patch also depends on commit af33cac. Change-Id: Ic63b6e7e0a4b9896ef9a9d0ed135a7796a4c1fdb Signed-off-by: Yu Ning <yu.ning@intel.com>
2016-12-01ANDROID: video: goldfishfb: add devicetree bindingsGreg Hackmann
Change-Id: I5f4ba861b981edf39af537001f8ac72202927031 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-11-15ANDROID: video: adf: Avoid directly referencing user pointersJonathan Hamilton
Enabling KASAN on a kernel using ADF causes a number of places where user-supplied pointers to ioctls pointers are directly dereferenced without copy_from_user or access_ok. Bug: 31806036 Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com> Change-Id: I6e86237aaa6cec0f6e1c385336aefcc5332080ae
2016-10-29Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidAlex Shi
2016-10-28fbdev/efifb: Fix 16 color palette entry calculationMax Staudt
commit d50b3f43db739f03fcf8c0a00664b3d2fed0496e upstream. When using efifb with a 16-bit (5:6:5) visual, fbcon's text is rendered in the wrong colors - e.g. text gray (#aaaaaa) is rendered as green (#50bc50) and neighboring pixels have slightly different values (such as #50bc78). The reason is that fbcon loads its 16 color palette through efifb_setcolreg(), which in turn calculates a 32-bit value to write into memory for each palette index. Until now, this code could only handle 8-bit visuals and didn't mask overlapping values when ORing them. With this patch, fbcon displays the correct colors when a qemu VM is booted in 16-bit mode (in GRUB: "set gfxpayload=800x600x16"). Fixes: 7c83172b98e5 ("x86_64 EFI boot support: EFI frame buffer driver") # v2.6.24+ Signed-off-by: Max Staudt <mstaudt@suse.de> Acked-By: Peter Jones <pjones@redhat.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-12Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidAlex Shi
2016-05-04fbdev: da8xx-fb: fix videomodes of lcd panelsSushaanth Srirangapathi
commit 713fced8d10fa1c759c8fb6bf9aaa681bae68cad upstream. Commit 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the hsync/vsync pulse") fixes polarities of HSYNC/VSYNC pulse but forgot to update known_lcd_panels[] which had sync values according to old logic. This breaks LCD at least on DA850 EVM. This patch fixes this issue and I have tested this for panel "Sharp_LK043T1DG01" using DA850 EVM board. Fixes: 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the hsync/vsync pulse") Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-04xen kconfig: don't "select INPUT_XEN_KBDDEV_FRONTEND"Arnd Bergmann
commit 13aa38e291bdd4e4018f40dd2f75e464814dcbf3 upstream. The Xen framebuffer driver selects the xen keyboard driver, so the latter will be built-in if XEN_FBDEV_FRONTEND=y. However, when CONFIG_INPUT is a loadable module, this configuration cannot work. On mainline kernels, the symbol will be enabled but not used, while in combination with a patch I have to detect such useless configurations, we get the expected link failure: drivers/input/built-in.o: In function `xenkbd_remove': xen-kbdfront.c:(.text+0x2f0): undefined reference to `input_unregister_device' xen-kbdfront.c:(.text+0x30e): undefined reference to `input_unregister_device' This removes the extra "select", as it just causes more trouble than it helps. In theory, some defconfig file might break if it has XEN_FBDEV_FRONTEND in it but not INPUT_XEN_KBDDEV_FRONTEND. The Kconfig fragment we ship in the kernel (kernel/configs/xen.config) however already enables both, and anyone using an old .config file would keep having both enabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Suggested-by: David Vrabel <david.vrabel@citrix.com> Fixes: 36c1132e34bd ("xen kconfig: fix select INPUT_XEN_KBDDEV_FRONTEND") Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-07video: adf: Set ADF_MEMBLOCK to booleanGuenter Roeck
Attempts to build with CONFIG_ADF_MEMBLOCK=m result in the following build error. ERROR: "memblock_free" [drivers/video/adf/adf_memblock.ko] undefined! memblock_free() is marked as __init_memblock, so exporting it seems to be a bad idea. All other callers are only configurable into the kernel, so do the same with ADF_MEMBLOCK. Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-04-07video: adf: Fix modular buildGuenter Roeck
Builds with ADF configured as module fail the following errors. ERROR: "adf_fops" [drivers/video/adf/adf_sysfs.ko] undefined! ERROR: "adf_obj_sysfs_find" [drivers/video/adf/adf_fops.ko] undefined! ERROR: "adf_buffer_cleanup" [drivers/video/adf/adf_fops.ko] undefined! ERROR: "adf_attachment_validate" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_attachment_find" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_buffer_mapping_cleanup" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_attachment_free" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_obj_find_event_refcount" [drivers/video/adf/adf_client.ko] undefined! ERROR: "adf_file_queue_event" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_interface_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_interface_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_device_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_device_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_overlay_engine_sysfs_init" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_overlay_engine_sysfs_destroy" [drivers/video/adf/adf.ko] undefined! ERROR: "adf_sysfs_init" [drivers/video/adf/adf.ko] undefined! If ADF is configured as module, each of the object files ends up being a separate module. Since the functions are used across the various files but not exported, this results in the observed build errors. Modify the Makefile to create a single module instead. Fixes: 066a50cee536 ("video: add atomic display framework") Signed-off-by: Guenter Roeck <groeck@chromium.org>
2016-03-14Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-androidAlex Shi
Conflicts solution: keep 'KBUILD_CFLAGS += -fno-pic' in arch/arm64/Makefile
2016-03-09fbcon: set a default value to blink intervalJean-Philippe Brucker
commit a1e533ec07d583d01349ef13c0c965b8633e1b91 upstream. Since commit 27a4c827c34ac4256a190cc9d24607f953c1c459 fbcon: use the cursor blink interval provided by vt two attempts have been made at fixing a possible hang caused by cursor_timer_handler. That function registers a timer to be triggered at "jiffies + fbcon_ops.cur_blink_jiffies". A new case had been encountered during initialisation of clcd-pl11x: fbcon_fb_registered do_fbcon_takeover -> do_register_con_driver fbcon_startup (A) add_cursor_timer (with cur_blink_jiffies = 0) -> do_bind_con_driver visual_init fbcon_init (B) cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); If we take an softirq anywhere between A and B (and we do), cursor_timer_handler executes indefinitely. Instead of patching all possible paths that lead to this case one at a time, fix the issue at the source and initialise cur_blink_jiffies to 200ms when allocating fbcon_ops. This was its default value before aforesaid commit. fbcon_cursor or fbcon_init will refine this value downstream. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> Tested-by: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-16video: adf: build fixes for 4.1Amit Pundir
Couple of ADF build fixes for v4.1 adf/adf_fops.c fix: get_unused_fd() is obsolete, use get_unused_fd_flags(O_CLOEXEC) instead to allocate a default file descriptor. This fix is a followup of upstream commit f938612dd97d "include/linux/file.h: remove get_unused_fd() macro". adf/adf_memblock.c fix: Fix dma_buf_export() call. Based on mainline commit d8fbe341beb6 "dma-buf: cleanup dma_buf_export() to make it easily extensible". Otherwise we run into following build failures: ---------- CC drivers/video/adf/adf_fops.o CC drivers/video/adf/adf_memblock.o drivers/video/adf/adf_memblock.c: In function ‘adf_memblock_export’: drivers/video/adf/adf_memblock.c:154:2: warning: passing argument 1 of ‘dma_buf_export’ from incompatible pointer type [enabled by default] In file included from drivers/video/adf/adf_memblock.c:15:0: include/linux/dma-buf.h:211:17: note: expected ‘const struct dma_buf_export_info *’ but argument is of type ‘struct adf_memblock_pdata *’ drivers/video/adf/adf_memblock.c:154:2: error: too many arguments to function ‘dma_buf_export’ In file included from drivers/video/adf/adf_memblock.c:15:0: include/linux/dma-buf.h:211:17: note: declared here make[3]: *** [drivers/video/adf/adf_memblock.o] Error 1 make[3]: *** Waiting for unfinished jobs.... drivers/video/adf/adf_fops.c: In function ‘adf_device_post_config’: drivers/video/adf/adf_fops.c:228:2: error: implicit declaration of function ‘get_unused_fd’ [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/video/adf/adf_fops.o] Error 1 make[2]: *** [drivers/video/adf] Error 2 make[2]: *** Waiting for unfinished jobs.... ---------- Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-02-16video: adf: fix memblock build failureAmit Pundir
Pass 'NULL' as the 5th argument to dma_buf_export() to fix the following build failure: ---------- CC drivers/video/adf/adf_memblock.o drivers/video/adf/adf_memblock.c: In function ‘adf_memblock_export’: drivers/video/adf/adf_memblock.c:154:60: error: macro "dma_buf_export" requires 5 arguments, but only 4 given drivers/video/adf/adf_memblock.c:154:8: error: ‘dma_buf_export’ undeclared (first use in this function) drivers/video/adf/adf_memblock.c:154:8: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [drivers/video/adf/adf_memblock.o] Error 1 make[2]: *** [drivers/video/adf] Error 2 ---------- 5th argument to dma_buf_export() is a pointer to 'reservation-object' and a new 'reservation-object' is allocated in case 'NULL' is passed. Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2016-02-16video: adf: fix wrong bitops in adf_modeinfo_to_fb_videomode()Greg Hackmann
Change-Id: I1296153e382c0b66b713a0e7d09665ed5961f13d Signed-off-by: Greg Hackmann <ghackmann@google.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
2016-02-16video: adf: Cleanup sw_sync timeline at adf_device_destroyJonathan Hamilton
If a sw_sync timeline was created by ADF (for drivers that do not implement ops->complete_fence) we should clean it up when the ADF device is destroyed. Change-Id: Idd90180fcae56a87111f7d12bdd80190756a6b80 Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
2016-02-16video: adf: memblock: map buffer for dmaGreg Hackmann
Change-Id: I4df13c8b45b57fd0594b5e7bf351a4da33a8cb11 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: use rb_erase in adf_obj_destroy.Alistair Strachan
Not calling rb_erase() can cause slab corruption, as the rb_first() call after kfree() in adf_obj_destroy() can return the same node twice unless it is erased. This problem was reproduced by unloading a kernel module that used the adf framework *after* a vsync event was registered. A crash would occur in rb_first(). (Just loading and immediately unloading the module without the vsync event worked correctly.) Change-Id: I9fa7cb5d7519691e38a281439844aa193da13d1b Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com> Cc: Jonathan Hamilton <jonathan.hamilton@imgtec.com> Cc: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: adf_memblock_export symbol should be exportedGreg Hackmann
Change-Id: I228db28da885b47b6fa9fc7e4001663797d24f49 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add buffer padding quirkGreg Hackmann
Quirks specify common behaviors that vary slightly among devices, and which ADF must account for. The buffer padding quirk captures the way different devices fetch the last scanline in a buffer: some devices fetch an entire line (including padding to the pitch) while others only fetch up to the visible width. ADF's buffer size validation now takes this quirk into account. Change-Id: I828b13316e27621d8a9efd9d5fffa6ce12a525ff Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: document adf_format_validate_yuv's originGreg Hackmann
Change-Id: I929045a96a56bdb2c915be92b8ef11b560f3ab79 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: ensure consistent alignment on userspace facing structsGreg Hackmann
64-bit types in structs create alignment problems when a 32-bit x86 userspace talks to an x86_64 kernel. In most cases the 64-bit types can be replaced with 32-bit ones, since they're being used for fds and should have been __s32 in the first place. For adf_vsync_event, alignment can be enforced by making the timestamp an __aligned_u64. Change-Id: I87cf73d8f57730bd7bb43ffce6b7b411eb0ff198 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: replace fbdev helper's open flag with refcountGreg Hackmann
A device's fb_info is shared between clients. fb_release() is called when each client is released, not just the last one. Since the fbdev helper needs to release its dma-buf when the last client goes away, it must keep its own reference count. fbmem and fbcon hold different locks while calling fb_release(), so explicit locking is needed. Change-Id: I42cd659f7633adba7c11f407d4b594bd43305d6a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: export the adf_attachment_allow symbol to modules.Alistair Strachan
There are no in-tree users of adf_attachment_allow, but out-of-tree modules want to use it. It looks like this function should be EXPORT_SYMBOL. Change-Id: Iad522dc5d32ac09fec6483bbc317db8ecae12e97 Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
2016-02-16video: adf: use %zu when printing size_tGreg Hackmann
Change-Id: I9cf7ebc368bad0a83db9e5aa370feadf117b21c0 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: fix compat ioctls calling ioctl with wrong cmdGreg Hackmann
Change-Id: Icdbac3edd123b3114103dc138a60e6955006cda4 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: use ADF_IOCTL_TYPE in compat ioctl definitionsGreg Hackmann
Change-Id: I7451a282d9d972c9957568b366c164b67b4b47e8 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: fix fbdev blank -> dpms state mappingGreg Hackmann
Change-Id: I96132a1b7275d389a6d0ba8899c6be838b63c422 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: validate dpms state passed to blankGreg Hackmann
Change-Id: I3a4228d50fc4a2553b3e92e5675a94cbc6e71b8a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: make device node names less hierarchicalGreg Hackmann
adf/foobar/device -> adf0 adf/foobar/interface1 -> adf-interface0.1 adf/foobar/overlay-engine1 -> adf-overlay-engine0.1 Change-Id: I7af7f84ce3f101ecb02f448070c200ff3e03f2ec Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: expose adf_modeinfo_set_{name,vrefresh} to driversGreg Hackmann
Change-Id: Id9f8b2184927a77b244ce0b33d619d6e44a0f17a Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: set default interface dpms_state to OFFGreg Hackmann
Interfaces default to unplugged, so they should also default to off Change-Id: I36500a54b11f354a0d7dd2c9924a79e0d9c6f855 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: make dpms_state sysfs attribute writableGreg Hackmann
Change-Id: I04e7785cbddac160003e6c9edaf62d20b367fdc9 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add helpers for validating custom formatsGreg Hackmann
Many custom formats look a lot like the standard ones, but with different subsampling, bpp, etc. Expose and document adf_buffer_validate()'s main body, so drivers can reuse its logic when validating these formats. Change-Id: I1d06981c9e5aab26f3ab2956c08c679f2c823bcc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add informational flags to interfacesGreg Hackmann
Informational flags don't affect ADF directly but may be useful to clients. Currently used to indicate primary and external displays. Change-Id: I343c7f0148da0869244c8e818350e9855525df85 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add fbdev compatibility helperGreg Hackmann
Change-Id: I2b82bb625f805e8edb27799743b290dda5befb97 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add supported formats to adf_overlay_engine_dataGreg Hackmann
Change-Id: If2aa783b9ece60160f465bf697508fc58682e1bc Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: support "simple" buffersGreg Hackmann
Simple buffers are linear RGB buffers analogous to KMS's dumb buffers. Simple buffers can be allocated and posted to a display interface without any driver-private data. Internally, ADF drivers provide the driver-private data needed (if any) to post a simple buffer to the display. Change-Id: Ib0b737622eaf343111310f6623f99d69cf3807d2 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: adf: add memblock helperGreg Hackmann
Provides a dma-buf exporter for memblocks, mainly useful for ADF devices to wrap their bootloader logos Change-Id: I936a9b5df099ab6084d433fcaf50f3bc29f93289 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2016-02-16video: add atomic display frameworkGreg Hackmann
Change-Id: I693257e269a99012cd0dbb57576ac222869cf4c7 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-12-09OMAPDSS: fix timings for VENC to match what omapdrm expectsH. Nikolaus Schaller
Otherwise check_timings fails and we get a "has no modes" message from xrandr. This fix makes the venc assume PAL and NTSC timings that match the timings synthetized by copy_timings_drm_to_omap() from omapdrm mode settings so that check_timings() succeeds. Tested on: BeagleBoard XM, GTA04 and OpenPandora Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-12-09video: fbdev: fsl: Fix kernel crash when diu_ops is not implementedWang Dongsheng
If diu_ops is not implemented on platform, kernel will access a NULL pointer. We need to check this pointer in DIU initialization. Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Acked-by: Timur Tabi <timur@tabi.org> Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-11-10Merge tag 'fbdev-4.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: - omap: fix hdmi audio configuration issue - ssd1307fb: add ssd1309 support - tridentfb: support DDC - gxt4500: enable support for non-PPC platforms * tag 'fbdev-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: radeonfb: Deinline large functions gxt4500: enable panning gxt4500: Use arch_phys_wc_* for framebuffer gxt4500: fix color order gxt4500: fix 16bpp 565 mode gxt4500: enable on non-PPC architectures tridentfb: Add DDC support fb_ddc: Allow I2C adapters without SCL read capability fbdev: ssd1307fb: add ssd1309 support fbdev: ssd1307fb: alphabetize headers video/omap: remove invalid check OMAPDSS: hdmi: Reconfigure and restart audio when display is enabled
2015-11-06mm, page_alloc: distinguish between being unable to sleep, unwilling to ↵Mel Gorman
sleep and avoiding waking kswapd __GFP_WAIT has been used to identify atomic context in callers that hold spinlocks or are in interrupts. They are expected to be high priority and have access one of two watermarks lower than "min" which can be referred to as the "atomic reserve". __GFP_HIGH users get access to the first lower watermark and can be called the "high priority reserve". Over time, callers had a requirement to not block when fallback options were available. Some have abused __GFP_WAIT leading to a situation where an optimisitic allocation with a fallback option can access atomic reserves. This patch uses __GFP_ATOMIC to identify callers that are truely atomic, cannot sleep and have no alternative. High priority users continue to use __GFP_HIGH. __GFP_DIRECT_RECLAIM identifies callers that can sleep and are willing to enter direct reclaim. __GFP_KSWAPD_RECLAIM to identify callers that want to wake kswapd for background reclaim. __GFP_WAIT is redefined as a caller that is willing to enter direct reclaim and wake kswapd for background reclaim. This patch then converts a number of sites o __GFP_ATOMIC is used by callers that are high priority and have memory pools for those requests. GFP_ATOMIC uses this flag. o Callers that have a limited mempool to guarantee forward progress clear __GFP_DIRECT_RECLAIM but keep __GFP_KSWAPD_RECLAIM. bio allocations fall into this category where kswapd will still be woken but atomic reserves are not used as there is a one-entry mempool to guarantee progress. o Callers that are checking if they are non-blocking should use the helper gfpflags_allow_blocking() where possible. This is because checking for __GFP_WAIT as was done historically now can trigger false positives. Some exceptions like dm-crypt.c exist where the code intent is clearer if __GFP_DIRECT_RECLAIM is used instead of the helper due to flag manipulations. o Callers that built their own GFP flags instead of starting with GFP_KERNEL and friends now also need to specify __GFP_KSWAPD_RECLAIM. The first key hazard to watch out for is callers that removed __GFP_WAIT and was depending on access to atomic reserves for inconspicuous reasons. In some cases it may be appropriate for them to use __GFP_HIGH. The second key hazard is callers that assembled their own combination of GFP flags instead of starting with something like GFP_KERNEL. They may now wish to specify __GFP_KSWAPD_RECLAIM. It's almost certainly harmless if it's missed in most cases as other activity will wake kswapd. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-06Merge tag 'backlight-for-linus-4.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Device Support - None New Functionality: - None Core Frameworks: - Reject legacy PWM request for device defined in DT Fix-ups: - Remove unnecessary MODULE_ALIAS(); adp8860_bl, adp8870_bl - Simplify code: pm8941-wled - Supply default-brightness logic; pm8941-wled Bug Fixes: - Clean up OF node; 88pm860x_bl - Ensure struct is zeroed; lp855x_bl" * tag 'backlight-for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: pm8941-wled: Add default-brightness property backlight: pm8941-wled: Fix ptr_ret.cocci warnings backlight: pwm: Reject legacy PWM request for device defined in DT backlight: 88pm860x_bl: Add missing of_node_put backlight: adp8870: Remove unnecessary MODULE_ALIAS() backlight: adp8860: Remove unnecessary MODULE_ALIAS() backlight: lp855x: Make sure props struct is zeroed
2015-11-05Merge tag 'spi-v4.4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Quite a lot of activity in SPI this cycle, almost all of it in drivers with a few minor improvements and tweaks in the core. - Updates to pxa2xx to support Intel Broxton and multiple chip selects. - Support for big endian in the bcm63xx driver. - Multiple slave support for the mt8173 - New driver for the auxiliary SPI controller in bcm2835 SoCs. - Support for Layerscale SoCs in the Freescale DSPI driver" * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits) spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI spi: pxa2xx: Add support for Intel Broxton spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals spi: pxa2xx: Add output control for multiple Intel LPSS chip selects spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific spi: Add DSPI support for layerscape family spi: ti-qspi: improve ->remove() callback spi/spi-xilinx: Fix race condition on last word read spi: Drop owner assignment from spi_drivers spi: Add THIS_MODULE to spi_driver in SPI core spi: Setup the master controller driver before setting the chipselect spi: dw: replace magic constant by DW_SPI_DR spi: mediatek: mt8173 spi multiple devices support spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: remove mtk_spi_config spi: mediatek: Update document devicetree bindings to support multiple devices spi: fix kernel-doc warnings about missing return desc in spi.c spi: fix kernel-doc warnings about missing return desc in spi.h spi: pxa2xx: Align a few defines spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select ...