RE: [PATCH v2] drm/ast: Fix soft lockup

2024-04-08 Thread Jammy Huang
Hi Thomas, Thank you. Regards, Jammy Huang > > Hi, > > I've added a Fixes tag and pushed to patch into drm-misc-fixes. > > Best regards > Thomas > > Am 03.04.24 um 11:02 schrieb Jammy Huang: > > There is a while-loop in ast_dp_set_on_off() tha

[PATCH v2] drm/ast: Fix soft lockup

2024-04-03 Thread Jammy Huang
-by: Jammy Huang Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c index ebb6d8ebd44e..1e9259416980 100644 --- a/drivers/gpu/drm/ast/ast_dp.c +++ b/drivers/gpu/drm/ast/ast_dp.c

[PATCH] drm/ast: Fix soft lockup

2024-03-25 Thread Jammy Huang
Avoid infinite-loop in ast_dp_set_on_off(). Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast/ast_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c index ebb6d8ebd44e..1e9259416980 100644 --- a/drivers/gpu/drm/ast/ast_dp.c

Re: [PATCH v5 2/2] drm/ast: report connection status on Display Port.

2023-07-13 Thread Jammy Huang
Hi Jocelyn, On 2023/7/13 下午 04:17, Jocelyn Falempe wrote: On 13/07/2023 09:00, Jammy Huang wrote: Hi Jocelyn, Thanks for your work. On 2023/7/13 下午 02:40, Jocelyn Falempe wrote: Aspeed always report the display port as "connected", because it doesn't set a .detect_ctx cal

Re: [PATCH v5 2/2] drm/ast: report connection status on Display Port.

2023-07-13 Thread Jammy Huang
Hi Jocelyn, Thanks for your work. On 2023/7/13 下午 02:40, Jocelyn Falempe wrote: Aspeed always report the display port as "connected", because it doesn't set a .detect_ctx callback. Fix this by providing the proper detect callback for astdp and dp501. This also fixes the following regression:

Re: [PATCH v2 00/14] drm/ast: Refactor the device-detection code

2023-06-28 Thread Jammy Huang
Hi, LGTM. Thanks Reviewed-by: Jammy Huang On 2023/6/21 下午 08:53, Thomas Zimmermann wrote: Ast's code for detecting the device type and features is convoluted. It mixes up several state fields, chip types and sub-models. Rework the driver into something more understandable. Patches 1 fixes

[PATCH v3] drm/ast: Fix modeset failed on DisplayPort

2023-05-31 Thread Jammy Huang
If we switch display and update cursor together, it could lead to modeset failed because of concurrent access to IO registers. Add lock protection in DP's edid access to avoid this problem. Reviewed-by: Thomas Zimmermann Signed-off-by: Jammy Huang --- v3 changes: - Update label name after

[PATCH v3] drm/ast: Fix long time waiting on s3/s4 resume

2023-05-29 Thread Jammy Huang
-by: Wendy Wang Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217278 Acked-by: Thomas Zimmermann Signed-off-by: Jammy Huang --- v3 changes: - Update comments v2 changes: - Fix build error. --- drivers/gpu/drm/ast/ast_dp.c | 55 +++--- drivers/gpu/drm/ast

Re: [PATCH v2] drm/ast: Fix long time waiting on s3/s4 resume

2023-05-25 Thread Jammy Huang
Hi Thomas, Thanks for your review. On 2023/5/24 下午 06:41, Thomas Zimmermann wrote: Hi, sorry that this took so long. Am 24.05.23 um 04:34 schrieb Jammy Huang: Hi Thomas, Could you help review this patch? This is an issue leading to kernel panic found by Intel. Wendy has confirmed issue

Re: [PATCH] drm/ast: Fix modeset failed on DisplayPort

2023-05-24 Thread Jammy Huang
Hi Thomas, Thanks, I will modify the patch accordingly. On 2023/5/24 下午 06:47, Thomas Zimmermann wrote: Hi, this patch also fell through the cracks. Apologies. Am 24.05.23 um 04:29 schrieb Jammy Huang: Hi Thomas, Do you have other suggestion for this patch?? The main issue

[PATCH v2] drm/ast: Fix modeset failed on DisplayPort

