[PATCH] drm/mgag200: Increase bandwidth for G200se A rev1
Thomas Zimmermann
tzimmermann at suse.de
Mon Jul 24 18:57:31 UTC 2023
Am 24.07.23 um 20:48 schrieb Thomas Zimmermann:
> Hi Jocelyn
>
> Am 17.07.23 um 15:29 schrieb Jocelyn Falempe:
>> A G200SE_A rev 1 user reported that prior to v6.0, he was able to get
>> Xorg
>> working at 1440x900 at 60Hz. This somehow bypassed the bandwidth test in the
>> driver. After v6.0, and the driver refactor, it's no longer possible.
>
> I took that bandwidth number from the old source code at
>
>
> https://elixir.bootlin.com/linux/v5.19/source/drivers/gpu/drm/mgag200/mgag200_mode.c#L725
>
> From this code, I don't see how it skipped this test. Maybe the
> refactoring is incorrect.
There's a difference that might be worth investigating: if the unique
rev equals 0x00, the current code will use the settings for rev 1.
https://elixir.bootlin.com/linux/v6.4/source/drivers/gpu/drm/mgag200/mgag200_g200se.c#L514
Compare this to the old code, which would have taken the settings for
rev 3 and later:
https://elixir.bootlin.com/linux/v5.19/source/drivers/gpu/drm/mgag200/mgag200_mode.c#L719
Best regards
Thomas
>
> Do you have the opportunity to further debug this issue on the users
> machine? I'd be interested in the exact model and the unique_rev_id
> (you said A, rev1 ?) and if the early-out branches in
> mga_vga_calculate_mode_bandwidth() are being taken. Can you figure out
> how exactly the CPU moves through mga_vga_mode_valid().
>
> Best regards
> Thomas
>
>> So increase the bandwidth, as the hardware is able to do it.
>>
>> In mgag200_calculate_mode_bandwidth(), the bandwidth for 1440x900 at 60 is
>> 30318019, while 24400 * 1024 = 24985600 and 30100 * 1024 = 30822400.
>> Raising the bandwidth from 24400 to 30100 is enough to allow this mode.
>>
>> Reported-by: Roger Sewell <roger.sewell at cantab.net>
>> Tested-by: Roger Sewell <roger.sewell at cantab.net>
>> Signed-off-by: Jocelyn Falempe <jfalempe at redhat.com>
>> ---
>> drivers/gpu/drm/mgag200/mgag200_g200se.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/mgag200/mgag200_g200se.c
>> b/drivers/gpu/drm/mgag200/mgag200_g200se.c
>> index bd6e573c9a1a..3b49e30931e1 100644
>> --- a/drivers/gpu/drm/mgag200/mgag200_g200se.c
>> +++ b/drivers/gpu/drm/mgag200/mgag200_g200se.c
>> @@ -437,7 +437,7 @@ static int mgag200_g200se_pipeline_init(struct
>> mga_device *mdev)
>> */
>> static const struct mgag200_device_info
>> mgag200_g200se_a_01_device_info =
>> - MGAG200_DEVICE_INFO_INIT(1600, 1200, 24400, false, 0, 1, true);
>> + MGAG200_DEVICE_INFO_INIT(1600, 1200, 30100, false, 0, 1, true);
>> static const struct mgag200_device_info
>> mgag200_g200se_a_02_device_info =
>> MGAG200_DEVICE_INFO_INIT(1920, 1200, 30100, false, 0, 1, true);
>>
>> base-commit: c2268daa65fb415cfd463016ad54c20afef8f75e
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230724/7af1048c/attachment-0001.sig>
More information about the dri-devel
mailing list