[PATCH] drm/ast: add multiple connectors support

2024-07-11 Thread oushixiong1025
From: Shixiong Ou [WHY] The AST2600 tx_chip_types will be detected as AST_TX_DP, but some BMC boards that use AST2600 use the VGA interface instead of the DP interface. In this case, it will use Virtual connector as the DP is disconnected. [HOW] Allows multiple physical connectors to exist at th

[PATCH] drm: Add the missing symbol '.'

2024-07-29 Thread oushixiong1025
From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/gpu/drm/drm_probe_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index bb49d552e671..285290067056 100644 --- a/drivers/gpu/drm/drm_prob

[PATCH] drm/hisilicon: Fix a NULL pointer access when call hibmc_unload

2024-06-06 Thread oushixiong1025
From: Shixiong Ou If Calling hibmc_mm_init() failed in hibmc_load(), the hibmc_unload() will access a NULL pointer, as it don't call ww_mutex_init() to initialize mode_config.connection_mutex but try to lock it when calling drm_atomic_helper_shutdown() in hibmc_unload(). [ 50.939211][ 0] Unab

[PATCH] drm/bridge: convert to use devm_platform_ioremap_resource()

2025-02-05 Thread oushixiong1025
From: Shixiong Ou convert to use devm_platform_ioremap_resource(). Signed-off-by: Shixiong Ou --- drivers/gpu/drm/bridge/microchip-lvds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c ind

[PATCH v2] fbdev: lcdcfb: add missing device_remove_file()

2025-02-08 Thread oushixiong1025
From: Shixiong Ou 1. The device_remove_file() need to be called when driver is removing. 2. The device_remove_file() need to be called if the call to device_create_file() fails. Signed-off-by: Shixiong Ou --- v1->v2: add missing 'return error'. call device_remove_file() in sh

[PATCH] fbdev: lcdcfb: add missing device_remove_file()

2025-02-08 Thread oushixiong1025
From: Shixiong Ou 1. The device_remove_file() need to be called when driver is removing. 2. The device_remove_file() need to be called if the call to device_create_file() fails. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 17 + 1 file changed, 13

[PATCH] fbdev: fsl-diu-fb: add missing device_remove_file()

2025-02-08 Thread oushixiong1025
From: Shixiong Ou Call device_remove_file() when driver remove. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/fsl-diu-fb.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c index 5ac8201c3533..8c91af9a9156 100644 --

[PATCH] drm/bridge: Use devm_platform_get_and_ioremap_resource()

2025-01-21 Thread oushixiong1025
From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +--- drivers/gpu/drm/bridge/microchip-lvds.c| 5 ++--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/

[PATCH] drm/aspeed: Use devm_platform_get_and_ioremap_resource()

2025-01-20 Thread oushixiong1025
From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index a7a6b70220eb..33f81b53771d 100644 --- a/drivers

[PATCH] fbdev/sh_mobile_lcdcfb: Use backlight helper

2025-01-20 Thread oushixiong1025
From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 6b37b188af31..69c9067eff88 100644 --- a/drivers

[PATCH] drm/bridge: analogix_dp: Use devm_platform_ioremap_resource()

2025-01-27 Thread oushixiong1025
From: Shixiong Ou Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(). Signed-off-by: Shixiong Ou --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/mediatek: Convert to use devm_platform_ioremap_resource

2025-01-28 Thread oushixiong1025
From: Shixiong Ou Do not need to get resource, so convert to use devm_platform_ioremap_resource. Signed-off-by: Shixiong Ou --- drivers/gpu/drm/mediatek/mtk_padding.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_padding.c b/drivers/gpu/drm

[PATCH v2] drm/bridge: Use devm_platform_get_and_ioremap_resource()

2025-01-21 Thread oushixiong1025
From: Shixiong Ou Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(). Signed-off-by: Shixiong Ou --- V1 -> V2: Add Missing commit message. drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +--- drivers/gpu/drm/bridge/mic

[PATCH v2] drm/aspeed: Use devm_platform_get_and_ioremap_resource()

2025-01-21 Thread oushixiong1025
From: Shixiong Ou Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(). Signed-off-by: Shixiong Ou --- V1 -> V2: Add Missing commit message. drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 dele

[PATCH] fbdev: efifb: Change the return value type to void

2025-01-02 Thread oushixiong1025
From: Shixiong Ou efifb_setup() doesn't need to return a value. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/efifb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 20517448487e..0e1bd3dba255 100644 --

