mbox series

[0/7] drm/mgag200: Inline prepare/commit helpers

Message ID 20200707082411.6583-1-tzimmermann@suse.de (mailing list archive)
Headers show
Series drm/mgag200: Inline prepare/commit helpers | expand

Message

Thomas Zimmermann July 7, 2020, 8:24 a.m. UTC
Mgag200's modesetting still utilizes the prepare and commit functions
that were part of the non-atomic interface. This patchset integrates
them into the simple-display's enable function.

Patch 1 disables CRTC write protection once when initializing the
registers. Before, CRTC registers were temporarily write-protected for
no apparent reason.

The screen is toggled on and off multiple times while setting a mode.
Patch 3 removes any intermediate screen on/off changes.

In patch 4, DPMS functionality is reduced to on an off. The DPMS helper
function implemements on, off, suspend and standby. In atomic modesetting,
only on and off is required.

Tested on G200SE HW with Xorg, Weston and fbdev.

Thomas Zimmermann (7):
  drm/mgag200: Don't write-protect CRTC 0-7 while in mga_crtc_prepare()
  drm/mgag200: Move PLL setup out of mode-setting function
  drm/mgag200: Don't set or clear <scroff> field during modeset
  drm/mgag200: Split DPMS function into helpers
  drm/mgag200: Set/clear <syncrst> field in display enable/disable
    helpers
  drm/mgag200: Rename G200WB prepare/commit function
  drm/mgag200: Inline mga_crtc_{prepare,commit}() into enable function

 drivers/gpu/drm/mgag200/mgag200_drv.h  |   6 +
 drivers/gpu/drm/mgag200/mgag200_mode.c | 168 +++++++++----------------
 drivers/gpu/drm/mgag200/mgag200_reg.h  |  11 ++
 3 files changed, 76 insertions(+), 109 deletions(-)

--
2.27.0

Comments

Lyude Paul July 7, 2020, 4:40 p.m. UTC | #1
For context - I already reviewed this once, it just missed the dri-devel list by
accident

For the whole series:

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Tue, 2020-07-07 at 10:24 +0200, Thomas Zimmermann wrote:
> Mgag200's modesetting still utilizes the prepare and commit functions
> that were part of the non-atomic interface. This patchset integrates
> them into the simple-display's enable function.
> 
> Patch 1 disables CRTC write protection once when initializing the
> registers. Before, CRTC registers were temporarily write-protected for
> no apparent reason.
> 
> The screen is toggled on and off multiple times while setting a mode.
> Patch 3 removes any intermediate screen on/off changes.
> 
> In patch 4, DPMS functionality is reduced to on an off. The DPMS helper
> function implemements on, off, suspend and standby. In atomic modesetting,
> only on and off is required.
> 
> Tested on G200SE HW with Xorg, Weston and fbdev.
> 
> Thomas Zimmermann (7):
>   drm/mgag200: Don't write-protect CRTC 0-7 while in mga_crtc_prepare()
>   drm/mgag200: Move PLL setup out of mode-setting function
>   drm/mgag200: Don't set or clear <scroff> field during modeset
>   drm/mgag200: Split DPMS function into helpers
>   drm/mgag200: Set/clear <syncrst> field in display enable/disable
>     helpers
>   drm/mgag200: Rename G200WB prepare/commit function
>   drm/mgag200: Inline mga_crtc_{prepare,commit}() into enable function
> 
>  drivers/gpu/drm/mgag200/mgag200_drv.h  |   6 +
>  drivers/gpu/drm/mgag200/mgag200_mode.c | 168 +++++++++----------------
>  drivers/gpu/drm/mgag200/mgag200_reg.h  |  11 ++
>  3 files changed, 76 insertions(+), 109 deletions(-)
> 
> --
> 2.27.0
>
Thomas Zimmermann July 14, 2020, 9:02 a.m. UTC | #2
Hi

Am 07.07.20 um 18:40 schrieb Lyude Paul:
> For context - I already reviewed this once, it just missed the dri-devel list by
> accident
> 
> For the whole series:
> 
> Reviewed-by: Lyude Paul <lyude@redhat.com>

I pushed the patches into drm-misc-next and also added a comment in the
commit message on the busy-waiting thing you asked about.

Best regards
Thomas

> 
> On Tue, 2020-07-07 at 10:24 +0200, Thomas Zimmermann wrote:
>> Mgag200's modesetting still utilizes the prepare and commit functions
>> that were part of the non-atomic interface. This patchset integrates
>> them into the simple-display's enable function.
>>
>> Patch 1 disables CRTC write protection once when initializing the
>> registers. Before, CRTC registers were temporarily write-protected for
>> no apparent reason.
>>
>> The screen is toggled on and off multiple times while setting a mode.
>> Patch 3 removes any intermediate screen on/off changes.
>>
>> In patch 4, DPMS functionality is reduced to on an off. The DPMS helper
>> function implemements on, off, suspend and standby. In atomic modesetting,
>> only on and off is required.
>>
>> Tested on G200SE HW with Xorg, Weston and fbdev.
>>
>> Thomas Zimmermann (7):
>>   drm/mgag200: Don't write-protect CRTC 0-7 while in mga_crtc_prepare()
>>   drm/mgag200: Move PLL setup out of mode-setting function
>>   drm/mgag200: Don't set or clear <scroff> field during modeset
>>   drm/mgag200: Split DPMS function into helpers
>>   drm/mgag200: Set/clear <syncrst> field in display enable/disable
>>     helpers
>>   drm/mgag200: Rename G200WB prepare/commit function
>>   drm/mgag200: Inline mga_crtc_{prepare,commit}() into enable function
>>
>>  drivers/gpu/drm/mgag200/mgag200_drv.h  |   6 +
>>  drivers/gpu/drm/mgag200/mgag200_mode.c | 168 +++++++++----------------
>>  drivers/gpu/drm/mgag200/mgag200_reg.h  |  11 ++
>>  3 files changed, 76 insertions(+), 109 deletions(-)
>>
>> --
>> 2.27.0
>>
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>