aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-08-21drm: kirin: Rename ade_crtc to kirin_crtcXu YiPing1-37/+37
As part of refactoring the kirin driver to better support different hardware revisions, this patch renames the struct ade_crtc to kirin_crtc. The struct kirin_crtc will later used by both kirin620 and future kirin960 driver, and will be moved to a common kirin_drm_drv.h in a future patch Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Xu YiPing <[email protected]> [jstultz: reworded commit message] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Rename ade_plane to kirin_planeXu YiPing1-28/+29
As part of refactoring the kirin driver to better support different hardware revisions, this patch renames the struct ade_plane to kirin_plane. The struct kirin_plane will later used by both kirin620 and future kirin960 driver, and will be moved to a common kirin_drm_drv.h in a future patch Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Xu YiPing <[email protected]> [jstultz: reworded commit message] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Remove out_format from ade_crtcXu YiPing1-6/+3
As part of refactoring the kirin driver to better support different hardware revisions, this patch removes the out_format field in the struct ade_crtc, which was only ever set to LDI_OUT_RGB_888. Thus this patch removes the field and instead directly uses LDI_OUT_RGB_888. Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Xu YiPing <[email protected]> [jstultz: reworded commit message] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Remove uncessary parameter indirectionXu YiPing1-7/+5
In a few functions, we pass in a struct ade_crtc, which we only use to get to the underlying struct ade_hw_ctx. Thus this patch refactors the functions to just take the struct ade_hw_ctx directly. Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Xu YiPing <[email protected]> [jstultz: reworded commit message] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Remove unreachable returnJohn Stultz1-2/+0
The 'return 0' in kirin_drm_platform_probe() is unreachable code, so remove it. Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Suggested by: Xu YiPing <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Remove HISI_KIRIN_DW_DSI config optionJohn Stultz2-11/+2
The CONFIG_HISI_KIRIN_DW_DSI option is only used w/ kirin driver, so cut out the middleman and condense the config logic down. Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm: kirin: Fix for hikey620 display offset problemDa Lv2-0/+23
The original HiKey (620) board has had a long running issue where when using a 1080p montior, the display would occasionally blink and come come back with a horizontal offset (usually also shifting the colors, depending on the value of the offset%4). After lots of analysis by HiSi developers, they found the issue was due to when running at 1080p, it was possible to hit the device memory bandwidth limits, which could cause the DSI signal to get out of sync. Unfortunately the DSI logic doesn't have the ability to automatically recover from this situation, but we can get a an LDI underflow interrupt when it happens. To then correct the issue, when we get an LDI underflow irq, we we can simply suspend and resume the display, which resets the hardware. Thus, this patch enables the ldi underflow interrupt, and initializes a workqueue that is used to suspend/resume the display to recover. Then when the irq occurs we clear it and schedule the workqueue to reset display engine. Cc: Rongrong Zou <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: dri-devel <[email protected]> Cc: Sam Ravnborg <[email protected]> Acked-by: Xinliang Liu <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Da Lv <[email protected]> Signed-off-by: Yidong Lin <[email protected]> [jstultz: Reworded the commit message, checkpatch cleanups] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-21drm/nouveau: Initialize GEM object before TTM objectThierry Reding4-41/+77
TTM assumes that drivers initialize the embedded GEM object before calling the ttm_bo_init() function. This is not currently the case in the Nouveau driver. Fix this by splitting up nouveau_bo_new() into nouveau_bo_alloc() and nouveau_bo_init() so that the GEM can be initialized before TTM BO initialization when necessary. Fixes: b96f3e7c8069 ("drm/ttm: use gem vma_node") Acked-by: Gerd Hoffmann <[email protected]> Acked-by: Ben Skeggs <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20190814093524.GA31345@ulmo
2019-08-20dt-bindings: display: rockchip: update DSI controllerNickey Yang1-2/+21
This patch update describe panel/port links, including unit addresses in documentation of device tree bindings for the rockchip DSI controller based on the Synopsys DesignWare MIPI DSI host controller. Signed-off-by: Nickey Yang <[email protected]> Reviewed-by: Brian Norris <[email protected]> Reviewed-by: Rob Herring <[email protected]> [this seems to have gotten lost when the original dsi-series was applied] Signed-off-by: Heiko Stuebner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-20dmabuf: Mark up onstack timer for selftestsChris Wilson1-1/+2
The dma-fence selftest uses an on-stack timer that requires explicit annotation for debugobjects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111442 Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-20drm/komeda: Add support for 'memory-region' DT node propertyMihail Atanassov1-0/+9
The 'memory-region' property of the komeda display driver DT binding allows the use of a 'reserved-memory' node for buffer allocations. Add the requisite of_reserved_mem_device_{init,release} calls to actually make use of the memory if present. Changes since v1: - Move handling inside komeda_parse_dt Signed-off-by: Mihail Atanassov <[email protected]> Signed-off-by: Ayan Kumar Halder <[email protected]> Reviewed-by: James Qian Wang (Arm Technology China) <[email protected]> Link:- https://patchwork.kernel.org/patch/11076413/
2019-08-20dma-buf: Use %zu for printing sizeofChris Wilson1-1/+1
Use the %zu format specifier for a size_t returned by sizeof. Reported-by: [email protected] Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-20dw-hdmi-cec: use cec_notifier_cec_adap_(un)registerDariusz Marcinkiewicz1-7/+6
Use the new cec_notifier_cec_adap_(un)register() functions to (un)register the notifier for the CEC adapter. Also adds CEC_CAP_CONNECTOR_INFO capability to the adapter. Changes since v3: - add CEC_CAP_CONNECTOR_INFO to cec_allocate_adapter, - replace CEC_CAP_LOG_ADDRS | CEC_CAP_TRANSMIT | CEC_CAP_RC | CEC_CAP_PASSTHROUGH with CEC_CAP_DEFAULTS. Signed-off-by: Dariusz Marcinkiewicz <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Tested-by: Hans Verkuil <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-20drm: dw-hdmi: use cec_notifier_conn_(un)registerDariusz Marcinkiewicz1-15/+30
Use the new cec_notifier_conn_(un)register() functions to (un)register the notifier for the HDMI connector, and fill in the cec_connector_info. Changes since v6: - move cec_notifier_conn_unregister to a bridge detach function, - add a mutex protecting a CEC notifier. Changes since v4: - typo fix Changes since v2: - removed unnecessary NULL check before a call to cec_notifier_conn_unregister, - use cec_notifier_phys_addr_invalidate to invalidate physical address. Changes since v1: Add memory barrier to make sure that the notifier becomes visible to the irq thread once it is fully constructed. Signed-off-by: Dariusz Marcinkiewicz <[email protected]> Acked-by: Hans Verkuil <[email protected]> Tested-by: Hans Verkuil <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/i915: Select DMABUF_SELFTESTS for the default i915.ko debug buildChris Wilson1-0/+1
Include the DMABUF_SELFTESTS as part of the standard build for IGT, so that they can be run by igt/dmabuf Testcase: igt/dmabuf Signed-off-by: Chris Wilson <[email protected]> Cc: Tomi Sarvela <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/drv: Use // for comments in example codeJonathan Neuschäfer1-8/+6
This improves Sphinx output in two ways: - It avoids an unmatched single-quote ('), about which Sphinx complained: Documentation/gpu/drm-internals.rst:298: WARNING: Could not lex literal_block as "c". Highlighting skipped. An alternative approach would be to replace "can't" with a word that doesn't have a single-quote. - It lets Sphinx format the comments in italics and grey, making the code slightly easier to read. Signed-off-by: Jonathan Neuschäfer <[email protected]> Acked-by: Daniel Vetter <[email protected]> [via irc] Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19dma-buf: Add selftests for dma-fenceChris Wilson3-1/+578
Exercise the dma-fence API exported to drivers. Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19dma-buf: Introduce selftesting frameworkChris Wilson5-0/+217
In light of recent review slip ups, the absence of a suite of tests for dma-buf became apparent. Given the current plethora of testing frameworks, opt for one already in use by Intel's CI and so allow easy hook up into igt. We introduce a new module that when loaded will execute the list of selftests and their subtest. The names of the selftests are put into the modinfo as parameters so that igt can identify each, and run them independently, principally for ease of error reporting. Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Tomi Sarvela <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/panfrost: Remove opp table when unloadingSteven Price3-1/+11
The devfreq opp table needs to be removed when unloading the driver to free the memory associated with it. Signed-off-by: Steven Price <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/panfrost: Enable devfreq to work without regulatorSteven Price1-5/+2
If there is no regulator defined for the GPU then still control the frequency using the supplied clock. Some boards have clock control but no (direct) control of the regulator. For example the HiKey960 uses a mailbox protocol to a MCU to control frequencies and doesn't directly control the voltage. This patch allows frequency control of the GPU on this system. Signed-off-by: Steven Price <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/panfrost: Implement per FD address spacesRob Herring9-87/+236
Up until now, a single shared GPU address space was used. This is not ideal as there's no protection between processes and doesn't work for supporting the same GPU/CPU VA feature. Most importantly, this will hopefully mitigate Alyssa's fear of WebGL, whatever that is. Most of the changes here are moving struct drm_mm and struct panfrost_mmu objects from the per device struct to the per FD struct. The critical function is panfrost_mmu_as_get() which handles allocating and switching the h/w address spaces. There's 3 states an AS can be in: free, allocated, and in use. When a job runs, it requests an address space and then marks it not in use when job is complete(but stays assigned). The first time thru, we find a free AS in the alloc_mask and assign the AS to the FD. Then the next time thru, we most likely already have our AS and we just mark it in use with a ref count. We need a ref count because we have multiple job slots. If the job/FD doesn't have an AS assigned and there are no free ones, then we pick an allocated one not in use from our LRU list and switch the AS from the old FD to the new one. Cc: Tomeu Vizoso <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Steven Price <[email protected]> Signed-off-by: Rob Herring <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Steven Price <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/panfrost: Fix missing unlock on error in panfrost_mmu_map_fault_addr()Wei Yongjun1-1/+4
Add the missing unlock before return from function panfrost_mmu_map_fault_addr() in the error handling case. Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Rob Herring <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19udlfb: Make dlfb_ops constantNishka Dasgupta1-1/+1
Static structure dlfb_ops, of type fb_ops, is not used except to be copied into another variable. Hence make dlfb_ops constant to protect it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <[email protected]> Cc: Bernie Thompson <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev/mmp/core: Use struct_size() in kzalloc()Gustavo A. R. Silva1-4/+2
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct mmp_path { ... struct mmp_overlay overlays[0]; }; size = sizeof(struct mmp_path) + count * sizeof(struct mmp_overlay); instance = kzalloc(size, GFP_KERNEL) Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, overlays, count), GFP_KERNEL) Notice that, in this case, variable size is not necessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20190807161312.GA26835@embeddedor
2019-08-19video: fbdev: viafb: Remove dead codeSouptick Joarder1-43/+0
This is dead code since 3.15. If there is no plan to use it further, this can be removed forever. Signed-off-by: Souptick Joarder <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> [b.zolnierkie: fix patch summary] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev: aty[128]fb: Remove dead codeSouptick Joarder2-47/+0
This is dead code since 3.15. If there is no plan to use it further, this can be removed forever. Signed-off-by: Souptick Joarder <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: David S. Miller <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: "Ville Syrjälä" <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Daniel Vetter <[email protected]> [b.zolnierkie: fix patch summary] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev: sh_mobile_lcdcfb: Mark expected switch fall-throughAnders Roxell1-0/+2
Now that -Wimplicit-fallthrough is passed to GCC by default, the following warnings shows up: ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_channel_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2086:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~~~~~~~~~~~~~~~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:2087:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c: In function ‘sh_mobile_lcdc_overlay_fb_init’: ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1596:22: warning: this statement may fall through [-Wimplicit-fallthrough=] info->fix.ypanstep = 2; ~~~~~~~~~~~~~~~~~~~^~~ ../drivers/video/fbdev/sh_mobile_lcdcfb.c:1597:2: note: here case V4L2_PIX_FMT_NV16: ^~~~ Rework to address a warnings due to the enablement of -Wimplicit-fallthrough. Signed-off-by: Anders Roxell <[email protected]> Cc: Gustavo A. R. Silva <[email protected]> [b.zolnierkie: fix patch summary] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev: radeonfb: Use dev_get_drvdataChuhong Yuan1-4/+2
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> [b.zolnierkie: fix patch summary and intendation] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev: sm712fb: Use dev_get_drvdataChuhong Yuan1-6/+2
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <[email protected]> Cc: Sudip Mukherjee <[email protected]> Cc: Teddy Wang <[email protected]> [b.zolnierkie: fix patch summary] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19video: fbdev: pvr2fb: remove unnecessary comparison of unsigned integer with < 0Gustavo A. R. Silva1-4/+2
There is no need to compare *var->xoffset* or *var->yoffset* with < 0 because such variables are of type unsigned, making it impossible to hold a negative value. Fix this by removing such comparisons. Addresses-Coverity-ID: 1451964 ("Unsigned compared against 0") Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20190722203358.GA29111@embeddedor
2019-08-19efifb: BGRT: Improve efifb_bgrt_sanity_checkHans de Goede1-21/+6
For various reasons, at least with x86 EFI firmwares, the xoffset and yoffset in the BGRT info are not always reliable. Extensive testing has shown that when the info is correct, the BGRT image is always exactly centered horizontally (the yoffset variable is more variable and not always predictable). This commit simplifies / improves the bgrt_sanity_check to simply check that the BGRT image is exactly centered horizontally and skips (re)drawing it when it is not. This fixes the BGRT image sometimes being drawn in the wrong place. Cc: [email protected] Fixes: 88fe4ceb2447 ("efifb: BGRT: Do not copy the boot graphics for non native resolutions") Signed-off-by: Hans de Goede <[email protected]> Cc: Peter Jones <[email protected]>, Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-19drm/xen-front: Make structure fb_funcs constantNishka Dasgupta1-1/+1
Static structure fb_funcs, of type drm_framebuffer_funcs, is used only when it is passed to drm_gem_fb_create_with_funcs() as its last argument. drm_gem_fb_create_with_funcs does not modify its lst argument (fb_funcs) and hence fb_funcs is never modified. Therefore make fb_funcs constant to protect it from further modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <[email protected]> Signed-off-by: Oleksandr Andrushchenko <[email protected]> Reviewed-by: Oleksandr Andrushchenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-18drm/vboxvideo: Make structure vbox_fb_helper_funcs constantNishka Dasgupta1-1/+1
The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, is used only when it is passed as the third argument to drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it constant to protect it from unintended modifications. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-17dma-fence: Store the timestamp in the same union as the cb_listChris Wilson4-18/+38
The timestamp and the cb_list are mutually exclusive, the cb_list can only be added to prior to being signaled (and once signaled we drain), while the timestamp is only valid upon being signaled. Both the timestamp and the cb_list are only valid while the fence is alive, and as soon as no references are held can be replaced by the rcu_head. By reusing the union for the timestamp, we squeeze the base dma_fence struct to 64 bytes on x86-64. v2: Sort the union chronologically Suggested-by: Christian König <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: Christian König <[email protected]> Acked-by: Christian König <[email protected]>. Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-17dma-fence: Simply wrap dma_fence_signal_locked with dma_fence_signalChris Wilson1-32/+12
Currently dma_fence_signal() tries to avoid the spinlock and only takes it if absolutely required to walk the callback list. However, to allow for some users to surreptitiously insert lazy signal callbacks that do not depend on enabling the signaling mechanism around every fence, we always need to notify the callbacks on signaling. As such, we will always need to take the spinlock and dma_fence_signal() effectively becomes a clone of dma_fence_signal_locked(). v2: Update the test_and_set_bit() before entering the spinlock. v3: Drop the test_[and_set]_bit() before the spinlock, it's a caller error so expected to be very unlikely. Signed-off-by: Chris Wilson <[email protected]> Cc: Christian König <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-17dma-fence: Avoid list_del during fence->cb_list iterationChris Wilson1-3/+6
Before we notify the fence signal callback, we remove the cb from the list. However, since we are processing the entire list from underneath the spinlock, we do not need to individual delete each element, but can simply reset the link and the entire list. Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Christian König <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-17dma-fence: Shrink size of struct dma_fenceChris Wilson1-3/+3
Rearrange the couple of 32-bit atomics hidden amongst the field of pointers that unnecessarily caused the compiler to insert some padding, shrinks the size of the base struct dma_fence from 80 to 72 bytes on x86-64. Signed-off-by: Chris Wilson <[email protected]> Cc: Christian König <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-17drm/panel: tpo-td043mtea1: remove redundant assignmentColin Ian King1-1/+1
Variable val is initialized to a value in a for-loop that is never read and hence it is redundant. Remove it. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <[email protected]> Cc: Laurent Pinchart <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-16drm/omap: displays: Remove unused panel driversLaurent Pinchart9-2493/+0
drm_panel-based drivers for the ACX565AKM, LB035Q02, LS037V7DW01, NL8048HL11, TD028TTEC1 and TD043MTEA1 are available, remove the omapdrm-specific drivers. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-16video: omapfb2: Make standard and custom panel drivers mutually exclusiveLaurent Pinchart1-0/+5
Standard DRM panel drivers for several panels used by omapfb2 are now available. Their module name clashes with the modules from drivers/video/fbdev/omap2/omapfb/displays, part of the deprecated omapfb2 fbdev driver. As omapfb2 can only be compiled when the omapdrm driver is disabled, and the DRM panel drivers are useless in that case, make the omapfb2 panels depend on the standard DRM panels being disabled to fix the name clash. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Fixes: dc2e1e5b279966 ("drm/panel: Add driver for the Toppoly TD043MTEA1 panel") Fixes: 415b8dd0871188 ("drm/panel: Add driver for the Toppoly TD028TTEC1 panel") Fixes: 1c8fc3f0c5d280 ("drm/panel: Add driver for the Sony ACX565AKM panel") Fixes: c9cf4c2a3bd35f ("drm/panel: Add driver for the Sharp LS037V7DW01 panel") Fixes: df439abe650177 ("drm/panel: Add driver for the NEC NL8048HL11 panel") Cc: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> [added tags] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-16dma-buf: Restore seqlock around dma_resv updatesChris Wilson5-109/+175
This reverts 67c97fb79a7f ("dma-buf: add reservation_object_fences helper") dd7a7d1ff2f1 ("drm/i915: use new reservation_object_fences helper") 0e1d8083bddb ("dma-buf: further relax reservation_object_add_shared_fence") 5d344f58da76 ("dma-buf: nuke reservation_object seq number") The scenario that defeats simply grabbing a set of shared/exclusive fences and using them blissfully under RCU is that any of those fences may be reallocated by a SLAB_TYPESAFE_BY_RCU fence slab cache. In this scenario, while keeping the rcu_read_lock we need to establish that no fence was changed in the dma_resv after a read (or full) memory barrier. Signed-off-by: Chris Wilson <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the Toppoly TD043MTEA1 panelLaurent Pinchart4-1/+518
This panel is used on the OMAP3 Pandora. The code is based on the omapdrm-specific panel-tpo-td043mtea1 driver. v2: - fix checkpatch warnings o (lcd == NULL) => (!lcd) (sam) o alignment to open '(' (sam) Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the Toppoly TD028TTEC1 panelLaurent Pinchart4-5/+413
This panel is used on the OpenMoko Neo FreeRunner and Neo 1973. The code is based on the omapdrm-specific panel-tpo-td028ttec1 driver. v2: - fix checkpatch warnings: o (lcd == NULL) => (!lcd) (sam) o (1 << X) => BIT(X) (sam) Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the Sony ACX565AKM panelLaurent Pinchart4-1/+711
This panel is used on the Nokia N900. The code is based on the omapdrm-specific panel-sony-acx565akm driver. The hardware-related logic has been changed as little as possible to avoid regressions as hardware availability is lacking to test the changes. Follow-up patches should address the items listed in the TODO list. v2: - fix checkpatch warning (lcd == NULL) => (!lcd) (sam) Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the Sharp LS037V7DW01 panelLaurent Pinchart4-1/+235
This panel is used on the TI SDP3430 board. The code is based on the omapdrm-specific panel-sharp-ls037v7dw01 driver. v2: - fix checkpatch warning (lcd == NULL) => (!lcd) (sam) - drop __exit_p() from remove. It caused a build warning. And no other panel drivers needs this (sam) Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the NEC NL8048HL11 panelLaurent Pinchart4-1/+258
This panel is used on the Zoom2/3/3630 SDP boards. The code is based on the omapdrm-specific panel-nec-nl8048hl11 driver v2: - fix checkpatch warning (lcd == NULL) => (!lcd) (sam) Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14drm/panel: Add driver for the LG Philips LB035Q02 panelLaurent Pinchart3-0/+246
This panel is used on the Gumstix Overo Palo35. The code is based on the omapdrm-specific panel-lgphilips-lb035q02 driver. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14dt-bindings: display: panel: Add bindings for NEC NL8048HL11 panelLaurent Pinchart1-0/+62
The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB parallel data interface and an SPI control interface. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14dt-bindings: Add legacy 'toppoly' vendor prefixLaurent Pinchart1-0/+3
The 'toppoly' vendor prefix is in use and refers to TPO, whose DT vendor prefix is already defined as 'tpo'. Add 'toppoly' as an alternative and document it as legacy. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-14dt-bindings: Add vendor prefix for LG DisplayLaurent Pinchart1-0/+2
LG Display is an LCD display manufacturer. Originally formed as a joint venture by LG Electronics and Philips Electronics, it was formerly known as LG.Philips LCD, hence the DT vendor prefix lgphilips (which is already in active use in the kernel). More information is available at https://en.wikipedia.org/wiki/LG_Display. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]