[PATCH] drm/mgag200: Fix PLL setup for g200wb and g200ew

2022-03-08 Thread Jocelyn Falempe
B_PIX_PLLC_N/M/P was mistakenly replaced with MGA1064_PIX_PLLC_N/M/P which have different addresses. Patch tested on a Dell T310 with g200wb Fixes: f86c3ed55920ca1d874758cc290890902a6cffc4 Cc: sta...@vger.kernel.org Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_pll.c | 6 +++--

Re: [PATCH] drm/mgag200: Fix PLL setup for g200wb and g200ew

2022-03-08 Thread Jocelyn Falempe
On 08/03/2022 18:31, Greg KH wrote: On Tue, Mar 08, 2022 at 06:11:11PM +0100, Jocelyn Falempe wrote: commit f86c3ed55920ca1d874758cc290890902a6cffc4 ("drm/mgag200: Split PLL setup into compute and update functions") introduced a regression for g200wb and g200ew. No need for all th

[PATCH v2] drm/mgag200: Fix PLL setup for g200wb and g200ew

2022-03-08 Thread Jocelyn Falempe
akenly replaced with MGA1064_PIX_PLLC_N/M/P which have different addresses. Patch tested on a Dell T310 with g200wb Fixes: f86c3ed55920 ("drm/mgag200: Split PLL setup into compute and update functions") Cc: sta...@vger.kernel.org Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mg

Re: [PATCH] mgag200 fix memmapsl configuration in GCTL6 register

2022-01-18 Thread Jocelyn Falempe
On 18/01/2022 17:38, Javier Martinez Canillas wrote: Hello Jocelyn, On 1/14/22 10:47, Jocelyn Falempe wrote: My worry is if this could cause other issues so I would only do this change if (is_kdump_kernel()), to make it as non intrusive as possible. And also add a verbose comment about why

Re: [PATCH] mgag200 fix memmapsl configuration in GCTL6 register

2022-01-18 Thread Jocelyn Falempe
On 18/01/2022 18:17, Javier Martinez Canillas wrote: On 1/18/22 17:52, Jocelyn Falempe wrote: On 18/01/2022 17:38, Javier Martinez Canillas wrote: Hello Jocelyn, On 1/14/22 10:47, Jocelyn Falempe wrote: My worry is if this could cause other issues so I would only do this change if

[PATCH v2] mgag200 fix memmapsl configuration in GCTL6 register

2022-01-19 Thread Jocelyn Falempe
A console is at 0xb8000 (text mode) In arch/x86/boot/compressed/misc.c debug strings are written to 0xb8000 As the driver doesn't use this mapping at 0xa, it is safe to set it to 0xb8000 instead, to avoid kernel hang on G200_SE_A rev42, with kexec/kdump. Thus changing the value 0x05

Re: [PATCH 3/5] drm/simpledrm: Request memory region in driver

2022-01-24 Thread Jocelyn Falempe
On 24/01/2022 13:36, Thomas Zimmermann wrote: Requesting the framebuffer memory in simpledrm marks the memory range as busy. This used to be done by the firmware sysfb code, but the driver is the correct place. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/simpledrm.c | 20 +++

Re: [PATCH 3/5] drm/simpledrm: Request memory region in driver