2023-05-24 Thread Jammy Huang
If we switch display and update cursor together, it could lead to modeset failed because of concurrent access to IO registers. Add lock protection in DP's edid access to avoid this problem. Signed-off-by: Jammy Huang --- v2 changes: - Fix build error since new struct ast_device is used

Re: [PATCH v2] drm/ast: Fix long time waiting on s3/s4 resume

2023-05-23 Thread Jammy Huang
Hi Thomas, Could you help review this patch? This is an issue leading to kernel panic found by Intel. Wendy has confirmed issue resolved by this patch. On 2023/4/14 下午 03:42, Jammy Huang wrote: In resume, DP's launch function, ast_dp_launch, could wait at most 30 seconds before timeout

Re: [PATCH] drm/ast: Fix modeset failed on DisplayPort

2023-05-23 Thread Jammy Huang
Hi Thomas, Do you have other suggestion for this patch?? Please kindly advise. On 2023/4/25 下午 03:39, Jammy Huang wrote: Hi Thomas, I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: Hi Am 25.04.23 um 09:03 schrieb Jammy

Re: [PATCH] drm/ast: Fix modeset failed on DisplayPort

2023-04-25 Thread Jammy Huang
Hi Thomas, I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: Hi Am 25.04.23 um 09:03 schrieb Jammy Huang: If we switch display and update cursor together, it could lead to modeset failed because of concurrent access to IO

[PATCH] drm/ast: Fix modeset failed on DisplayPort

2023-04-25 Thread Jammy Huang
If we switch display and update cursor together, it could lead to modeset failed because of concurrent access to IO registers. Add lock protection in DP's edid access to avoid this problem. Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast/ast_mode.c | 11 +++ 1 file changed, 11

[PATCH v3] drm/ast: Fix ARM compatibility

2023-04-20 Thread Jammy Huang
ARM architecture only has 'memory', so all devices are accessed by MMIO if possible. Signed-off-by: Jammy Huang Reviewed-by: Thomas Zimmermann --- v2 changes: - Use MMIO after AST2500 which enable MMIO by default. v3 changes: - Correct comments --- drivers/gpu/drm/ast/ast_main.c | 9

Re: [PATCH v2] drm/ast: Fix ARM compatibility

2023-04-20 Thread Jammy Huang
Hi Thomas, Thanks for help. I will update a new patch per your comments On 2023/4/20 下午 04:57, Thomas Zimmermann wrote: Hi Am 20.04.23 um 10:09 schrieb Jammy Huang: ARM architecture only has 'memory', so all devices are accessed by MMIO if possible. Signed-off-by: Jammy Huang ---   v2

[PATCH v2] drm/ast: Fix ARM compatibility

2023-04-20 Thread Jammy Huang
ARM architecture only has 'memory', so all devices are accessed by MMIO if possible. Signed-off-by: Jammy Huang --- v2 changes: - Use MMIO after AST2500 which enable MMIO by default. --- drivers/gpu/drm/ast/ast_main.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] drm/ast: Fix ARM compatibility

2023-04-18 Thread Jammy Huang
Jammy Huang: Hi Thomas, The Intel(x86) CPUs have a separate address space for "IO", but the ARM architecture only has "memory", so all IO devices are accessed as if they were memory. Which means ARM does not support isolated IO. Here is a related discussion on

Re: [PATCH] drm/ast: Fix ARM compatibility

2023-04-17 Thread Jammy Huang
://community.arm.com/support-forums/f/architectures-and-processors-forum/52046/how-to-read-write-an-i-o-port-in-aarch64 Thus, we want to adapt MMIO only after this patch. On 2023/4/17 下午 07:51, Thomas Zimmermann wrote: Hi Am 07.04.23 um 04:09 schrieb Jammy Huang: Hi Thomas, Could you help review

Re: [PATCH 01/11] drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-17 Thread Jammy Huang
Hi Thomas, The Intel(x86) CPUs have a separate address space for "IO", but the ARM architecture only has "memory", so all IO devices are accessed as if they were memory. Which means ARM does not support isolated IO. Here is a related discussion on ARM's forum.

[PATCH v2] drm/ast: Fix long time waiting on s3/s4 resume

2023-04-14 Thread Jammy Huang
In resume, DP's launch function, ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled. To avoid this problem, we only check if DP enable or not at driver probe. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217278 Signed-off-by: Jammy Huang --- v2 changes

[PATCH] drm/ast: Fix long time waiting on s3/s4 resume

