* [PATH] drm/loongson: mode_config.cursor_width should use hw_cursor_w
@ 2026-05-19 7:40 yaolu
2026-05-19 8:33 ` Markus Elfring
0 siblings, 1 reply; 4+ messages in thread
From: yaolu @ 2026-05-19 7:40 UTC (permalink / raw)
To: lvjianmin, wuqianhai
Cc: chenhuacai, jeffbai, xry111, zhengxingda, dri-devel, linux-kernel,
Lu Yao
From: Lu Yao <yaolu@kylinos.cn>
mode_config.cursor_width should use hw_cursor_w rather than hw_cursor_h.
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
drivers/gpu/drm/loongson/lsdc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c
index 79bb61278aa7..02615fa6a1d5 100644
--- a/drivers/gpu/drm/loongson/lsdc_drv.c
+++ b/drivers/gpu/drm/loongson/lsdc_drv.c
@@ -139,7 +139,7 @@ static int lsdc_mode_config_init(struct drm_device *ddev,
ddev->mode_config.preferred_depth = 24;
ddev->mode_config.prefer_shadow = 1;
- ddev->mode_config.cursor_width = descp->hw_cursor_h;
+ ddev->mode_config.cursor_width = descp->hw_cursor_w;
ddev->mode_config.cursor_height = descp->hw_cursor_h;
ddev->mode_config.helper_private = &lsdc_mode_config_helper_funcs;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATH] drm/loongson: mode_config.cursor_width should use hw_cursor_w
2026-05-19 7:40 [PATH] drm/loongson: mode_config.cursor_width should use hw_cursor_w yaolu
@ 2026-05-19 8:33 ` Markus Elfring
2026-05-20 1:53 ` [PATCH v2] " yaolu
0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2026-05-19 8:33 UTC (permalink / raw)
To: Lu Yao, dri-devel, Jianmin Lv, Qianhai Wu
Cc: LKML, Huacai Chen, Icenowy Zheng, Mingcong Bai, Xi Ruoyao
> mode_config.cursor_width should use hw_cursor_w rather than hw_cursor_h.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.1-rc4#n94
How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://elixir.bootlin.com/linux/v7.1-rc3/source/drivers/gpu/drm/loongson/lsdc_drv.c#L142
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] drm/loongson: mode_config.cursor_width should use hw_cursor_w
2026-05-19 8:33 ` Markus Elfring
@ 2026-05-20 1:53 ` yaolu
2026-05-25 12:20 ` Claude review: " Claude Code Review Bot
0 siblings, 1 reply; 4+ messages in thread
From: yaolu @ 2026-05-20 1:53 UTC (permalink / raw)
To: markus.elfring
Cc: chenhuacai, dri-devel, jeffbai, linux-kernel, lvjianmin,
wuqianhai, xry111, yaolu, zhengxingda
From: Lu Yao <yaolu@kylinos.cn>
mode_config.cursor_width should use hw_cursor_w rather than hw_cursor_h.
Fixes: f39db26c5428 ("drm: Add kms driver for loongson display controller")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
v1->v2: add fixes tag suggested by Markus.
Link: https://lore.kernel.org/dri-devel/47e5bbaf-7b39-4c5c-849b-314204db1b97@web.de/
drivers/gpu/drm/loongson/lsdc_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c
index 79bb61278aa7..02615fa6a1d5 100644
--- a/drivers/gpu/drm/loongson/lsdc_drv.c
+++ b/drivers/gpu/drm/loongson/lsdc_drv.c
@@ -139,7 +139,7 @@ static int lsdc_mode_config_init(struct drm_device *ddev,
ddev->mode_config.preferred_depth = 24;
ddev->mode_config.prefer_shadow = 1;
- ddev->mode_config.cursor_width = descp->hw_cursor_h;
+ ddev->mode_config.cursor_width = descp->hw_cursor_w;
ddev->mode_config.cursor_height = descp->hw_cursor_h;
ddev->mode_config.helper_private = &lsdc_mode_config_helper_funcs;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Claude review: drm/loongson: mode_config.cursor_width should use hw_cursor_w
2026-05-20 1:53 ` [PATCH v2] " yaolu
@ 2026-05-25 12:20 ` Claude Code Review Bot
0 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:20 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/loongson: mode_config.cursor_width should use hw_cursor_w
Author: yaolu@kylinos.cn
Patches: 1
Reviewed: 2026-05-25T22:20:19.689476
---
This is a single-patch trivial bugfix for an obvious copy-paste error in the Loongson display controller driver. The `cursor_width` field was being initialized from `hw_cursor_h` (height) instead of `hw_cursor_w` (width). The fix is correct and straightforward.
In practice, the current hardware descriptions define `hw_cursor_w == hw_cursor_h` (32x32 for ls7a1000 and 64x64 for ls7a2000/ls2k2000), so this bug had no visible effect. Still, it's clearly wrong and worth fixing.
The Fixes tag correctly references the original commit that introduced the Loongson KMS driver. The patch is well-formed.
**Verdict: Looks good. No issues found.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-25 12:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 7:40 [PATH] drm/loongson: mode_config.cursor_width should use hw_cursor_w yaolu
2026-05-19 8:33 ` Markus Elfring
2026-05-20 1:53 ` [PATCH v2] " yaolu
2026-05-25 12:20 ` Claude review: " Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox