mbox series

[0/8] drm/ast: Untangle the chaos in mode setting

Message ID 20240627153638.8765-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series drm/ast: Untangle the chaos in mode setting | expand

Message

Thomas Zimmermann June 27, 2024, 3:27 p.m. UTC
The CRTC's mode-setting code contains quite a bit of code that
belongs to the planes or various encoder chips. This patchset
refactors these bits and moves things to the correct places.

With the patches applied, the remaining DPMS function will be
gone and its content be moved. Several code duplications will
be removed. There was also a bugfix wrt the VGA SCREEN_DISABLE
bit, but it's unclear if the bug had any effect in practice.

Tested with AST2100 and AST2600 with VGA and DP outputs.

Thomas Zimmermann (8):
  drm/ast: Implement atomic enable/disable for encoders
  drm/ast: Program mode for AST DP in atomic_mode_set
  drm/ast: Move mode-setting code into mode_set_nofb CRTC helper
  drm/ast: Handle primary-plane format setup in atomic_update
  drm/ast: Remove gamma LUT updates from DPMS code
  drm/ast: Only set VGA SCREEN_DISABLE bit in CRTC code
  drm/ast: Inline ast_crtc_dpms() into callers
  drm/ast: Use drm_atomic_helper_commit_tail() helper

 drivers/gpu/drm/ast/ast_mode.c | 204 ++++++++++++++++++---------------
 drivers/gpu/drm/ast/ast_reg.h  |  10 +-
 2 files changed, 112 insertions(+), 102 deletions(-)

Comments

Jocelyn Falempe June 28, 2024, 10:09 a.m. UTC | #1
On 27/06/2024 17:27, Thomas Zimmermann wrote:
> The CRTC's mode-setting code contains quite a bit of code that
> belongs to the planes or various encoder chips. This patchset
> refactors these bits and moves things to the correct places.
> 
> With the patches applied, the remaining DPMS function will be
> gone and its content be moved. Several code duplications will
> be removed. There was also a bugfix wrt the VGA SCREEN_DISABLE
> bit, but it's unclear if the bug had any effect in practice.
> 
> Tested with AST2100 and AST2600 with VGA and DP outputs.

Thanks,

I've tested the patch series, on a remote ampere (aarch64) system with 
AST 2500, and it works. I wasn't able to test with a real monitor attached.
Thomas Zimmermann June 28, 2024, 10:54 a.m. UTC | #2
Hi

Am 28.06.24 um 12:09 schrieb Jocelyn Falempe:
>
>
> On 27/06/2024 17:27, Thomas Zimmermann wrote:
>> The CRTC's mode-setting code contains quite a bit of code that
>> belongs to the planes or various encoder chips. This patchset
>> refactors these bits and moves things to the correct places.
>>
>> With the patches applied, the remaining DPMS function will be
>> gone and its content be moved. Several code duplications will
>> be removed. There was also a bugfix wrt the VGA SCREEN_DISABLE
>> bit, but it's unclear if the bug had any effect in practice.
>>
>> Tested with AST2100 and AST2600 with VGA and DP outputs.
>
> Thanks,
>
> I've tested the patch series, on a remote ampere (aarch64) system with 
> AST 2500, and it works. I wasn't able to test with a real monitor 
> attached.

Ok, so the BMC also still works. Thanks for reviewing and testing.

I've long wanted to clean up this code. Earlier his week I got a monitor 
working on the AST2600's DP port. So I could finally test these 
refactorings. With this in place, there's more to come to improve the 
driver's output code.

Best regards
Thomas