2023-04-13 Thread Jammy Huang
In resume, DP's launch function, ast_dp_launch, could wait at most 30 seconds before timeout to check if DP is enabled. To avoid this problem, we only check if DP enable or not at driver probe. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217278 Signed-off-by: Jammy Huang --- drivers/gpu

Re: [PATCH] drm/ast: Fix ARM compatibility

2023-04-06 Thread Jammy Huang
Hi Thomas, Could you help review this patch?? We met some problem on nvidia's ARM platfrom and need this patch to fix it. On 2023/3/2 上午 10:19, Jammy Huang wrote: ARM architecture only has 'memory', so all devices are accessed by MMIO. Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast

[PATCH] drm/ast: Fix ARM compatibility

2023-03-01 Thread Jammy Huang
ARM architecture only has 'memory', so all devices are accessed by MMIO. Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast/ast_main.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index

Re: [PATCH v3] drm/ast: Fix start address computation

2023-02-09 Thread Jammy Huang
the change to plane_init() and also fix the cursor plane.     (Jammy Huang) Tested on a sr645 affected by this bug. Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM") Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann Reviewed-by: Jammy Huang ---   drivers/g

Re: [PATCH v2] drm/ast: Fix start address computation

2023-02-09 Thread Jammy Huang
Hello, The offset given to ast_set_start_address_crt1() should be offset in vram. It should 0 now as your patch. I think it is better to correct it in ast_primary_plane_init() and ast_cursor_plane_init() as below. --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@

Re: [PATCH] drm/ast: Fix no display at WayLand after power-off

2022-12-11 Thread Jammy Huang
Hi Thomas, OK. Thanks for the reminder. On 2022/12/9 下午 05:45, Thomas Zimmermann wrote: Hi Am 09.12.22 um 10:11 schrieb Jammy Huang: With WayLand, there is error log when display waken up from power-off: gnome-shell: Failed to post KMS update: CRTC property (GAMMA_LUT) not found gnome

[PATCH] drm/ast: Fix no display at WayLand after power-off

2022-12-09 Thread Jammy Huang
With WayLand, there is error log when display waken up from power-off: gnome-shell: Failed to post KMS update: CRTC property (GAMMA_LUT) not found gnome-shell: Page flip discarded: CRTC property (GAMMA_LUT) not found To fix the issue, enable GAMMA_LUT property on CRTC. Signed-off-by: Jammy Huang

[PATCH] drm/hisilicon/kirin: Fix typo in kirin_drm_drv.c

2022-09-20 Thread Jammy Huang
'config_max_height' should be used for 'max_height'. Signed-off-by: Jammy Huang --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin

Re: [PATCH] drm/ast: Fix video broken in some resolutions on ast2600

2022-09-20 Thread Jammy Huang
Hi Thomas, On 2022/9/20 下午 04:43, Thomas Zimmermann wrote: Hi Am 16.09.22 um 11:17 schrieb Jammy Huang: Some cases are not handled well for ast2600. Signed-off-by: Jammy Huang ---   drivers/gpu/drm/ast/ast_mode.c | 10 --   1 file changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/ast: Fix video broken in some resolutions on ast2600

2022-09-16 Thread Jammy Huang
Some cases are not handled well for ast2600. Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast/ast_mode.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index d327dcbaf032..be9bbc888ac3 100644

[PATCH v2] drm/ast: Add resolution support for 1152x864@75

2022-09-16 Thread Jammy Huang
Add 1152x864 into support list. Signed-off-by: Jammy Huang --- v2 changes: - add check in mode_valid --- drivers/gpu/drm/ast/ast_mode.c | 9 + drivers/gpu/drm/ast/ast_tables.h | 7 +++ 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu

[PATCH] drm/ast: Add resolution support for 1152x864@75

2022-09-16 Thread Jammy Huang
Add 1152x864 into support list. Signed-off-by: Jammy Huang --- drivers/gpu/drm/ast/ast_mode.c | 3 +++ drivers/gpu/drm/ast/ast_tables.h | 7 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 214b10178454..0b2c5fe8dc2c

[PATCH] drm/hisilicon/kirin: Fix typo in kirin_drm_drv.c

2022-08-24 Thread Jammy Huang
'config_max_height' should be used for 'max_height'. Signed-off-by: Jammy Huang --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin