aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-05-24dma-buf/sw_sync: Replace all non-returning strlcpy with strscpyAzeem Shaikh1-1/+1
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). No return values were used, so direct replacement is safe. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-24drm/panel: samsung-s6d7aa0: use pointer for drm_mode in panel desc structArtur Weber1-5/+5
Fixes compilation issues with older GCC versions and Clang after changes introduced in commit 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver"). Tested with GCC 13.1.1, GCC 6.4.0 and Clang 16.0.3. Fixes the following errors with Clang: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_lsl080al02_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_lsl080al03_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_ltl101at01_mode, ^~~~~~~~~~~~~~~~~~~~~~~ 3 errors generated. Fixes the following errors with GCC: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not constant .drm_mode = s6d7aa0_lsl080al02_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: note: (near initialization for 's6d7aa0_lsl080al02_desc.drm_mode') drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not constant .drm_mode = s6d7aa0_lsl080al03_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: note: (near initialization for 's6d7aa0_lsl080al03_desc.drm_mode') drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not constant .drm_mode = s6d7aa0_ltl101at01_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: note: (near initialization for 's6d7aa0_ltl101at01_desc.drm_mode') Reported-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Reported-by: kernelci.org bot <[email protected]> Link: https://lore.kernel.org/llvm/[email protected] Fixes: 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver") Signed-off-by: Artur Weber <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-23drm/bridge: dw-hdmi: Replace all non-returning strlcpy with strscpyAzeem Shaikh1-1/+1
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). No return values were used, so direct replacement is safe. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Signed-off-by: Azeem Shaikh <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-23drm/bridge: anx7625: Prevent endless probe loopNícolas F. R. A. Prado1-40/+88
During probe, the driver registers i2c dummy devices and populates the aux bus, which registers a device for the panel. After doing that, the driver can still defer probe if needed. This ordering of operations is troublesome however, because the deferred probe work will retry probing all pending devices every time a new device is registered. Therefore, if modules need to be loaded in order to satisfy the dependencies for this driver to complete probe, the kernel will stall, since it'll keep trying to probe the anx7625 driver, but never succeed, given that modules would only be loaded after the deferred probe work completes. Two changes are required to avoid this issue: * Move of_find_mipi_dsi_host_by_node(), which can defer probe, to before anx7625_register_i2c_dummy_clients() and devm_of_dp_aux_populate_ep_devices(), which register devices. * Make use of the done_probing callback when populating the aux bus, so that the bridge registration is only done after the panel is probed. This is required because the panel might need to defer probe, but the aux bus population needs the i2c dummy devices working, so this call couldn't just be moved to an earlier point in probe. One caveat is that if the panel is described outside the aux bus, the probe loop issue can still happen, but we don't have a way to avoid it in that case since there's no callback available. With this patch applied, it's possible to boot on mt8192-asurada-spherion with CONFIG_DRM_ANALOGIX_ANX7625=y CONFIG_MTK_MMSYS=m CONFIG_BACKLIGHT_PWM=y and also with CONFIG_DRM_ANALOGIX_ANX7625=y CONFIG_MTK_MMSYS=y CONFIG_BACKLIGHT_PWM=m Fixes: adca62ec370c ("drm/bridge: anx7625: Support reading edid through aux channel") Fixes: 269332997a16 ("drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi host was not found") Reported-by: "kernelci.org bot" <[email protected]> Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-23drm/msm: Use struct fb_info.screen_bufferThomas Zimmermann1-3/+3
The fbdev framebuffer is in system memory. Store the address in the field 'screen_buffer'. Fixes the following sparse warning. ../drivers/gpu/drm/msm/msm_fbdev.c:124:26: warning: incorrect type in assignment (different address spaces) ../drivers/gpu/drm/msm/msm_fbdev.c:124:26: expected char [noderef] __iomem *screen_base ../drivers/gpu/drm/msm/msm_fbdev.c:124:26: got void * Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-23drm/gma500: Clear fbdev framebuffer with fb_memset_io()Thomas Zimmermann1-1/+1
The fbdev framebuffer is I/O memory, so clear it with fb_memset_io(). Fixes the following sparse warning: ../drivers/gpu/drm/gma500/fbdev.c:234:20: warning: incorrect type in argument 1 (different address spaces) ../drivers/gpu/drm/gma500/fbdev.c:234:20: expected void *s ../drivers/gpu/drm/gma500/fbdev.c:234:20: got char [noderef] __iomem *screen_base Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Patrik Jakobsson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22drm/nouveau/acr/ga102: set variable ga102_gsps storage-class-specifier to staticTom Rix1-1/+1
smatch reports drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c:49:1: warning: symbol 'ga102_gsps' was not declared. Should it be static? This variable is only used in its defining file, so it should be static Signed-off-by: Tom Rix <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22drm/nouveau: constify pointers to hwmon_channel_infoKrzysztof Kozlowski1-1/+1
Statically allocated array of pointers to hwmon_channel_info can be made const for safety. Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22drm/nouveau: dispnv50: fix missing-prototypes warningArnd Bergmann2-3/+2
nv50_display_create() is declared in another header, along with a couple of declarations that are now outdated: drivers/gpu/drm/nouveau/dispnv50/disp.c:2517:1: error: no previous prototype for 'nv50_display_create' Fixes: ba801ef068c1 ("drm/nouveau/kms: display destroy/init/fini hooks can be static") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22drm: bridge: samsung-dsim: Implement support for clock/data polarity swapMarek Vasut2-1/+28
Implement support for DSI clock and data lane DN/DP polarity swap by means of decoding 'lane-polarities' DT property. The controller does support DN/DP swap of clock lane and all data lanes, the controller does not support polarity swap of individual data lane bundles, add a check which verifies all data lanes have the same polarity. This has been validated on an imx8mm board that actually has the MIPI DSI clock lanes inverted. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Jagan Teki <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22dt-bindings: samsung,mipi-dsim: Add 'lane-polarities'Fabio Estevam1-0/+23
The Samsung DSIM IP block allows the inversion of the clock and data lanes. Add an optional property called 'lane-polarities' that describes the polarities of the MIPI DSI clock and data lanes. This property is useful for properly describing the hardware when the board designer decided to switch the polarities of the MIPI DSI clock and/or data lanes. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22MAINTAINERS: Add entry for Samsung S6D7AA0 LCD panel controller driverArtur Weber1-0/+6
Add myself as maintainer of the Samsung S6D7AA0 panel driver. Signed-off-by: Artur Weber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22drm/panel: Add Samsung S6D7AA0 panel controller driverArtur Weber3-0/+593
Initial driver for S6D7AA0-controlled panels. Currently, the following panels are supported: - S6D7AA0-LSL080AL02 (Samsung Galaxy Tab 3 8.0) - S6D7AA0-LSL080AL03 (Samsung Galaxy Tab A 8.0 2015) - S6D7AA0-LTL101AT01 (Samsung Galaxy Tab A 9.7 2015) It should be possible to extend this driver to work with other panels using this IC. Tested-by: Nikita Travkin <[email protected]> #ltl101at01 Signed-off-by: Artur Weber <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-22dt-bindings: display: panel: Add Samsung S6D7AA0 LCD panel controllerArtur Weber1-0/+70
Add bindings for the S6D7AA0 LCD panel controller, including the S6D7AA0-LSL080AL02 panel used in the Samsung Galaxy Tab 3 8.0 family of tablets, and the S6D7AA0-LSL080AL03 and S6D7AA0-LTL101AT01 panels used in the Samsung Galaxy Tab A 8.0 and 9.7 2015. Signed-off-by: Artur Weber <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-19drm/sched: Rename to drm_sched_wakeup_if_can_queue()Luben Tuikov3-6/+6
Rename drm_sched_wakeup() to drm_sched_wakeup_if_canqueue() since the former is misleading, as it wakes up the GPU scheduler _only if_ more jobs can be queued to the underlying hardware. This distinction is important to make, since the wake conditional in the GPU scheduler thread wakes up when other conditions are also true, e.g. when there are jobs to be cleaned. For instance, a user might want to wake up the scheduler only because there are more jobs to clean, but whether we can queue more jobs is irrelevant. v2: Separate "canqueue" to "can_queue". (Alex D.) Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Luben Tuikov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Alex Deucher <[email protected]>
2023-05-19drm/sched: Rename to drm_sched_can_queue()Luben Tuikov1-5/+4
Rename drm_sched_ready() to drm_sched_can_queue(). "ready" can mean many things and is thus meaningless in this context. Instead, rename to a name which precisely conveys what is being checked. Cc: Christian König <[email protected]> Cc: Alex Deucher <[email protected]> Signed-off-by: Luben Tuikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-05-18fbdev: Rename fb_mem*() helpersThomas Zimmermann12-36/+36
Update the names of the fb_mem*() helpers to be consistent with their regular counterparts. Hence, fb_memset() now becomes fb_memset_io(), fb_memcpy_fromfb() now becomes fb_memcpy_fromio() and fb_memcpy_tofb() becomes fb_memcpy_toio(). No functional changes. v6: * update new file fb_io_fops.c Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18fbdev: Move framebuffer I/O helpers into <asm/fb.h>Thomas Zimmermann6-53/+185
Implement framebuffer I/O helpers, such as fb_read*() and fb_write*(), in the architecture's <asm/fb.h> header file or the generic one. The common case has been the use of regular I/O functions, such as __raw_readb() or memset_io(). A few architectures used plain system- memory reads and writes. Sparc used helpers for its SBus. The architectures that used special cases provide the same code in their __raw_*() I/O helpers. So the patch replaces this code with the __raw_*() functions and moves it to <asm-generic/fb.h> for all architectures. v8: * remove garbage after commit-message tags v6: * fix fb_readq()/fb_writeq() on 64-bit mips (kernel test robot) v5: * include <linux/io.h> in <asm-generic/fb>; fix s390 build v4: * ia64, loongarch, sparc64: add fb_mem*() to arch headers to keep current semantics (Arnd) v3: * implement all architectures with generic helpers * support reordering and native byte order (Geert, Arnd) Signed-off-by: Thomas Zimmermann <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18fbdev: Include <linux/fb.h> instead of <asm/fb.h>Thomas Zimmermann7-9/+4
Replace include statements for <asm/fb.h> with <linux/fb.h>. Fixes the coding style: if a header is available in asm/ and linux/, it is preferable to include the header from linux/. This only affects a few source files, most of which already include <linux/fb.h>. Suggested-by: Sam Ravnborg <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18fbdev: Include <linux/io.h> in various driversThomas Zimmermann3-0/+5
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18ipu-v3: Include <linux/io.h>Thomas Zimmermann1-0/+1
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18fbdev/matrox: Remove trailing whitespacesThomas Zimmermann2-5/+5
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-18fbdev/hitfb: Cast I/O offset to addressThomas Zimmermann1-53/+69
Cast I/O offsets to pointers to use them with I/O functions. The I/O functions expect pointers of type 'volatile void __iomem *', but the offsets are plain integers. Build warnings are ../drivers/video/fbdev/hitfb.c: In function 'hitfb_accel_wait': ../arch/x86/include/asm/hd64461.h:18:33: warning: passing argument 1 of 'fb_readw' makes pointer from integer without a cast [-Wint-conversion] 18 | #define HD64461_IO_OFFSET(x) (HD64461_IOBASE + (x)) | ^~~~~~~~~~~~~~~~~~~~~~ | | | unsigned int ../arch/x86/include/asm/hd64461.h:93:33: note: in expansion of macro 'HD64461_IO_OFFSET' 93 | #define HD64461_GRCFGR HD64461_IO_OFFSET(0x1044) /* Accelerator Configuration Register */ | ^~~~~~~~~~~~~~~~~ ../drivers/video/fbdev/hitfb.c:47:25: note: in expansion of macro 'HD64461_GRCFGR' 47 | while (fb_readw(HD64461_GRCFGR) & HD64461_GRCFGR_ACCSTATUS) ; | ^~~~~~~~~~~~~~ In file included from ../arch/x86/include/asm/fb.h:15, from ../include/linux/fb.h:19, from ../drivers/video/fbdev/hitfb.c:22: ../include/asm-generic/fb.h:52:57: note: expected 'const volatile void *' but argument is of type 'unsigned int' 52 | static inline u16 fb_readw(const volatile void __iomem *addr) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ This patch only fixes the build warnings. It's not clear if the I/O offsets can legally be passed to the I/O helpers. It was apparently broken in 2007 when custom inw()/outw() helpers got removed by commit 34a780a0afeb ("sh: hp6xx pata_platform support."). Fixing the driver would require setting the I/O base address. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Thomas Zimmermann <[email protected]> Cc: Artur Rojek <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-17drm/bridge: tc358767: Switch to devm MIPI-DSI helpersAlexander Stein1-2/+2
DSI device registering and attaching needs to be undone upon deregistration. This fixes module unload/load. Fixes: bbfd3190b656 ("drm/bridge: tc358767: Add DSI-to-DPI mode support") Signed-off-by: Alexander Stein <[email protected]> Reviewed-by: Robert Foss <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-17drm/ttm: let struct ttm_device_funcs be placed in rodataJani Nikula2-3/+3
Make the struct ttm_device_funcs pointers const so the data can be placed in rodata. Cc: Christian Koenig <[email protected]> Cc: Huang Rui <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-17drm/drm_atomic_helper.c: fix a typoSui Jingfeng1-1/+1
Signed-off-by: Sui Jingfeng <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-16drm/panel: Modify innolux hj110iz panel initial codeCong Yang1-162/+235
There is a problem of screen shake on the old panel. So increase the panel GOP component pull-down circuit size in hardware, and update the initialization code at the same time. The new initialization code mainly modifles the following. a)adjusted for GOP timing. When Display sleep in, raise all GOP signals to VGHO and then drop to GND. b)Increased the Vertical back Porch and Vertical pulse width, so need to update vsync_end and vtotal and CLK in drm_display_mode. Signed-off-by: Cong Yang <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> [dianders: fixed spelling mistake in subject] Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230509025153.1321446-1-yangcong5@huaqin.corp-partner.google.com
2023-05-16drm/bridge: tc358768: remove unneeded semicolonFrancesco Dolcini1-1/+1
Remove unneeded stray semicolon. Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Francesco Dolcini <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-16gpu: drm: bridge: No need to set device_driver ownerAnup Sharma1-1/+0
There is no need to exclusively set the .owner member of the struct device_driver when defining the platform_driver struct. The Linux core takes care of setting the .owner member as part of the call to module_platform_driver() helper function. Issue identified using the platform_no_drv_owner.cocci Coccinelle semantic patch as: drivers/gpu/drm/bridge/samsung-dsim.c:1957:6-11: No need to set .owner here. The core will do it. No functional changes are intended. Signed-off-by: Anup Sharma <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ZF9igb/nvL6GRBsq@yoga
2023-05-16dt-bindings: display: bridge: tc358867: Document TC358867/TC9595 compatibleMarek Vasut1-3/+11
The TC358867/TC9595 devices are compatible with the predecessor TC358767. Document compatible strings for the new devices, so they can be discerned in board DTs. Update the title to match description in the process. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drm/vkms: Fix RGB565 pixel conversionMaíra Canal1-6/+6
Currently, the pixel conversion isn't rounding the fixed-point values before assigning it to the RGB coefficients, which is causing the IGT pixel-format tests to fail. So, use the drm_fixp2int_round() fixed-point helper to round the values when assigning it to the RGB coefficients. Tested with igt@kms_plane@pixel-format and igt@kms_plane@pixel-format-source-clamping. [v2]: * Use drm_fixp2int_round() to fix the pixel conversion instead of casting the values to s32 (Melissa Wen). Fixes: 89b03aeaef16 ("drm/vkms: fix 32bit compilation error by replacing macros") Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Arthur Grillo <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drm: Add fixed-point helper to get rounded integer valuesMaíra Canal1-0/+6
Create a new fixed-point helper to allow us to return the rounded value of our fixed point value. [v2]: * Create the function drm_fixp2int_round() (Melissa Wen). [v3]: * Use drm_fixp2int() instead of shifting manually (Arthur Grillo). Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Arthur Grillo <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drm/panel: boe-tv101wum-nl6: Fine tune the panel power sequenceShuijing Li1-0/+6
For "boe,tv105wum-nw0" this special panel, it is stipulated in the panel spec that MIPI needs to keep the LP11 state before the lcm_reset pin is pulled high. Signed-off-by: Shuijing Li <[email protected]> Signed-off-by: Xinlei Lee <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drm/panel: boe-tv101wum-nl6: Remove extra delayShuijing Li1-1/+0
Reduce the delay after LCM reset by removing an extra delay in the initialization commands array. The required delay of at least 6ms after reset is guaranteed by boe_panel_prepare(). Signed-off-by: Shuijing Li <[email protected]> Signed-off-by: Xinlei Lee <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drm/ssd130x: Fix include guard nameJavier Martinez Canillas1-3/+3
This is a leftover from an early iteration of the driver when it was still named ssd1307 instead of ssd130x. Change it for consistency with the rest. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Reviewed-by: Sui Jingfeng <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-15drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_syncHuacai Chen1-1/+1
Consider a configuration like this: 1, efifb (or simpledrm) is built-in; 2, a native display driver (such as radeon) is also built-in. As Javier said, this is not a common configuration (the native display driver is usually built as a module), but it can happen and cause some trouble. In this case, since efifb, radeon and sysfb are all in device_initcall() level, the order in practise is like this: efifb registered at first, but no "efi-framebuffer" device yet. radeon registered later, and /dev/fb0 created. sysfb_init() comes at last, it registers "efi-framebuffer" and then causes an error message "efifb: a framebuffer is already registered". Make sysfb_init() to be subsys_ initcall_sync() can avoid this. And Javier Martinez Canillas is trying to make a more general solution in commit 873eb3b11860 ("fbdev: Disable sysfb device registration when removing conflicting FBs"). However, this patch still makes sense because it can make the screen display as early as possible (We cannot move to subsys_initcall, since sysfb_init() should be executed after PCI enumeration). Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-11drm/panel: panel-simple: Add BOE EV121WXM-N10-1850 panel supportLiu Ying1-0/+34
Add BOE EV121WXM-N10-1850 12.1" WXGA (1280x800) TFT LCD panel support. The panel has a LVDS display interface. The panel's product specification can be found at: http://www.onetech.com.tw/files/EV121WXM-N10-1850ProductSpecification_20180801.pdf Signed-off-by: Liu Ying <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-11dt-bindings: display: simple: Add BOE EV121WXM-N10-1850 panelLiu Ying1-0/+2
Add BOE EV121WXM-N10-1850 12.1" WXGA (1280x800) TFT LCD panel compatible string. The panel has a LVDS display interface. The panel's product specification can be found at: http://www.onetech.com.tw/files/EV121WXM-N10-1850ProductSpecification_20180801.pdf Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Liu Ying <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-11drm/panel: sharp-ls043t1le01: drop dummy functions and data fieldsDmitry Baryshkov1-32/+0
Drop sharp_nt_panel_disable() and sharp_nt_panel_enable(), which bear no useful code. Also drop sharp_nt_panel::enable and sharp_nt_panel::mode fields which also provide no use now. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-11drm/panel: sharp-ls043t1le01: adjust mode settingsDmitry Baryshkov1-5/+6
Using current settings causes panel flickering on APQ8074 dragonboard. Adjust panel settings to follow the vendor-provided mode. This also enables MIPI_DSI_MODE_VIDEO_SYNC_PULSE, which is also specified by the vendor dtsi for the mentioned dragonboard. Fixes: ee0172383190 ("drm/panel: Add Sharp LS043T1LE01 MIPI DSI panel") Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-11drm: sun4i_tcon: use devm_clk_get_enabled in `sun4i_tcon_init_clocks`XuDong Liu1-15/+4
Smatch reports: drivers/gpu/drm/sun4i/sun4i_tcon.c:805 sun4i_tcon_init_clocks() warn: 'tcon->clk' from clk_prepare_enable() not released on lines: 792,801. In the function sun4i_tcon_init_clocks(), tcon->clk and tcon->sclk0 are not disabled in the error handling, which affects the release of these variable. Although sun4i_tcon_bind(), which calls sun4i_tcon_init_clocks(), use sun4i_tcon_free_clocks to disable the variables mentioned, but the error handling branch of sun4i_tcon_init_clocks() ignores the required disable process. To fix this issue, use the devm_clk_get_enabled to automatically balance enable and disabled calls. As original implementation use sun4i_tcon_free_clocks() to disable clk explicitly, we delete the related calls and error handling that are no longer needed. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Fixes: b14e945bda8a ("drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init") Fixes: 8e9240472522 ("drm/sun4i: support TCONs without channel 1") Fixes: 34d698f6e349 ("drm/sun4i: Add has_channel_0 TCON quirk") Signed-off-by: XuDong Liu <[email protected]> Reviewed-by: Dongliang Mu <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-10drm: sun4i: calculate proper DCLK rate for DSIRoman Beranek1-15/+21
In DSI mode, TCON0's data clock is required to run at 1/4 the per-lane bit rate. Signed-off-by: Roman Beranek <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-10drm: sun4i: rename sun4i_dotclock to sun4i_tcon_dclkRoman Beranek4-7/+7
While the rate of TCON0's DCLK matches dotclock for parallel and LVDS outputs, this doesn't hold for DSI. The 'D' in DCLK actually stands for 'Data' according to Allwinner's manuals. The clock is mostly referred to as dclk throughout this driver already anyway, so stick with that. Signed-off-by: Roman Beranek <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-09Merge drm/drm-next into drm-misc-nextMaxime Ripard12099-372469/+621853
Start the 6.5 release cycle. Signed-off-by: Maxime Ripard <[email protected]>
2023-05-09MAINTAINERS: Add Maira to VKMS maintainersMaíra Canal1-0/+1
I've been contributing to VKMS with improvements, reviews, testing and debugging. Therefore, add myself as a co-maintainer of the VKMS driver. Acked-by: Melissa Wen <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-09drm/connector: document enum drm_connector_tv_mode DRM_MODE_TV_MODE_MAXJani Nikula1-0/+5
Add documentation for the DRM_MODE_TV_MODE_MAX enumerator to fix the kernel-doc warning: include/drm/drm_connector.h:204: warning: Enum value 'DRM_MODE_TV_MODE_MAX' not described in enum 'drm_connector_tv_mode' Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Simon Ser <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-08Documentation: vkms: clarify devres managed reference cleanupBrandon Pollack1-1/+3
added documentation to drm_dev_unregister clarifying that devres managed devices allocated with devm_drm_dev_alloc do not require calls to drm_dev_put. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Brandon Pollack <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-08drm/fb-helper: Use fb_{cfb,sys}_{read, write}()Thomas Zimmermann1-170/+4
Implement DRM fbdev helpers for reading and writing framebuffer memory with the respective fbdev functions. Removes duplicate code. v2: * rename fb_cfb_() to fb_io_() (Geert) Signed-off-by: Thomas Zimmermann <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Helge Deller <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-08fbdev: Move I/O read and write code into helper functionsThomas Zimmermann4-117/+146
Move the existing I/O read and write code for I/O memory into the new helpers fb_cfb_read() and fb_cfb_write(). Make them the default fp_ops. No functional changes. In the near term, the new functions will be useful to the DRM subsystem, which currently provides it's own implementation. It can then use the shared code. In the longer term, it might make sense to revise the I/O helper's default status and make them opt-in by the driver. Systems that don't use them would not contain the code any longer. v2: * add detailed commit message (Javier) * rename fb_cfb_() to fb_io_() (Geert) * add fixes that got lost while moving the code (Geert) Signed-off-by: Thomas Zimmermann <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Helge Deller <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2023-05-08fbdev: Validate info->screen_{base, buffer} in fb_ops implementationsThomas Zimmermann11-4/+43
Push the test for info->screen_base from fb_read() and fb_write() into the implementations of struct fb_ops.{fb_read,fb_write}. In cases where the driver operates on info->screen_buffer, test this field instead. While bothi fields, screen_base and screen_buffer, are stored in the same location, they refer to different address spaces. For correctness, we want to test each field in exactly the code that uses it. v2: * also test screen_base in pvr2fb (Geert) * also test screen_buffer in ivtvfb, arcfb, broadsheetfb, hecubafb, metronomefb and ssd1307fb (Geert) * give a rational for the change (Geert) Signed-off-by: Thomas Zimmermann <[email protected]> Tested-by: Sui Jingfeng <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Acked-by: Helge Deller <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]