summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2019-07-29video: fbdev: mxsfb: Fix flags not being appliedPhilippe Schenker
If one used display timings in devicetree the display_flags like pixelclk-active have not been applied. This commit fixes that and puts some nice debug messages so one can see from where those timings are applied. This fixes commit f397f60efbb24c2906cd95f443607b2642b49b24 "video: fbdev: mxsfb: allow setting display timings via kernel command line" Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 17652e758b1236c49d2e1d336d81a832452b7c53)
2019-07-29Revert "video: fbdev: mxsfb: honor native-mode"Philippe Schenker
This commit should not be in 4.14 and was accidentally introduced from 4.1 to 4.9 merge. It originally was deleted with commit: "f397f60e video: fbdev: mxsfb: allow setting display timings via kernel command line" This reverts commit 721dee144c883aebd6e997a53eed3ab3c24cef79.
2019-07-02Video: backlight: Enable backlight in any casePhilippe Schenker
This patch enables the backlight in any case. Mainline assumes now that backlight is turned on from an appropriate driver to get flickerless backlight experience. Theres no such thing in downstream, so get rid of the code part that blocks backlight from turning on. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2019-05-24video: fbdev: mxsfb: honor native-modeStefan Agner
Honor the native-mode property by adding only that mode to the mode list. With that we loose the list of modes, but we currently don't make use of it anyway. Also, the mode list lacks the pixel clock polarity information since struct fb_videomode does not store this information. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 3cb3771edb98e2ae79a887368fc042b89456da7e)
2019-05-24video: mxsfb: simplify parsingStefan Agner
Use the timing count from the parsed struct display_timings instead of looping through the device tree again. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 65be28e2a2b3761d088b20c43994be97d74c342f)
2019-05-24video: fbdev: mxsfb: fix pixelclock polarityStefan Agner
The PIXDATA flags of the display_flags enum are controller centric, e.g. NEGEDGE means the controller shall drive the data signals on pixelclocks negative edge. However, the drivers flag is display centric: Sample the data on negative (falling) edge. Therefore, change the if statement to check for the POSEDGE flag (which is typically not set): Drive on positive edge => sample on negative edge Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 5652dc1ad78303fb246f050ba23c563319d823cf)
2019-05-24video: fbdev: mxsfb: allow setting display timings via kernel command lineBhuvanchandra DV
Add support to allow configuring the display timings via kernel command line. e.g.: video=mxsfb:800x480M-16@60,pixclockpol=1,outputen=1 Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 22db6beb45cba5a67cab9e9a55cd60d7471591d9) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Conflicts: drivers/video/fbdev/mxsfb.c
2019-05-24mxc_ipuv3_fb: Use the mode_string from command line as isBhuvanchandra DV
Using the mode_str passed via device tree as default fall back, fb_find_mode fails while finding the mode, so avoid using the non standard mode_str passed via device tree and use the mode_str from command line as is. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 50e26af30f04d24f4783dae15206c5dba889fd2b)
2019-05-24video: fbdev: mxsfb: make sure runtime PM is suspended in system suspendStefan Agner
Use force suspend/resume to trigger runtime PM when entering system suspend. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit ebf45652f2e9ec2ab19831d852363deadeb6407e)
2019-05-24video: mxc: ldb: Add support for LVDS configuration via kernel boot argumentsBhuvanchandra DV
Add support for LVDS frame buffer configuration via kernel boot arguments. Fix use of the device tree native-mode property. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 122acb64708ac40faa8c5755624a0bcfbebcb9e8) (cherry picked from commit 735d4f8addae71ef4a70eb16a9639bd6204fd2b9)
2019-05-24mxc_hdmi.c: fix boot hangMax Krummenacher
Without this the kernel hangs during boot when HDMI is attached. It looks like we get an overflow IRQ storm. overflow is related to HDMI audio. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit ab9e816efb07dcaec23d3c55d3db1773b745ae47) (cherry picked from commit d2e0de0ea4c48d0cbbadc28ac4785bd0ed202ea4)
2019-05-24mxc_lcdif.c: fix commentMax Krummenacher
copy/paste error in pixelclock frequency Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 291333761167e85e53fb21cbb4a6b97d618a41c8) (cherry picked from commit 1fe0cf435e9a938d61a3750140026292183c097c)
2019-05-24mxc_hdmi: fix detect disconnect caseMax Krummenacher
The keepalive module variable allows to not go into a disconnected state. Fix the case when keepalive is set to go to disconnect. Add a precompiler directive which allows to only evaluate the HPD signal for HDMI monitor detection. Default is to react on the status bits for HPD and the TMDS signal line detection to detect an attached monitor. While at it cleanup parameter documentation and whitespace. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit b15fed911e022b383295cb5443872d427e756677) (cherry picked from commit 6bf9ef90b27fea00ae27f719473a5b7fca30a72e) (cherry picked from commit 2d67c557073a6e728cfe5888323b9aed79392b90)
2019-05-24mxc_vdacif.c: add second parallel output used for VDACMax Krummenacher
Copy of mxc_lcdif.c Adds a second parallel output which drives a Video DAC available on the second IPU, first DI on a Apalis iMX6 module Only RGB565 is supported. video=mxcfb0:dev=vdac,800x480M@60,if=RGB565 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 5a330af3bf30a72ca8f086c90e9dbfcbde3aa252) (cherry picked from commit 0bcaad8a16e6ceca9d964946890aff6727d7e10f)
2019-05-24mxc_lcdif.c: add additonal LCD timingsMax Krummenacher
FusionF10A: 1024x600, used with external parallel to LVDS converter FusionF07A: 800x480 EDT-VGA: 640x480 EDT-480x272: 480x272 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit b235eb4d8b06a6334f39de15526d1a4266bec859) (cherry picked from commit 4e6509cc7b11a7187e419e64621c3add01e23b27)
2019-05-24mxc_lcdif.c: EDT-WVGA: fix pixelclk polarityMax Krummenacher
pixeldata is sampled on the positve pixelclk edge. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 4891f02dae2559af072c31903111bf9ec349320e) (cherry picked from commit 85aff6446f712f72b33c29f3fd1e80843f923673)
2019-05-24mxc_hdmi: skip unnecessary mxc_hdmi_setup callsDaniel Kochmanski
Signed-off-by: Daniel Kochmanski <dkochmanski@antmicro.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 98b68aee3695ae898ef19aa547267fcdb69cf7eb) (cherry picked from commit f6620779981e6aebe40e7a400568e454d6a7408f)
2019-05-24lcd: Add WVGA timings for the EDT 7.0" panelMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 95e8be3a2e2fb156279897241c80a96cd84b1fda)
2019-05-24mxc_hdmi: Add only_cea parameter to mxc_hdmi moduleEric Nelson
When this boolean parameter is true, only add CEA modes to modelist. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Eric Nelson <eric.nelson@boundarydevices.com> (cherry picked from commit a78fe11904ebd4d3f72438f8b14dfa4eaab7d638) (cherry picked from commit d69533a9575de0aaeeaca19b4f5ed8ef794257a6) [rebased to 4.9, use bool as data type] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2019-05-24mxc_hdmi: enable overflow interrupt after initialization completeTroy Kisky
If enabled too early, a flood of interrupts can happen, and as console_lock is held, you cannot see any messages being printed. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 38c65caf872e5f9534b7812395224670dd56c297) (cherry picked from commit 04abce77f44b3e61b0fe5db1b33109e68e6600bc)
2019-05-24mxc_hdmi: default to keep-alive (don't detect disconnect)Eric Nelson
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit db1100f05d89ef2d90c856dfe742e9748d25df10) (cherry picked from commit de5231fc1c395c1b63f5aa81b818fc5fd5377568)
2019-05-24Add support for DVI monitorsRobert Winkler
Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 6877ada3d15adf762cae8b7edce979a77ebc0313) (cherry picked from commit 51394b5f2b7ecfcc87c43c41e630c3e49fce3003)
2019-05-24mxc_ipuv3_fb: unblank displays at initTroy Kisky
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 4d751666e1211ea8a378b8a4af2ad0f6820b650e) (cherry picked from commit 89a914b029644dc8872410c1f26daec909f76fef)
2019-05-24fbcon: logo: allow easy integration of a custom Linux boot logoMarcel Ziswiler
This patch allows for easy integration of a custom Linux boot logo to replace the Tux' being shown by default. Use gimp or the like to create a raw PPM in your desired resolution. Reduce the number of colours in the image to 224: user@host:~$ ppmquant 224 Toradex-640x480.ppm > \ Toradex-640x480-224.ppm ppmquant: making histogram... ppmquant: 370 colors found ppmquant: choosing 224 colors... ppmquant: mapping image to new colors... Convert it from raw PPM to ASCII format: user@host:~$ pnmnoraw Toradex-640x480-224.ppm > \ Toradex-640x480-ascii-224.ppm Copy it into the Linux sources: cp Toradex-640x480-ascii-224.ppm linux-toradex/drivers/video/logo/\ logo_custom_clut224.ppm Activate exclusively custom Linux logo in the kernel configuration: Device Drivers -> Graphics support -> Bootup logo -> Custom 224-color Linux logo And re-compile the kernel. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit fa2371bff9ac03581881849d8f95678ef3992719) (cherry picked from commit f57ace3fcce595dfbd5c4eb70d0392c8a8f6282d) (cherry picked from commit e2d1fdbfb1c4c276925def59a3987474c26210ae)
2019-05-08Merge branch 'linux-4.14.y_for_4.14-2.0.x-imx' into 4.14-2.0.x-imxPhilippe Schenker
2019-04-12MLK-21380 video: fbdev: mxsfb: fix resume timing for overlay fbFancy Fang
The overlay fb can only be enabled when the LCDIF is not in running, otherwise overlay display may look like image shift. So during the system resume procedure, the overlay fb should be resumed before mxsfb unblank. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit f39662a3a38a2da082d55a006e634766cc85e347)
2019-04-05backlight: pwm_bl: Use gpiod_get_value_cansleep() to get initial stateChen-Yu Tsai
[ Upstream commit cec2b18832e26bc866bef2be22eff4e25bbc4034 ] gpiod_get_value() gives out a warning if access to the underlying gpiochip requires sleeping, which is common for I2C based chips: WARNING: CPU: 0 PID: 77 at drivers/gpio/gpiolib.c:2500 gpiod_get_value+0xd0/0x100 Modules linked in: CPU: 0 PID: 77 Comm: kworker/0:2 Not tainted 4.14.0-rc3-00589-gf32897915d48-dirty #90 Hardware name: Allwinner sun4i/sun5i Families Workqueue: events deferred_probe_work_func [<c010ec50>] (unwind_backtrace) from [<c010b784>] (show_stack+0x10/0x14) [<c010b784>] (show_stack) from [<c0797224>] (dump_stack+0x88/0x9c) [<c0797224>] (dump_stack) from [<c0125b08>] (__warn+0xe8/0x100) [<c0125b08>] (__warn) from [<c0125bd0>] (warn_slowpath_null+0x20/0x28) [<c0125bd0>] (warn_slowpath_null) from [<c037069c>] (gpiod_get_value+0xd0/0x100) [<c037069c>] (gpiod_get_value) from [<c03778d0>] (pwm_backlight_probe+0x238/0x508) [<c03778d0>] (pwm_backlight_probe) from [<c0411a2c>] (platform_drv_probe+0x50/0xac) [<c0411a2c>] (platform_drv_probe) from [<c0410224>] (driver_probe_device+0x238/0x2e8) [<c0410224>] (driver_probe_device) from [<c040e820>] (bus_for_each_drv+0x44/0x94) [<c040e820>] (bus_for_each_drv) from [<c040ff0c>] (__device_attach+0xb0/0x114) [<c040ff0c>] (__device_attach) from [<c040f4f8>] (bus_probe_device+0x84/0x8c) [<c040f4f8>] (bus_probe_device) from [<c040f944>] (deferred_probe_work_func+0x50/0x14c) [<c040f944>] (deferred_probe_work_func) from [<c013be84>] (process_one_work+0x1ec/0x414) [<c013be84>] (process_one_work) from [<c013ce5c>] (worker_thread+0x2b0/0x5a0) [<c013ce5c>] (worker_thread) from [<c0141908>] (kthread+0x14c/0x154) [<c0141908>] (kthread) from [<c0107ab0>] (ret_from_fork+0x14/0x24) This was missed in commit 0c9501f823a4 ("backlight: pwm_bl: Handle gpio that can sleep"). The code was then moved to a separate function in commit 7613c922315e ("backlight: pwm_bl: Move the checks for initial power state to a separate function"). The only usage of gpiod_get_value() is during the probe stage, which is safe to sleep in. Switch to gpiod_get_value_cansleep(). Fixes: 0c9501f823a4 ("backlight: pwm_bl: Handle gpio that can sleep") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-05fbdev: fbmem: fix memory access if logo is bigger than the screenManfred Schlaegl
[ Upstream commit a5399db139cb3ad9b8502d8b1bd02da9ce0b9df0 ] There is no clipping on the x or y axis for logos larger that the framebuffer size. Therefore: a logo bigger than screen size leads to invalid memory access: [ 1.254664] Backtrace: [ 1.254728] [<c02714e0>] (cfb_imageblit) from [<c026184c>] (fb_show_logo+0x620/0x684) [ 1.254763] r10:00000003 r9:00027fd8 r8:c6a40000 r7:c6a36e50 r6:00000000 r5:c06b81e4 [ 1.254774] r4:c6a3e800 [ 1.254810] [<c026122c>] (fb_show_logo) from [<c026c1e4>] (fbcon_switch+0x3fc/0x46c) [ 1.254842] r10:c6a3e824 r9:c6a3e800 r8:00000000 r7:c6a0c000 r6:c070b014 r5:c6a3e800 [ 1.254852] r4:c6808c00 [ 1.254889] [<c026bde8>] (fbcon_switch) from [<c029c8f8>] (redraw_screen+0xf0/0x1e8) [ 1.254918] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:c070d5a0 r5:00000080 [ 1.254928] r4:c6808c00 [ 1.254961] [<c029c808>] (redraw_screen) from [<c029d264>] (do_bind_con_driver+0x194/0x2e4) [ 1.254991] r9:00000000 r8:00000000 r7:00000014 r6:c070d5a0 r5:c070d5a0 r4:c070d5a0 So prevent displaying a logo bigger than screen size and avoid invalid memory access. Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-03video: fbdev: Set pixclock = 0 in goldfishfbChristoffer Dall
[ Upstream commit ace6033ec5c356615eaa3582fb1946e9eaff6662 ] 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. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Roman Kiryanov <rkir@google.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27pwm-backlight: Enable/disable the PWM before/after LCD enable toggle.Enric Balletbo i Serra
commit 5fb5caee92ba35a4a3baa61d45a78eb057e2c031 upstream. Before this patch the enable signal was set before the PWM signal and vice-versa on power off. This sequence is wrong, at least, it is on the different panels datasheets that I checked, so I inverted the sequence to follow the specs. For reference the following panels have the mentioned sequence: - N133HSE-EA1 (Innolux) - N116BGE (Innolux) - N156BGE-L21 (Innolux) - B101EAN0 (Auo) - B101AW03 (Auo) - LTN101NT05 (Samsung) - CLAA101WA01A (Chunghwa) Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Jingoo Han <jingoohan1@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23MLK-20209 hdmi: fixed unsigned compare against less than zeroOliver Brown
Fixed CID 17375, Unsigned compared against 0. Removed code with no effect. Signed-off-by: Oliver Brown <oliver.brown@nxp.com> (cherry picked from commit b86debc52acd4131515f62130f52c2d0f48cdbfe)
2019-03-14MLK-13459 video: fbdev: export symbols needed for module buildOliver Brown
mipid_hx8369_get_lcd_videomode and mipid_hx8369_lcd_setup are now exported for the module build. Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2019-02-25MMFMWK-8413: video/hdmi: Fix DRM info-frame packingLaurentiu Palcu
The hdmi_drm_infoframe_pack() was wrongly packing the HDR metadata. It was setting the x display primaries followed by the y display primaries. Instead, in the specifications, each x display primary should be followed by the corresponding y display primary. Also, byte 8 of the frame payload was being skipped. Fixed that too. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> Reported-by: Jared Hu <jared.hu@nxp.com>
2019-02-12fbdev: fbcon: Fix unregister crash when more than one framebufferNoralf Trønnes
[ Upstream commit 2122b40580dd9d0620398739c773d07a7b7939d0 ] When unregistering fbdev using unregister_framebuffer(), any bound console will unbind automatically. This is working fine if this is the only framebuffer, resulting in a switch to the dummy console. However if there is a fb0 and I unregister fb1 having a bound console, I eventually get a crash. The fastest way for me to trigger the crash is to do a reboot, resulting in this splat: [ 76.478825] WARNING: CPU: 0 PID: 527 at linux/kernel/workqueue.c:1442 __queue_work+0x2d4/0x41c [ 76.478849] Modules linked in: raspberrypi_hwmon gpio_backlight backlight bcm2835_rng rng_core [last unloaded: tinydrm] [ 76.478916] CPU: 0 PID: 527 Comm: systemd-udevd Not tainted 4.20.0-rc4+ #4 [ 76.478933] Hardware name: BCM2835 [ 76.478949] Backtrace: [ 76.478995] [<c010d388>] (dump_backtrace) from [<c010d670>] (show_stack+0x20/0x24) [ 76.479022] r6:00000000 r5:c0bc73be r4:00000000 r3:6fb5bf81 [ 76.479060] [<c010d650>] (show_stack) from [<c08e82f4>] (dump_stack+0x20/0x28) [ 76.479102] [<c08e82d4>] (dump_stack) from [<c0120070>] (__warn+0xec/0x12c) [ 76.479134] [<c011ff84>] (__warn) from [<c01201e4>] (warn_slowpath_null+0x4c/0x58) [ 76.479165] r9:c0eb6944 r8:00000001 r7:c0e927f8 r6:c0bc73be r5:000005a2 r4:c0139e84 [ 76.479197] [<c0120198>] (warn_slowpath_null) from [<c0139e84>] (__queue_work+0x2d4/0x41c) [ 76.479222] r6:d7666a00 r5:c0e918ee r4:dbc4e700 [ 76.479251] [<c0139bb0>] (__queue_work) from [<c013a02c>] (queue_work_on+0x60/0x88) [ 76.479281] r10:c0496bf8 r9:00000100 r8:c0e92ae0 r7:00000001 r6:d9403700 r5:d7666a00 [ 76.479298] r4:20000113 [ 76.479348] [<c0139fcc>] (queue_work_on) from [<c0496c28>] (cursor_timer_handler+0x30/0x54) [ 76.479374] r7:d8a8fabc r6:c0e08088 r5:d8afdc5c r4:d8a8fabc [ 76.479413] [<c0496bf8>] (cursor_timer_handler) from [<c0178744>] (call_timer_fn+0x100/0x230) [ 76.479435] r4:c0e9192f r3:d758a340 [ 76.479465] [<c0178644>] (call_timer_fn) from [<c0178980>] (expire_timers+0x10c/0x12c) [ 76.479495] r10:40000000 r9:c0e9192f r8:c0e92ae0 r7:d8afdccc r6:c0e19280 r5:c0496bf8 [ 76.479513] r4:d8a8fabc [ 76.479541] [<c0178874>] (expire_timers) from [<c0179630>] (run_timer_softirq+0xa8/0x184) [ 76.479570] r9:00000001 r8:c0e19280 r7:00000000 r6:c0e08088 r5:c0e1a3e0 r4:c0e19280 [ 76.479603] [<c0179588>] (run_timer_softirq) from [<c0102404>] (__do_softirq+0x1ac/0x3fc) [ 76.479632] r10:c0e91680 r9:d8afc020 r8:0000000a r7:00000100 r6:00000001 r5:00000002 [ 76.479650] r4:c0eb65ec [ 76.479686] [<c0102258>] (__do_softirq) from [<c0124d10>] (irq_exit+0xe8/0x168) [ 76.479716] r10:d8d1a9b0 r9:d8afc000 r8:00000001 r7:d949c000 r6:00000000 r5:c0e8b3f0 [ 76.479734] r4:00000000 [ 76.479764] [<c0124c28>] (irq_exit) from [<c016b72c>] (__handle_domain_irq+0x94/0xb0) [ 76.479793] [<c016b698>] (__handle_domain_irq) from [<c01021dc>] (bcm2835_handle_irq+0x3c/0x48) [ 76.479823] r8:d8afdebc r7:d8afddfc r6:ffffffff r5:c0e089f8 r4:d8afddc8 r3:d8afddc8 [ 76.479851] [<c01021a0>] (bcm2835_handle_irq) from [<c01019f0>] (__irq_svc+0x70/0x98) The problem is in the console rebinding in fbcon_fb_unbind(). It uses the virtual console index as the new framebuffer index to bind the console(s) to. The correct way is to use the con2fb_map lookup table to find the framebuffer index. Fixes: cfafca8067c6 ("fbdev: fbcon: console unregistration from unregister_framebuffer") Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12fbdev: fbmem: behave better with small rotated displays and many CPUsPeter Rosin
[ Upstream commit f75df8d4b4fabfad7e3cba2debfad12741c6fde7 ] Blitting an image with "negative" offsets is not working since there is no clipping. It hopefully just crashes. For the bootup logo, there is protection so that blitting does not happen as the image is drawn further and further to the right (ROTATE_UR) or further and further down (ROTATE_CW). There is however no protection when drawing in the opposite directions (ROTATE_UD and ROTATE_CCW). Add back this protection. The regression is 20-odd years old but the mindless warning-killing mentality displayed in commit 34bdb666f4b2 ("fbdev: fbmem: remove positive test on unsigned values") is also to blame, methinks. Fixes: 448d479747b8 ("fbdev: fb_do_show_logo() updates") Signed-off-by: Peter Rosin <peda@axentia.se> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Fabian Frederick <ffrederick@users.sourceforge.net> Cc: Geert Uytterhoeven <geert+renesas@glider.be> cc: Geoff Levand <geoff@infradead.org> Cc: James Simmons <jsimmons@users.sf.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12video: clps711x-fb: release disp device node in probe()Alexey Khoroshilov
[ Upstream commit fdac751355cd76e049f628afe6acb8ff4b1399f7 ] clps711x_fb_probe() increments refcnt of disp device node by of_parse_phandle() and leaves it undecremented on both successful and error paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12MLK-20223 video: epdc: Increase the time available for LUT cleanupBogdan Chircu
The problem is that the kthread from submit workqueue aquires the queue_mutex and blocks the kthread from interrupt workqueue. But the kthread from interrupt workqueue is the one that should update the used_luts variable (on which the kthread from submit workqueue keeps polling), but it doesn't have a chance to do it (because it is blocked by mutex), even if the LUT complete interrupts are triggered. So the fix is, after the polling to release the mutex so that the kthread from interrupt workqueue can process the LUT complete interrupts and update the used_luts variable accordingly. Signed-off-by: Bogdan Chircu <bogdan-petru.chircu-mare@nxp.com> Signed-off-by: Robby Cai <robby.cai@nxp.com>
2019-02-12MLK-20231-2 video: epdc: restore QoS setting after resumeRobby Cai
After suspend, the qos setting is lost. This patch restores it after resume. Signed-off-by: Robby Cai <robby.cai@nxp.com>
2019-02-12MLK-20371: video: fbdev: adv7535: Fix coverity issuesRobert Chiras
Fix structurally dead code reported by coverity. Assign the return value to ret, instead of returning it so there will be a proper clean up. Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-20295: fbdev/mxsfb: Fix coverity issuesRobert Chiras
Fixing two coverity issues: 1. Checking disp_videomode against 0, which will always be true, since disp_videomode is a char array. So, fix it by checking it's first byte instead. 2. Possible division by zero, if clk_get_rate returns 0 (which is possible). Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-20416-2 video: fbdev: mxc: add RM68191 MIPI panel supportFancy Fang
The Driver IC 'RM68191' is used in the MIPI panel 'RK055IQH042' whose default mode is '540x960@60Hz'. So this commit adds a new FBDEV driver for 'RM68191' and enables the 'RK055IQH042' panel on IMX7ULP1-EVKB platform with Northwest MIPI DSI controller. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-02-12MLK-20416-1 video: fbdev: mxc: add RM68200 MIPI panel supportFancy Fang
The Driver IC 'RM68200' is used in the MIPI panel 'RK055AHD042' whose default mode is '720x1280@60Hz'. So this commit adds a new FBDEV driver for 'RM68200' and enables the 'RK055AHD042' panel on IMX7ULP1-EVKB platform with Northwest MIPI DSI controller. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-02-12MLK-20216-6: video/fbdev/mxc_dcic: fix return valueLaurentiu Palcu
This fixes Coverity issue where an unsigned variable is tested for less-than-zero value. Make val a signed integer instead. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> CC: Sandor Yu <sandor.yu@nxp.com>
2019-02-12MLK-20216-5: video/fbdev/mxc_dcic: remove needless comparisonLaurentiu Palcu
This fixes less-then-zero comparison Coverity issue. roi_param->roi_n is unsigned, hence the comparison is not needed. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> CC: Sandor Yu <sandor.yu@nxp.com>
2019-02-12MLK-20216-4: video/fbdev/imx_dcss: remove useless function callLaurentiu Palcu
This fixes Coverity issue since the function does nothing. The function only returns some values which are never used. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> CC: Fancy Fang <chen.fang@nxp.com>
2019-02-12MLK-20216-3: video/fbdev/imx_dcss: remove unnecessary BUG_ONsLaurentiu Palcu
This fixes Coverity issue since num_pix_x and num_pix_y are unsigned and the conditions are never true. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com> CC: Fancy Fang <chen.fang@nxp.com>
2019-02-12MLK-18895: hdmi: Reset HDMI PHY when enable/disable HDCP functionSandor Yu
Some HDMI Sink may failed to work when running HDCP enable/disable stress test. HDMI sink may not support change HDCP state on the fly. So reset HDMI PHY and controller to resolve the issue. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2019-02-12MLK-18585 video: fb: sii902x: Only bind to first mxs-lcdif FBLeonard Crestez
This driver registers itself as a fb_client and handles notifications from all FB in the system. It can end up trying to call fb_draw_logo on an overlay FB and this will crash because overlay_fb_ops has no fb_imageblit function. It also handles blank/unblank indiscriminately and for example if you connect a second LVDS display on 6sx and blank/unblank it then HDMI will also incorrectly blank/unblank. This last issue even affects imx_4.9.y Fix by only processing notifications from the FB that it's bound to. Bind to the first FB whose name starts with "mxs-lcdif" by checking fb_info->fix.id on FB_EVENT_FB_REGISTERED. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Acked-by: Robert Chiras <robert.chiras@nxp.com>
2019-02-12MLK-18031 video: mxsfb: enable global alpha when grayscale is 0 for 32bpp formatFancy Fang
For overlay framebuffer, when its grayscale is '0' and the format bpp is 32, enable the global alpha blending by default which can make the overlay fb can display the framebuffer content as long as it is unblanked. Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2019-02-12MLK-17692-1: fbdev: Remove imx8 hdmi fb driverSandor Yu
imx8 hdmi fb driver is not maintain. imx8 hdmi function have implemented with DRM framework in driver/gpu/drm/imx folder. So remove hdmi fb driver. Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>