[PATCH v2] fbcon: Use static attribute groups for sysfs entries

2025-03-13 Thread oushixiong1025
From: Shixiong Ou Using device_create_with_groups() to simplify creation and removal. Same as commit 1083a7be4504 ("tty: Use static attribute groups for sysfs entries"). Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbcon.c | 69 +--- 1 file changed, 19 in

Re: [PATCH 2/3] drm/prime: Support importing DMA-BUF without sg_table

2025-04-30 Thread oushixiong1025

[PATCH 1/3] dma-buf: add flags to skip map_dma_buf() for some drivers

2025-04-30 Thread oushixiong1025
From: Shixiong Ou [WHY] Some Importer does not need to call dma_buf_map_attachment() to get the scatterlist info, especially those drivers of hardware that do not support DMA, such as the udl, the virtgpu and the ast. [HOW] skip map_dma_buf() when dma_buf_dynamic_attach() for some drivers. Sign

[PATCH 2/3] drm/prime: Support importing DMA-BUF without sg_table

2025-04-30 Thread oushixiong1025
From: Shixiong Ou [WHY] On some boards, the dma_mask of Aspeed devices is 0x_, this quite possibly causes the SWIOTLB to be triggered when importing dmabuf. However IO_TLB_SEGSIZE limits the maximum amount of available memory for DMA Streaming Mapping, as dmesg following: [ 24.885303][

[PATCH 3/3] drm/udl: Use the default gem_prime_import function

2025-04-30 Thread oushixiong1025
From: Shixiong Ou Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index c00d8b8834f2..8107549b12e5 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/dr

[PATCH 2/3] drm/ast: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-04-30 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 3/3] drm/udl: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-04-30 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 19 +-- 1 file changed, 1 insert

[PATCH 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-04-30 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v2 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-06 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v2 2/3] drm/ast: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-06 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- v1->v2: patch rebase. drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file ch

[PATCH v2 3/3] drm/udl: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-06 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- v1->v2: patch rebase. drivers/gpu/drm/udl/udl_drv.c | 2 +- 1 file chan

[PATCH v3 3/3] drm/udl: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-07 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3 2/3] drm/ast: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-07 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH v3 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-07 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v3] fbdev: lcdcfb: add missing device_remove_file()

2025-02-18 Thread oushixiong1025
From: Shixiong Ou 1. The device_remove_file() need to be called when driver is removing. 2. The device_remove_file() need to be called if the call to device_create_file() fails. Signed-off-by: Shixiong Ou --- v1->v2: add missing 'return error'. call device_remove_file() in sh

[PATCH] fbdev: lcdcfb: Register sysfs groups through driver core

2025-02-19 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. The driver forgot to call device_remove_file() in sh_mobile_lcdc_overlay_fb_unregister(), and there was no error handling when calling device_create_file() failed. 2. This should probably use device_add_group() instead of individual files to simplify bot

[PATCH v3] fbdev: fsl-diu-fb: add missing device_remove_file()

2025-03-09 Thread oushixiong1025
From: Shixiong Ou Call device_remove_file() when driver remove. Signed-off-by: Shixiong Ou --- v1->v2: add has_dev_attrs flag. v2->v3: drop those extra checks. drivers/video/fbdev/fsl-diu-fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/fsl-diu-fb.c

[PATCH 2/2] fbcon: Change return value type to void

2025-03-11 Thread oushixiong1025
From: Shixiong Ou fbcon_init_device() doesn't need to return a value. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbcon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 51c3e8a5a092..c

[PATCH 1/2] fbcon: Register sysfs groups through device_add_group

2025-03-11 Thread oushixiong1025
From: Shixiong Ou Use device_add_group() to simplify creation and removal. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbcon.c | 48 +++- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbd

[PATCH] fbcon: Use static attribute groups for sysfs entries

2025-03-13 Thread oushixiong1025
From: Shixiong Ou Using device_create_with_groups() to simplify creation and removal. Same as commit 1083a7be4504 ("tty: Use static attribute groups for sysfs entries"). Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbcon.c | 67 +--- 1 file changed, 19 in

[PATCH] drm/arm/komeda: Add a condition check before removing sysfs attribute

2025-02-20 Thread oushixiong1025
From: Shixiong Ou [WHY] If the call to sysfs_create_group() fails, there is no need to call function sysfs_remove_group(). [HOW] Add a condition check before removing sysfs attribute. Signed-off-by: Shixiong Ou --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 7 ++- drivers/gpu