2022-01-25 Thread Jocelyn Falempe
(Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Reviewed-by: Jocelyn Falempe -- Jocelyn Falempe

[PATCH] drm/fb-helper: Fix restore_fbdev when there are pending delayed hotplug

2021-11-04 Thread Jocelyn Falempe
master in this case. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_fb_helper.c | 66 ++--- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 8e7a124d6c5a..c07080f661b1 10064

Re: [PATCH] drm/fb-helper: Fix restore_fbdev when there are pending delayed hotplug

2021-11-05 Thread Jocelyn Falempe
On 05/11/2021 16:50, Michel Dänzer wrote: On 2021-11-04 17:32, Jocelyn Falempe wrote: When using Xorg/Logind and an external monitor connected with an MST dock. After disconnecting the external monitor, switching to VT may not work, the (internal) monitor sill display Xorg, and you can'

[PATCH v2] drm/fb-helper: Call drm_fb_helper_hotplug_event() when releasing drm master

2021-11-08 Thread Jocelyn Falempe
nitor. So when dropping the drm master, call the delayed hotplug function if needed. v2: rewrote the patch by calling the hotplug function after dropping master Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_auth.c | 7 +++ drivers/gpu/drm/drm_fb_helper.c | 6 +++-

Re: [PATCH v2] drm/fb-helper: Call drm_fb_helper_hotplug_event() when releasing drm master

2021-11-08 Thread Jocelyn Falempe
On 08/11/2021 17:00, Daniel Vetter wrote: On Mon, Nov 08, 2021 at 04:34:53PM +0100, Jocelyn Falempe wrote: When using Xorg/Logind and an external monitor connected with an MST dock. After disconnecting the external monitor, switching to VT may not work, the (internal) monitor sill display Xorg

Re: [PATCH v2] drm/fb-helper: Call drm_fb_helper_hotplug_event() when releasing drm master

2021-11-15 Thread Jocelyn Falempe
On 08/11/2021 17:00, Daniel Vetter wrote: On Mon, Nov 08, 2021 at 04:34:53PM +0100, Jocelyn Falempe wrote: When using Xorg/Logind and an external monitor connected with an MST dock. After disconnecting the external monitor, switching to VT may not work, the (internal) monitor sill display Xorg

mgag200 fix memmapsl configuration in GCTL6 register

2022-01-14 Thread Jocelyn Falempe
On some server with MGA G200e (rev 42), booting with Legacy BIOS, The hardware hangs when using kdump and kexec into the kdump kernel. This happens when the uncompress code tries to write "Decompressing Linux" to the VGA Console. It can be reproduced by writing to the VGA console (0xB8000) after

[PATCH] mgag200 fix memmapsl configuration in GCTL6 register

2022-01-14 Thread Jocelyn Falempe
00 arch/x86/boot/compressed/misc.c define vidmem to 0xb8000 in extract_kernel() so it's better to configure it to b11 Thus changing the value 0x05 to 0x0d Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [PATCH 00/10] drm/mgag200: Convert device init to use device-info structure

2022-06-02 Thread Jocelyn Falempe
with G200 and G200EV hardware. Thanks for this refactoring. I've also tested this patchset on a G200eW, and have seen no regression. For the whole series: Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Thomas Zimmermann (10): drm/mgag200: Remove special case for G200SE w

Re: [PATCH] drm/ast: Treat AST2600 like AST2500 in most places

2022-06-08 Thread Jocelyn Falempe
s. Handling AST2600 in the AST2500 branches reverts back to the original settings. The exception are cases where AST2600 meanwhile got its own branch. Reported-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann Suggested-by: Jocelyn Falempe Fixes: f9bd00e0ea9d ("drm/ast: Create chip AST26

Re: [PATCH] drm/ast: Treat AST2600 like AST2500 in most places

2022-06-08 Thread Jocelyn Falempe
On 08/06/2022 10:09, Kuo-Hsiang Chou wrote: Hi Thomas Thanks for your suggestions! I answer each revision inline that followed by [KH]:. Thanks for reviewing this. Regards,     Kuo-Hsiang Chou -Original Message- From: Thomas Zimmermann [mailto:tzimmerm...@suse.de] Sent: Tue

Re: [PATCH] drm/ast: Treat AST2600 like AST2500 in most places

2022-06-09 Thread Jocelyn Falempe
On 09/06/2022 04:32, Kuo-Hsiang Chou wrote: Hi Jocelyn Falempe, -Original Message- From: Jocelyn Falempe [mailto:jfale...@redhat.com] Sent: Wednesday, June 08, 2022 9:17 PM To: Kuo-Hsiang Chou ; Thomas Zimmermann ; airl...@redhat.com; airl...@linux.ie; dan...@ffwll.ch; regressi

[PATCH] drm/ast: Fix black screen when getting out of suspend

2022-06-22 Thread Jocelyn Falempe
https://www.aspeedtech.com/support_driver/ Signed-off-by: Jocelyn Falempe Tested-by: Venkat Tadikonda --- drivers/gpu/drm/ast/ast_mode.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 3eb9afecd9d4..cdddcb5

[drm] *ERROR* mstb 0000000057b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed

2022-02-16 Thread Jocelyn Falempe
Hi, When using a Lenovo dock, I often get this error message on dmesg: [drm] *ERROR* mstb 57b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed It's caused by fwupd which tries to read from /dev/drm_dp_aux4 I opened an issue on fwupd: https://github.com/fwupd/fwupd/issues/4284

Re: [drm] *ERROR* mstb 0000000057b5b857 port 1: DPCD read on addr 0x4b0 for 1 bytes NAKed

2022-02-17 Thread Jocelyn Falempe
On 17/02/2022 19:15, Lyude Paul wrote: Hi! Sorry for the late reply, I had to take some time off work unexpectedly. This is normal (although not great TBH, I'm not sure we should be printing an error message for that), it's the result of fwupd trying to probe the MST hub to see if it's a specific

[PATCH 0/4] mgag200: Improve damage handling

2022-04-26 Thread Jocelyn Falempe
This series improves the damage handling on Matrox gpu, and allows Gnome/Wayland to run much better. Also include some driver cleanup. Tested on a Dell T310 with Matrox MGA G200eW WPCM450 (rev 0a) Thanks, Jocelyn Falempe (4): mgag200: Add FB_DAMAGE_CLIPS support mgag200: Optimize damage

[PATCH 1/4] mgag200: Add FB_DAMAGE_CLIPS support

2022-04-26 Thread Jocelyn Falempe
this patch, gnome/wayland becomes usable on Matrox GPU. Suggested-by: Jonas Ådahl Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c

[PATCH 2/4] mgag200: Optimize damage clips

2022-04-26 Thread Jocelyn Falempe
when there are multiple damage clips, previous code merged them into one big rectangle. As the Matrox memory is very slow, it's faster to copy each damage clip. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 15 ++- 1 file changed, 10 insertions(

[PATCH 3/4] mgag200: remove unused flag

2022-04-26 Thread Jocelyn Falempe
The flag MGAG200_FLAG_HW_BUG_NO_STARTADD is no more used, because the framebuffer is now always at offset 0. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_drv.c | 3 +-- drivers/gpu/drm/mgag200/mgag200_drv.h | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff

[PATCH 4/4] mgag200: remove mgag200_probe_vram()

2022-04-26 Thread Jocelyn Falempe
, as it is video memory, the user will notice it easily. So there is no need for this function. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mm.c | 50 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/drivers/gpu/drm/mgag200

Re: [PATCH 2/4] mgag200: Optimize damage clips

2022-05-04 Thread Jocelyn Falempe
On 04/05/2022 12:04, Thomas Zimmermann wrote: Hi Am 26.04.22 um 18:41 schrieb Jocelyn Falempe: when there are multiple damage clips, previous code merged them into one big rectangle. As the Matrox memory is very slow, it's faster to copy each damage clip. Signed-off-by: Jocelyn Fa

Re: [PATCH 3/4] mgag200: remove unused flag

2022-05-04 Thread Jocelyn Falempe
On 04/05/2022 12:12, Thomas Zimmermann wrote: Hi Am 26.04.22 um 18:41 schrieb Jocelyn Falempe: The flag MGAG200_FLAG_HW_BUG_NO_STARTADD is no more used, because the framebuffer is now always at offset 0. Oh, well. I remember that thing. It took us a long time to find and fix this problem

Re: [PATCH 4/4] mgag200: remove mgag200_probe_vram()

2022-05-04 Thread Jocelyn Falempe
On 04/05/2022 12:16, Thomas Zimmermann wrote: Hi Am 26.04.22 um 18:41 schrieb Jocelyn Falempe: This function writes some pattern to video memory, to check for conflict. In case of conflicts, it returns a random memory capacity (offset of the conflict). Using devm_arch_io_reserve_memtype_wc

Re: [PATCH 3/3] drm/mgag200: Protect concurrent access to I/O registers with lock

2022-05-04 Thread Jocelyn Falempe
it anyway. It looks good to me, Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_drv.c | 6 ++ drivers/gpu/drm/mgag200/mgag200_drv.h | 1 + drivers/gpu/drm/mgag200/mgag200_mode.c | 14 ++ 3 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/mgag

[PATCH v2 0/3] mgag200: Improve damage handling

2022-05-04 Thread Jocelyn Falempe
if startaddr is not 0, and hw doesn't support it. (instead of removing the unused flag). Thanks, -- Jocelyn Jocelyn Falempe (3): mgag200: Add FB_DAMAGE_CLIPS support mgag200: Optimize damage clips mgag200: Warn once if trying to set start address on broken hardware. drivers/gp

[PATCH v2 1/3] mgag200: Add FB_DAMAGE_CLIPS support

2022-05-04 Thread Jocelyn Falempe
this patch, gnome/wayland becomes usable on Matrox GPU. Suggested-by: Jonas Ådahl Signed-off-by: Jocelyn Falempe Reviewed-by: Lyude Paul Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mg

[PATCH v2 2/3] mgag200: Optimize damage clips

2022-05-04 Thread Jocelyn Falempe
When there are multiple damage clips, previous code merged them into one big rectangle. As the Matrox memory is very slow, it's faster to copy each damage clip. Signed-off-by: Jocelyn Falempe Reviewed-by: Lyude Paul Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_m

[PATCH v2 3/3] mgag200: Warn once if trying to set start address on broken hardware.

2022-05-04 Thread Jocelyn Falempe
Some MGA200 hardware are broken, and can't use a start address > 0 v2: Warn if startaddr is not 0, and hw doesn't support it. (instead of removing MGAG200_FLAG_HW_BUG_NO_STARTADD) Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 3 +++ 1 file changed,

Re: [PATCH v2 0/3] mgag200: Improve damage handling

2022-05-04 Thread Jocelyn Falempe
://drm.pages.freedesktop.org/maintainer-tools/commit-access.html for how to do that. Thanks for your reviews. I created the issue to get commit access : https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/433 Best regards, -- Jocelyn Best regards Thomas Am 04.05.22 um 15:40 schrieb Jocelyn Falempe

Re: [PATCH] drm/mgag200: Fail on I2C initialization errors

2022-05-05 Thread Jocelyn Falempe
initialization on I2C- related errors. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_i2c.c | 13 - drivers/gpu/drm/mgag200/mgag200_mode.c | 6 -- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH] mgag200: Enable atomic gamma lut update

2022-05-09 Thread Jocelyn Falempe
Add support for atomic update of gamma lut. With this patch the "Night light" feature of gnome3 is working properly on mgag200. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/d

Re: [PATCH] mgag200: Enable atomic gamma lut update

2022-05-09 Thread Jocelyn Falempe
hrieb Jocelyn Falempe: Add support for atomic update of gamma lut. With this patch the "Night light" feature of gnome3 is working properly on mgag200. Signed-off-by: Jocelyn Falempe ---   drivers/gpu/drm/mgag200/mgag200_mode.c | 46 ++   1 file changed, 46 inse

Re: [PATCH] mgag200: Enable atomic gamma lut update

2022-05-09 Thread Jocelyn Falempe
On 09/05/2022 18:04, Michel Dänzer wrote: On 2022-05-09 16:22, Thomas Zimmermann wrote: It might also make sense to adjust the starting value of the lut table such that its final entry is used for the final entry in the HW palette. For typical gamma ramps ~2, the curve is fairly flat for smal

[PATCH v2] mgag200: Enable atomic gamma lut update

2022-05-11 Thread Jocelyn Falempe
tion for 16bits gamma - remove legacy function mga_crtc_load_lut() - can't remove the call to drm_mode_crtc_set_gamma_size() because it doesn't work with userspace. - other small refactors Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 125

Re: [PATCH v2] mgag200: Enable atomic gamma lut update

2022-05-12 Thread Jocelyn Falempe
On 12/05/2022 10:52, Thomas Zimmermann wrote: Hi Am 11.05.22 um 17:28 schrieb Jocelyn Falempe: Add support for atomic update of gamma lut. With this patch the "Night light" feature of gnome3 is working properly on mgag200. v2:   - Add a default linear gamma function   - renamed func

Re: [PATCH 7/7] drm/mgag200: Split up connector's mode_valid helper

2022-05-12 Thread Jocelyn Falempe
n 30100; ... } else if (mdev->type == G200_ER) { return 55000; } /* No bandwidth defined */ return 0; } then in mgag200_mode_config_mode_valid() int g200_bandwidth = mgag200_get_bandwidth_kbps(mdev); if (g200_bandwidth && mgag200_calc

[PATCH v3] drm/mgag200: Enable atomic gamma lut update

2022-05-13 Thread Jocelyn Falempe
ix printk format to %p4cc for 4cc and %zu for size_t - rebased to drm-misc-next. Signed-off-by: Jocelyn Falempe Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 127 - 1 file changed, 83 insertions(+), 44 deletions

Re: [PATCH v3] drm/mgag200: Enable atomic gamma lut update

2022-05-16 Thread Jocelyn Falempe
I pushed it to drm-misc-next. Thanks, -- Jocelyn

Re: [PATCH v2 0/3] mgag200: Improve damage handling

2022-05-16 Thread Jocelyn Falempe
://drm.pages.freedesktop.org/maintainer-tools/commit-access.html for how to do that. I pushed the patches with the requested changes to drm-misc-next last Thursday. Thanks a lot for your help. -- Jocelyn Best regards Thomas Am 04.05.22 um 15:40 schrieb Jocelyn Falempe: mgag200: Improve damage handling This

[REGRESSION] VGA output with AST 2600 graphics.

2022-06-01 Thread Jocelyn Falempe
Hi, I've found a regression in the ast driver, for AST2600 hardware. before the upstream commit f9bd00e0ea9d https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f9bd00e0ea9d9b04140aa969a9a13ad3597a1e4e The ast driver handled AST 2600 chip like an AST 2500. After this co

Re: [REGRESSION] VGA output with AST 2600 graphics.

2022-06-01 Thread Jocelyn Falempe
On 01/06/2022 12:33, Thomas Zimmermann wrote: Hi Jocelyn, thanks for reporting this bug. Am 01.06.22 um 11:33 schrieb Jocelyn Falempe: Hi, I've found a regression in the ast driver, for AST2600 hardware. before the upstream commit f9bd00e0ea9d https://git.kernel.org/pub/scm/linux/kerne

Re: [PATCH] drm/ast: Fix black screen when getting out of suspend

2022-06-23 Thread Jocelyn Falempe
On 22/06/2022 20:34, Lyude Paul wrote: Some small nitpicks: On Wed, 2022-06-22 at 14:48 +0200, Jocelyn Falempe wrote: With an AST2600, the screen is garbage when going out of suspend. This is because color settings are lost, and not restored on resume. Force the color settings on DPMS_ON, to

Re: [PATCH 0/3] drm: Test for primary plane in new drm_atomic_helper_check_crtc_state()

2022-06-24 Thread Jocelyn Falempe
insertions(+), 12 deletions(-) base-commit: 822a8442835012ce405080cb40f6317ef1e854ac the whole serie looks good to me, Acked-by Jocelyn Falempe

Re: [PATCH] drm/ast: Fix black screen when getting out of suspend

2022-06-27 Thread Jocelyn Falempe
On 23/06/2022 10:21, Jocelyn Falempe wrote: On 22/06/2022 20:34, Lyude Paul wrote: Some small nitpicks: On Wed, 2022-06-22 at 14:48 +0200, Jocelyn Falempe wrote: With an AST2600, the screen is garbage when going out of suspend. This is because color settings are lost, and not restored on

Re: [PATCH] drm/ast: Fix black screen when getting out of suspend

2022-06-27 Thread Jocelyn Falempe
On 27/06/2022 09:39, Thomas Zimmermann wrote: Am 27.06.22 um 09:31 schrieb Jocelyn Falempe: On 23/06/2022 10:21, Jocelyn Falempe wrote: On 22/06/2022 20:34, Lyude Paul wrote: Some small nitpicks: On Wed, 2022-06-22 at 14:48 +0200, Jocelyn Falempe wrote: With an AST2600, the screen is

Re: Annoying AMDGPU boot-time warning due to simplefb / amdgpu resource clash

2022-06-28 Thread Jocelyn Falempe
On 28/06/2022 10:43, Thomas Zimmermann wrote: Hi Am 27.06.22 um 19:25 schrieb Linus Torvalds: On Mon, Jun 27, 2022 at 1:02 AM Javier Martinez Canillas wrote: The flag was dropped because it was causing drivers that requested their memory resource with pci_request_region() to fail with -EBUSY

Re: [PATCH] drm/mgag200: Don't read-back PCI option register before writing

2022-07-11 Thread Jocelyn Falempe
to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann Fixes: ce19021fd99a ("drm/mgag200: Move PCI-option setup into model-specific code") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/mgag200/mg

[PATCH] drm/amd/display: Remove var declaration in dcn32_full_validate_bw_helper()

2022-09-08 Thread Jocelyn Falempe
gnu99, -std=c11 or -std=gnu11 to compile your code drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/dcn32_fpu.c:982:11: error: unused variable 'i' [-Werror=unused-variable] uint32_t i = 0; Fixes: f5b9c1ffabce ("drm/amd/display: Re-initialize viewport after pipe merge") Sig

Re: [PATCH] drm/mgag200: Force 32 bpp on the console

2022-09-19 Thread Jocelyn Falempe
R is affected. I think it may have a performance penalty, I will try to measure it. Reviewed-by: Jocelyn Falempe -- Jocelyn Reported-by: Wang Yugui Signed-off-by: Thomas Zimmermann Tested-by: Wang Yugui Fixes: 73f54d5d9682 ("drm/mgag200: Remove special case for G200SE with <2 MiB&q

[PATCH] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-29 Thread Jocelyn Falempe
the VGA output. But when activating "Night Light" in Gnome, ast_crtc_load_lut() is called. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_mode.c | 35 +- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/ast/ast

[PATCH v2] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-29 Thread Jocelyn Falempe
the VGA output. But when activating "Night Light" in Gnome, ast_crtc_load_lut() is called. v2: use the same functions as mgag200. handle 16bits color mode. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_mode.c | 94 -- 1 file chan

Re: [PATCH v2] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-29 Thread Jocelyn Falempe
On 29/09/2022 17:27, Thomas Zimmermann wrote: Hi Am 29.09.22 um 15:20 schrieb Jocelyn Falempe: The current ast driver only supports legacy gamma interface. This also fixes a Gnome3/Wayland error which incorrectly adds gamma to atomic commit: "Page flip discarded: CRTC property (GAMMA_LUT

[PATCH v3] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-29 Thread Jocelyn Falempe
the VGA output. But when activating "Night Light" in Gnome, ast_crtc_load_lut() is called. v2: use the same functions as mgag200. handle 16bits color mode. v3: Check gamma_lut size in atomic check. Signed-off-by: Jocelyn Falempe Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zim

Re: [PATCH v3] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-30 Thread Jocelyn Falempe
another review below. I'm sorry for the incorrect reply earlier. No problem, without proper hardware to test, and good documentation, it's hard to guess right what the hardware will do at first attempt. Am 30.09.22 um 08:54 schrieb Jocelyn Falempe: The current ast driver onl

[PATCH v4] drm/ast: Add Atomic gamma lut support for aspeed

2022-09-30 Thread Jocelyn Falempe
plane format changes. remove rgb888 format that is not used. Signed-off-by: Jocelyn Falempe Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_mode.c | 87 +++--- 1 file changed, 70 insertions(+), 17 deletions(-) diff --

Re: [PATCH 00/14] drm/mgag200: Move model-specific code into separate functions

2022-07-11 Thread Jocelyn Falempe
on remains the same. I've read the whole serie, and it's good overall. I agree with Sam about the duplication of the DAC-registers setup, but that can be solved later. I have also tested this patchset on a G200eW, and have seen no regression. Reviewed-by: Jocelyn Falempe Tested

Re: [PATCH v2 08/14] drm/mgag200: Set SCROFF in primary-plane code

2022-07-20 Thread Jocelyn Falempe
msleep(20) was done only when enabling/disabling display. With this patch, it will be done for each frame, which will negatively impact performances. -- Jocelyn Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Acked-by: Sam Ravnborg --- drive

Re: [PATCH v3 07/14] drm/mgag200: Replace simple-KMS with regular atomic helpers

2022-07-28 Thread Jocelyn Falempe
: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Tested-by: Jocelyn Falempe Acked-by: Sam Ravnborg --- drivers/gpu/drm/mgag200/mgag200_drv.h | 8 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 382 +++-- 2 files changed, 233 insertions(+), 157 deletions(-) diff --git a

Re: [PATCH v3 07/14] drm/mgag200: Replace simple-KMS with regular atomic helpers

2022-07-29 Thread Jocelyn Falempe
On 28/07/2022 20:31, Thomas Zimmermann wrote: Hi Jocelyn Am 28.07.22 um 17:09 schrieb Jocelyn Falempe: On 28/07/2022 14:40, Thomas Zimmermann wrote: Drop simple-KMS in favor of regular atomic helpers. Makes the code more modular and hence better to adapt to per-model requirements. The simple

[PATCH] drm/ast: Fix start address computation

2023-02-07 Thread Jocelyn Falempe
nvert ast to SHMEM") Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index c7443317c747..d75e4a7611b3 100644 --- a/drivers/gpu/drm/ast/ast_mo

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

2023-02-07 Thread Jocelyn Falempe
On 07/02/2023 12:17, Thomas Zimmermann wrote: Hi Am 07.02.23 um 11:53 schrieb Jocelyn Falempe: During the driver conversion to shmem, there is a missing page shift when computing the start address in GPU memory. This leads to graphic garbage when connecting to the remote BMC, depending on

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

2023-02-09 Thread Jocelyn Falempe
On 07/02/2023 12:36, Jocelyn Falempe wrote: On 07/02/2023 12:17, Thomas Zimmermann wrote: Hi I was wondering if this start address is not an offset in the GPU memory, and in this case the primary plane offset should always be 0 ? I think it's the case, so I will send a v2 shortly.

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

2023-02-09 Thread Jocelyn Falempe
emory is displayed on the BMC. With shmem, the primary plane is always at offset 0 in GPU memory. Tested on a sr645 affected by this bug. Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM") Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_mode.c | 3 ++- 1 file changed, 2 i

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

2023-02-09 Thread Jocelyn Falempe
ailable - size; +   offset = st->vram_fb_available - size; On 2023/2/9 下午 05:12, Jocelyn Falempe wrote: During the driver conversion to shmem, the start address for the scanout buffer was set to the base PCI address. In most cases it works because only the lower 24bits are used, and due to alignment it wa

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

2023-02-09 Thread Jocelyn Falempe
ost hardware it will works. you can see in ast_set_cursor_base() that only the lower 26 bits are used. -- Jocelyn Best regard Thomas On 2023/2/9 下午 05:12, Jocelyn Falempe wrote: During the driver conversion to shmem, the start address for the scanout buffer was set to the base PCI address. In most cases

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

2023-02-09 Thread Jocelyn Falempe
Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM") Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/ast/ast_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index c7443317c747..66a4a41c3f

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

2023-02-10 Thread Jocelyn Falempe
On 10/02/2023 01:33, Jammy Huang wrote: On 2023/2/9 下午 05:55, Thomas Zimmermann wrote: Am 09.02.23 um 10:44 schrieb Jocelyn Falempe: During the driver conversion to shmem, the start address for the scanout buffer was set to the base PCI address. In most cases it works because only the lower

Re: [PATCH v2] drm/i915: Fix CFI violations in gt_sysfs

2023-01-12 Thread Jocelyn Falempe
Hi, This patch does also solve a kernel crash when reading /sys/class/drm/card1/gt/gt0/* on a skylake machine: https://bugzilla.redhat.com/show_bug.cgi?id=2154880 Do you think it can be backported to stable releases ? Conflicts are trivial on top of v6.0 at least. Thanks, -- Jocelyn On 13

Re: [PATCH v2] drm/i915: Fix CFI violations in gt_sysfs

2023-01-13 Thread Jocelyn Falempe
On 12/01/2023 16:56, Nathan Chancellor wrote: Hi Jocelyn, On Thu, Jan 12, 2023 at 11:08:17AM +0100, Jocelyn Falempe wrote: This patch does also solve a kernel crash when reading /sys/class/drm/card1/gt/gt0/* on a skylake machine: https://bugzilla.redhat.com/show_bug.cgi?id=2154880

Re: [PATCH v4] drm/ast: Add Atomic gamma lut support for aspeed

2022-10-05 Thread Jocelyn Falempe
On 30/09/2022 12:45, Thomas Zimmermann wrote: Hi, looks good to me. Let's wait until next week before landing the patch, so that others can comment on it. applied to drm-misc-next Thanks, -- Jocelyn Best regards Thomas Am 30.09.22 um 11:47 schrieb Jocelyn Falempe: The curren

Re: [PATCH 8/8] drm/ast: Avoid reprogramming primary-plane scanout address

2022-10-11 Thread Jocelyn Falempe
On 10/10/2022 12:36, Thomas Zimmermann wrote: Some AST-based BMCs stop display output for up to 5 seconds after reprogramming the scanout address. As the address is fixed, avoid re-setting the address' value. Reported-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gp

Re: [PATCH 8/8] drm/ast: Avoid reprogramming primary-plane scanout address

2022-10-11 Thread Jocelyn Falempe
On 11/10/2022 16:59, Thomas Zimmermann wrote: Hi Am 11.10.22 um 16:21 schrieb Jocelyn Falempe: On 10/10/2022 12:36, Thomas Zimmermann wrote: Some AST-based BMCs stop display output for up to 5 seconds after reprogramming the scanout address. As the address is fixed, avoid re-setting the

Re: [PATCH 1/8] drm/ast: Acquire I/O-register lock in atomic_commit_tail function

2022-10-11 Thread Jocelyn Falempe
On 10/10/2022 12:36, Thomas Zimmermann wrote: Hold I/O-register lock in atomic_commit_tail to protect all pipeline updates at once. Protects modesetting against concurrent EDID reads. Complex modesetting operations involve mode changes and plane updates. These steps used to be protected individu

Re: [PATCH 7/8] drm/ast: Convert ast to SHMEM

2022-10-11 Thread Jocelyn Falempe
On 10/10/2022 12:36, Thomas Zimmermann wrote: Replace GEM VRAM helpers with GEM SHMEM helpers in ast. Avoids OOM errors when allocating video memory. Also adds support for dma-buf functionality. Aspeed display hardware supports display resolutions of FullHD and more at 32-bit pixel depth. But th

Re: [PATCH 0/8] drm/ast: Convert ast driver to SHMEM

2022-10-11 Thread Jocelyn Falempe
Thanks a lot for your series. This solves a big performance impact when using Gnome/Wayland on some Aspeed chip, with BMC. This also remove the need for "shadowFB" workaround in userspace. With the small change in patch 8, and the two typo's, the whole series is Reviewed-by:

[PATCH] drm/mgag200: Fix PLL setup for G200_SE_A rev >=4

2022-10-13 Thread Jocelyn Falempe
with commit 85397f6bc4ff ("drm/mgag200: Initialize each model in separate function") but can be easily backported before this commit. Fixes: 2dd040946ecf ("drm/mgag200: Store values (not bits) in struct mgag200_pll_values") Cc: sta...@vger.kernel.org Signed-off-by: Jocelyn Fale

Re: [PATCH] drm/mgag200: Fix PLL setup for G200_SE_A rev >=4

2022-10-13 Thread Jocelyn Falempe
On 13/10/2022 11:05, Thomas Zimmermann wrote: Hi Am 13.10.22 um 10:29 schrieb Jocelyn Falempe: For G200_SE_A, PLL M setting is wrong, which leads to blank screen, or "signal out of range" on VGA display. previous code had "m |= 0x80" which was changed to m |= ((pix

Re: [PATCH] drm/mgag200: Fix PLL setup for G200_SE_A rev >=4

2022-10-13 Thread Jocelyn Falempe
On 13/10/2022 12:36, Ville Syrjälä wrote: On Thu, Oct 13, 2022 at 11:05:19AM +0200, Thomas Zimmermann wrote: Hi Am 13.10.22 um 10:29 schrieb Jocelyn Falempe: For G200_SE_A, PLL M setting is wrong, which leads to blank screen, or "signal out of range" on VGA display. previous c

[PATCH v2] drm/mgag200: Fix PLL setup for G200_SE_A rev >=4

2022-10-13 Thread Jocelyn Falempe
rm/mgag200: Store values (not bits) in struct mgag200_pll_values") Cc: sta...@vger.kernel.org Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_g200se.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_g200se.c b/drivers/g

Re: [PATCH v2] drm/mgag200: Fix PLL setup for G200_SE_A rev >=4

2022-10-18 Thread Jocelyn Falempe
3.10.22 um 15:28 schrieb Jocelyn Falempe: For G200_SE_A, PLL M setting is wrong, which leads to blank screen, or "signal out of range" on VGA display. previous code had "m |= 0x80" which was changed to m |= ((pixpllcn & BIT(8)) >> 1); Tested on G200_SE_A rev 42 Thi

Re: [PATCH] drm/ast: Init iosys_map pointer as I/O memory for damage handling

2022-12-20 Thread Jocelyn Falempe
ally not a problem in ast's x86-based systems. The error report is at [1]. Reported-by: kernel test robot Signed-off-by: Thomas Zimmermann Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Dave Airlie Cc: dri-devel@lists.fr

Re: [PATCH 07/14] drm/mgag200: Replace simple-KMS with regular atomic helpers

2023-04-25 Thread Jocelyn Falempe
On 25/04/2023 17:03, Thomas Zimmermann wrote: (cc'ing dri-devel, Jocelyn and Sam) Hi Phil, I've put dri-devel into cc, which is the developer's mailing list. It's the first time I hear about this bug. Thanks for pointing this to me, I will take a look at it. -- Jocelyn Am 25.04.23 um 16:

[PATCH 2/4] drm/mgag200: Simplify offset and scale computation.

2023-05-05 Thread Jocelyn Falempe
3 / 16 => pitch / 16 32bit: (bppshift = 2) offset = width >> (4 - bppshift) => width / 4 => pitch / 16 scale: 16bit: scale = (1 << bppshift) - 1 => 1 24bit: scale = ((1 << bppshift) * 3) - 1 => 2 32bit: scale = (1 << bppshift) - 1 => 3 Signed-off-by: Jo

[PATCH 1/4] drm/mgag200: Rename constant MGAREG_Status to MGAREG_STATUS

2023-05-05 Thread Jocelyn Falempe
From: Thomas Zimmermann Register constants are upper case. Fix MGAREG_Status accordingly. Signed-off-by: Thomas Zimmermann Reviewed-by: Gerd Hoffmann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 6 +++--- drivers/gpu/drm/mgag200/mgag200_reg.h | 2 +- 2 files changed, 4 insertions(+), 4 delet

[RFC PATCH 0/4] drm/mgag200: Use DMA to copy the framebuffer to the VRAM

2023-05-05 Thread Jocelyn Falempe
gpu/drm/mgag200/mgag200_reg.h | 30 ++- 6 files changed, 362 insertions(+), 56 deletions(-) Signed-off-by: Jocelyn Falempe base-commit: 457391b0380335d5 (tag: v6.3)

[PATCH 4/4] drm/mgag200: Use DMA to copy the framebuffer to the VRAM

2023-05-05 Thread Jocelyn Falempe
make sure, the DMA transfer is a multiple of 32bits. The padded bytes won't be drawn on the screen, so they don't need to be initialized. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/Makefile | 3 +- drivers/gpu/drm/mgag200/mgag200_dma.c | 114

[PATCH 3/4] drm/mgag200: Add IRQ support

2023-05-05 Thread Jocelyn Falempe
Register irq, and enable the softrap irq. This patch has no functional impact since softrap irq can't be triggered without DMA. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_drv.c | 41 +++ drivers/gpu/drm/mgag200/mgag200_drv.h | 3 ++ driver

[RFC PATCH 0/2] drm/mgag200: Use 24bit format in VRAM

2023-04-12 Thread Jocelyn Falempe
The bandwidth between system memory and VRAM is very limited on G200. So when using a 32bit framebuffer on system memory, convert it to 24bit when copying the frame to the VRAM, this allows to go 33% faster. Converting the format on the fly is negligible, even on low end CPU. [PATCH 1/2] drm/mgag2

[PATCH 1/2] drm/mgag200: simplify offset and scale computation.

2023-04-12 Thread Jocelyn Falempe
3 / 16 => pitch / 16 32bit: (bppshift = 2) offset = width >> (4 - bppshift) => width / 4 => pitch / 16 scale: 16bit: scale = (1 << bppshift) - 1 => 1 24bit: scale = ((1 << bppshift) * 3) - 1 => 2 32bit: scale = (1 << bppshift) - 1 => 3 Signed-off-by: Jo

[PATCH 2/2] drm/mgag200: Use 24bit format in VRAM

2023-04-12 Thread Jocelyn Falempe
my Dell T310: 1280x1024 32bits: ~125ms to transfert a single frame. 1280x1024 24bits: ~95ms Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_mode.c | 28 -- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mgag200

Re: [PATCH 2/2] drm/mgag200: Use 24bit format in VRAM

2023-04-12 Thread Jocelyn Falempe
On 12/04/2023 17:13, Javier Martinez Canillas wrote: Jocelyn Falempe writes: The bandwidth between system memory and VRAM is very limited on G200. So when using a 32bit framebuffer on system memory, convert it to 24bit when copying the frame to the VRAM, this allows to go 33% faster

Re: [RFC PATCH 0/2] drm/mgag200: Use 24bit format in VRAM

2023-04-14 Thread Jocelyn Falempe
On 13/04/2023 21:29, Thomas Zimmermann wrote: Hi Am 12.04.23 um 15:39 schrieb Jocelyn Falempe: The bandwidth between system memory and VRAM is very limited on G200. So when using a 32bit framebuffer on system memory, convert it to 24bit when copying the frame to the VRAM, this allows to go 33

Re: [PATCH v2 4/4] drm/mgag200: Use DMA to copy the framebuffer to the VRAM

2023-06-15 Thread Jocelyn Falempe
On 15/06/2023 16:24, Thomas Zimmermann wrote: Hi Jocelyn Am 31.05.23 um 11:21 schrieb Jocelyn Falempe: Even if the transfer is not faster, it brings significant improvement in latencies and CPU usage. CPU usage drops from 100% of one core to 3% when continuously refreshing the screen. I

  1   2   3   4   5   6   7   8   9   10   >