mirror_ubuntu-kernels/drivers/gpu/drm/ast
Thomas Zimmermann dfff99cb56 drm/ast: Acquire I/O-register lock in DDC code
The modeset lock protects the DDC code from concurrent modeset
operations, which use the same registers. Move that code from the
connector helpers into the DDC helpers .pre_xfer() and .post_xfer().

Both, .pre_xfer() and .post_xfer(), enclose the transfer of data blocks
over the I2C channel in the internal I2C function bit_xfer(). Both
calls are executed unconditionally if present. Invoking DDC transfers
from any where within the driver now takes the lock.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325200855.21150-11-tzimmermann@suse.de
2024-04-02 10:40:50 +02:00
..
ast_ddc.c drm/ast: Acquire I/O-register lock in DDC code 2024-04-02 10:40:50 +02:00
ast_ddc.h drm/ast: Store AST device in struct ast_ddc 2024-04-02 10:40:49 +02:00
ast_dp501.c drm/ast: Rename AST_IO_CRTC_PORT to AST_IO_VGACRI 2023-10-19 13:55:33 +02:00
ast_dp.c drm/ast: Rename AST_IO_CRTC_PORT to AST_IO_VGACRI 2023-10-19 13:55:33 +02:00
ast_dram_tables.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ast_drv.c drm/ast: Include <linux/of.h> where necessary 2024-04-02 10:40:43 +02:00
ast_drv.h drm/ast: Move DDC code to ast_ddc.{c,h} 2024-04-02 10:40:46 +02:00
ast_main.c drm/ast: Include <linux/of.h> where necessary 2024-04-02 10:40:43 +02:00
ast_mm.c drm/ast: Rename AST_IO_CRTC_PORT to AST_IO_VGACRI 2023-10-19 13:55:33 +02:00
ast_mode.c drm/ast: Acquire I/O-register lock in DDC code 2024-04-02 10:40:50 +02:00
ast_post.c drm/ast: Partially implement POST without ast device instance 2023-11-28 16:17:08 +01:00
ast_reg.h drm/ast: Enable MMIO without ast device instance 2023-11-28 16:17:08 +01:00
ast_tables.h drm/ast: Add resolution support for 1152x864@75 2022-09-20 10:19:32 +02:00
Kconfig drm: Only select I2C_ALGOBIT for drivers that actually need it 2023-01-10 11:15:44 +01:00
Makefile drm/ast: Move DDC code to ast_ddc.{c,h} 2024-04-02 10:40:46 +02:00