[PATCH] fbdev: Register sysfs groups through device_add_group

2025-02-20 Thread oushixiong1025
From: oushixiong Use device_add_group() to simplify creation. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbsysfs.c | 69 +- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fb

[PATCH v4 3/3] drm/udl: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-08 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v4 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-08 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v4 2/3] drm/ast: use DRM_GEM_SHMEM_SIMPLE_DRIVER_OPS

2025-05-08 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH v5 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-09 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v5 3/3] drm/udl: use DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT

2025-05-09 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v5 2/3] drm/ast: use DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT

2025-05-09 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH] drm/arm/komeda: Register sysfs groups through driver core

2025-05-20 Thread oushixiong1025
From: Shixiong Ou [WHY] If the call to sysfs_create_group() fails, there is no need to call function sysfs_remove_group(). But if calling sysfs_create_group() fails, it will go to label 'err_cleanup:' in komeda_dev_create(), and it will call komeda_dev_destroy() laterly.

[PATCH] drm/hisilicon: Fix a NULL pointer access when hibmc_load failed

2025-05-20 Thread oushixiong1025
From: Shixiong Ou [WHY] If Calling hibmc_mm_init() failed in hibmc_load(), the hibmc_unload() will access a NULL pointer, as it don't call ww_mutex_init() to initialize mode_config.connection_mutex but try to lock it when calling drm_atomic_helper_shutdown(). [ 50.939211][ 0] Unable to handle

[PATCH v5 RESEND 1/3] drm/shmem-helper: Import dmabuf without mapping its sg_table

2025-05-22 Thread oushixiong1025
From: Shixiong Ou [WHY] 1. Drivers using DRM_GEM_SHADOW_PLANE_HELPER_FUNCS and DRM_GEM_SHMEM_DRIVER_OPS (e.g., udl, ast) do not require sg_table import. They only need dma_buf_vmap() to access the shared buffer's kernel virtual address. 2. On certain Aspeed-based boards, a dma_mask o

[PATCH v5 RESEND 2/3] drm/ast: use DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT

2025-05-22 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: ast :07:00.0: swiotlb buffer is full (sz: 3145728 bytes), total 32768 (slots), used 0 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/ast/ast_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH v5 RESEND 3/3] drm/udl: use DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT

2025-05-22 Thread oushixiong1025
From: Shixiong Ou Import dmabuf without mapping its sg_table to avoid issues likes: udl 2-1.4:1.0: swiotlb buffer is full (sz: 2097152 bytes), total 65536 (slots), used 1 (slots) Signed-off-by: Shixiong Ou --- drivers/gpu/drm/udl/udl_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] fbdev: efifb: do not load efifb if PCI BAR has changed but not fixuped

2025-06-26 Thread oushixiong1025
From: Shixiong Ou [WHY] On an ARM machine, the following log is present: [0.900884] efifb: framebuffer at 0x102000, using 3072k, total 3072k [2.297884] amdgpu :04:00.0: remove_conflicting_pci_framebuffers: bar 0: 0x10 -> 0x100fff [2.297886] amdgpu :04:00.0: re

[PATCH] fbcon: Fix outdated registered_fb reference in comment

2025-07-09 Thread oushixiong1025
From: Shixiong Ou The variable was renamed to fbcon_registered_fb, but this comment was not updated along with the change. Correct it to avoid confusion. Signed-off-by: Shixiong Ou --- drivers/video/fbdev/core/fbcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH] drm/shmem-helper: Remove duplicate dma_resv_assert_held

2025-07-22 Thread oushixiong1025
From: Shixiong Ou The call to dma_resv_assert_held(shmem->base.resv) is duplicated in the vmap() and vunamp() function. Remove the duplicate call to clean up the code. Signed-off-by: Shixiong Ou --- drivers/gpu/drm/drm_gem_shmem_helper.c | 4 1 file changed, 4 deletions(-) diff --git a/

[PATCH] drm/udl: add noblocking dirtyfb support

2025-07-22 Thread oushixiong1025
From: Shixiong Ou [WHY] The DIRTYFB IOCTL is blocking by default. In multi-GPU setups, this may rate-limit the Primary GPU if the UDL handles damage too slowly. For example, in a cloud virtual desktop environment, when a USB DisplayLink device is connected to the client, the primary screen's refr