drm/mgag200: Don't set <rammapen> in MISC
Subsystems (3)
Thomas Zimmermann
maintainerPATCH 1/1 drm/mgag200: Don't set <rammapen> in MISC
The original modesetting code set MISC to 0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>
With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in mga_crtc_set_plls(), sync flags are set in mgag200_set_mode_regs().
While at it, also rename the flag constant to match the nameing in the MGA Programming Manual.
--- drivers/gpu/drm/mgag200/mgag200_mode.c | 6 ++---- drivers/gpu/drm/mgag200/mgag200_reg.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/mgag200/mgag200_mode.c +2 -4
@@ -1018,10 +1018,8 @@ static void mgag200_init_regs(struct mga_device *mdev)if (mdev->type ==G200_EW3 )WREG_ECRT (0x34 ,0x5 ); - misc =RREG8 (MGA_MISC_IN ); - misc |=MGAREG_MISC_IOADSEL | -MGAREG_MISC_RAMMAPEN | -MGAREG_MISC_HIGH_PG_SEL ; + misc =MGAREG_MISC_HPGODDEV | +MGAREG_MISC_IOADSEL ;WREG8 (MGA_MISC_OUT , misc); }
drivers/gpu/drm/mgag200/mgag200_reg.h +1 -1
@@ -228,7 +228,7 @@#define MGAREG_MISC_CLK_SEL_MGA_PIX (0x2 << 2)#define MGAREG_MISC_CLK_SEL_MGA_MSK (0x3 << 2)#define MGAREG_MISC_VIDEO_DIS (0x1 << 4) -#define MGAREG_MISC_HIGH_PG_SEL (0x1 << 5) +#define MGAREG_MISC_HPGODDEV BIT(5)#define MGAREG_MISC_HSYNCPOL BIT(6)#define MGAREG_MISC_VSYNCPOL BIT(7)
Signature · 6 lines
2.27.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Thomas,
Quoted 9 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerHi Emil
Am 16.06.20 um 17:14 schrieb Emil Velikov:
Quoted 13 lines
Hi Thomas,
Quoted 9 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().
Quoted 3 lines
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
I'm waiting for Rong Chen's performance results on this patch. Moving the rename into a separate patch makes sense, but removing the read is part of restoring the original behavior. I think it should be in this patch. Maybe I can write a better commit message to highlight the change.
Best regards
Thomas
Quoted 8 lines
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 16 lines · Thomas Zimmermann
Hi Emil
Am 16.06.20 um 17:14 schrieb Emil Velikov:
Quoted 13 lines
Hi Thomas,
Quoted 9 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().
Quoted 9 lines
Quoted 3 lines
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
I'm waiting for Rong Chen's performance results on this patch. Moving the rename into a separate patch makes sense, but removing the read is part of restoring the original behavior. I think it should be in this patch. Maybe I can write a better commit message to highlight the change.
Hi Thomas,
I tested the patch based on previous patch series, it seems doesn't take effect, and commit 39fb72816c4ee brings a larger regression when comparing to commit caac4dda44f37:
4606edf870927 drm/mgag200: Don't set <rammapen> in MISC 3 3 3 39fb72816c4ee drm/mgag200: Replace VRAM helpers with SHMEM helpers 3 22 caac4dda44f37 drm/mgag200: Convert to simple KMS helper 238 233 240 234 239 4b11c90431108 drm/mgag200: Use simple-display data structures 35 34 34 34 db22c903c9322 drm/mgag200: Remove out-commented suspend/resume helpers 34 34 87d4880d2aeb5 drm/mgag200: Move register initialization into separate function 35 0c51726f95396 drm/mgag200: Move hiprilvl setting into separate functions 35 8078e8b182e73 drm/mgag200: Set primary plane's format in separate helper function 35 19f7b409d95b7 drm/mgag200: Set pitch in a separate helper function 35 34 9b9a363828c60 drm/mgag200: Update mode registers after plane registers 34 e44e907dd8f93 drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O 34 34 34 34 bef2303526adb drm/mgag200: Move mode-setting code into separate helper function 97 97 5cd8460e81e8f drm/mgag200: Clean up mga_crtc_do_set_base() 96
0671ca8c559ba drm/mgag200: Clean up mga_set_start_address()e82c8969a2474 drm/mgag200: Remove HW cursor 96
Best Regards,
Rong Chen
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerHi
Am 17.06.20 um 11:22 schrieb Rong Chen:
Quoted 27 lines · Thomas Zimmermann
Quoted 16 lines
Hi Emil
Am 16.06.20 um 17:14 schrieb Emil Velikov:
Quoted 13 lines
Hi Thomas,
Quoted 9 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().Quoted 9 lines
Quoted 3 lines
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
I'm waiting for Rong Chen's performance results on this patch. Moving the rename into a separate patch makes sense, but removing the read is part of restoring the original behavior. I think it should be in this patch. Maybe I can write a better commit message to highlight the change.
Quoted 5 lines
Hi Thomas,
I tested the patch based on previous patch series, it seems doesn't take effect, and commit
39fb72816c4eebrings a larger regression when comparing to commitcaac4dda44f37:
Thanks for testing!
I still don't understand these numbers, but are you sure that e44e907dd8f93 is really the regression?
It would make sense that 39fb72816c4ee has an impact on performance, as it changes memory management and the way the driver updates the display. I'll take a closer look at that patch and maybe send out an update.
Best regards
Thomas
Quoted 20 lines
4606edf870927 drm/mgag200: Don't set <rammapen> in MISC 3 3 3 39fb72816c4ee drm/mgag200: Replace VRAM helpers with SHMEM helpers 3 22 caac4dda44f37 drm/mgag200: Convert to simple KMS helper 238 233 240 234 239 4b11c90431108 drm/mgag200: Use simple-display data structures 35 34 34 34 db22c903c9322 drm/mgag200: Remove out-commented suspend/resume helpers 34 34 87d4880d2aeb5 drm/mgag200: Move register initialization into separate function 35 0c51726f95396 drm/mgag200: Move hiprilvl setting into separate functions 35 8078e8b182e73 drm/mgag200: Set primary plane's format in separate helper function 35 19f7b409d95b7 drm/mgag200: Set pitch in a separate helper function 35 34 9b9a363828c60 drm/mgag200: Update mode registers after plane registers 34 e44e907dd8f93 drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O 34 34 34 34 bef2303526adb drm/mgag200: Move mode-setting code into separate helper function 97 97 5cd8460e81e8f drm/mgag200: Clean up mga_crtc_do_set_base() 96
0671ca8c559badrm/mgag200: Clean upmga_set_start_address()e82c8969a2474drm/mgag200: Remove HW cursor 96Best Regards,
Rong Chen
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 28 lines · Thomas Zimmermann
Hi
Am 17.06.20 um 11:22 schrieb Rong Chen:
Quoted 25 lines · Thomas Zimmermann
Quoted 14 lines
Hi Emil
Am 16.06.20 um 17:14 schrieb Emil Velikov:
Quoted 11 lines
Hi Thomas,
Quoted 8 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().Quoted 8 lines
Quoted 3 lines
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
I'm waiting for Rong Chen's performance results on this patch. Moving the rename into a separate patch makes sense, but removing the read is part of restoring the original behavior. I think it should be in this patch. Maybe I can write a better commit message to highlight the change.
Hi Thomas,
Quoted 7 lines
Quoted 3 lines
I tested the patch based on previous patch series, it seems doesn't take effect, and commit
39fb72816c4eebrings a larger regression when comparing to commitcaac4dda44f37:Thanks for testing!
I still don't understand these numbers, but are you sure that
e44e907dd8f93is really the regression?
Yes, it's a regression too, according to the previous report https://www.spinics.net/lists/dri-devel/msg260034.html
the bot bisected to commit e44e907dd8f93 which let the glmark2.800x600.score reduced by 64.9%, but the bot doesn't notice the improvement of commit caac4dda44f37, and commit 39fb72816c4ee causes another regression.
Best Regards,
Rong Chen
Quoted 27 lines
It would make sense that
39fb72816c4eehas an impact on performance, as it changes memory management and the way the driver updates the display. I'll take a closer look at that patch and maybe send out an update.Best regards
ThomasQuoted 19 lines
4606edf870927 drm/mgag200: Don't set <rammapen> in MISC 3 3 3 39fb72816c4ee drm/mgag200: Replace VRAM helpers with SHMEM helpers 3 22 caac4dda44f37 drm/mgag200: Convert to simple KMS helper 238 233 240 234 239 4b11c90431108 drm/mgag200: Use simple-display data structures 35 34 34 34 db22c903c9322 drm/mgag200: Remove out-commented suspend/resume helpers 34 34 87d4880d2aeb5 drm/mgag200: Move register initialization into separate function 35 0c51726f95396 drm/mgag200: Move hiprilvl setting into separate functions 35 8078e8b182e73 drm/mgag200: Set primary plane's format in separate helper function 35 19f7b409d95b7 drm/mgag200: Set pitch in a separate helper function 35 34 9b9a363828c60 drm/mgag200: Update mode registers after plane registers 34 e44e907dd8f93 drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O 34 34 34 34 bef2303526adb drm/mgag200: Move mode-setting code into separate helper function 97 97 5cd8460e81e8f drm/mgag200: Clean up mga_crtc_do_set_base() 96
0671ca8c559badrm/mgag200: Clean upmga_set_start_address()e82c8969a2474drm/mgag200: Remove HW cursor 96Best Regards,
Rong Chen
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Thomas Zimmermann
maintainerHi
Am 18.06.20 um 03:40 schrieb Rong Chen:
Quoted 42 lines · Thomas Zimmermann
Quoted 31 lines
Hi
Am 17.06.20 um 11:22 schrieb Rong Chen:
Quoted 28 lines · Thomas Zimmermann
Quoted 16 lines
Hi Emil
Am 16.06.20 um 17:14 schrieb Emil Velikov:
Quoted 13 lines
Hi Thomas,
Quoted 9 lines · Thomas Zimmermann
The original modesetting code set MISC to
0x2d, which is <hpgoddev>, <clksel> and <ioaddsel>With the conversion to atomic modesetting, <rammapen> accidentally got enabled as well. Revert this change and initialize MISC with a constant value of <hgoddev> and <ioaddsel>. The <clksel> bits are set in
mga_crtc_set_plls(), sync flags are set inmgag200_set_mode_regs().Quoted 9 lines
Quoted 3 lines
Let's keep the remove (restoring original functionality) and rename (cosmetics) separate patches. The read has also disappeared, which should be safe although might be better on it's own.
I'm waiting for Rong Chen's performance results on this patch. Moving the rename into a separate patch makes sense, but removing the read is part of restoring the original behavior. I think it should be in this patch. Maybe I can write a better commit message to highlight the change.
Hi Thomas,
Quoted 7 lines
Quoted 3 lines
I tested the patch based on previous patch series, it seems doesn't take effect, and commit
39fb72816c4eebrings a larger regression when comparing to commitcaac4dda44f37:Thanks for testing!
I still don't understand these numbers, but are you sure that
e44e907dd8f93is really the regression?
Quoted 7 lines
Yes, it's a regression too, according to the previous report
https://www.spinics.net/lists/dri-devel/msg260034.html
the bot bisected to commite44e907dd8f93which let the glmark2.800x600.score reduced by 64.9%,
but the bot doesn't notice the improvement of commitcaac4dda44f37, and commit39fb72816c4ee
causes another regression.
I sent out a patch for 39fb72816c4ee. It enables caching on the framebuffer's pages.
Best regards
Thomas
Quoted 46 lines
Best Regards,
Rong ChenQuoted 41 lines
It would make sense that
39fb72816c4eehas an impact on performance, as it changes memory management and the way the driver updates the display. I'll take a closer look at that patch and maybe send out an update.Best regards
ThomasQuoted 33 lines
4606edf870927drm/mgag200: Don't set <rammapen> in
MISC 3 3 339fb72816c4eedrm/mgag200: Replace VRAM helpers with SHMEM helpers 3 22caac4dda44f37drm/mgag200: Convert to simple KMS
helper 238 233 240 234 2394b11c90431108drm/mgag200: Use simple-display data structures 35 34 34 34db22c903c9322drm/mgag200: Remove out-commented suspend/resume helpers 34 3487d4880d2aeb5drm/mgag200: Move register initialization into separate function 350c51726f95396drm/mgag200: Move hiprilvl setting into separate functions 358078e8b182e73drm/mgag200: Set primary plane's format in separate helper function 3519f7b409d95b7drm/mgag200: Set pitch in a separate helper function 35 349b9a363828c60drm/mgag200: Update mode registers after plane registers 34e44e907dd8f93drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O 34 34 34 34bef2303526adbdrm/mgag200: Move mode-setting code into separate helper function 97 975cd8460e81e8fdrm/mgag200: Clean up
mga_crtc_do_set_base() 960671ca8c559badrm/mgag200: Clean upmga_set_start_address()e82c8969a2474drm/mgag200: Remove HW
cursor 96Best Regards,
Rong Chen
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 2 lines · Thomas Zimmermann
Maybe I can write a better commit message to highlight the change.
That would be amazing, thank you.
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel