[PATCH xserver 3/3] kdrive: Remove dead slots from KdCardFuncs
Eric Anholt
eric at anholt.net
Fri Mar 24 20:44:46 UTC 2017
Adam Jackson <ajax at redhat.com> writes:
> @@ -645,34 +614,7 @@ KdCloseScreen(ScreenPtr pScreen)
> static Bool
> KdSaveScreen(ScreenPtr pScreen, int on)
> {
> - KdScreenPriv(pScreen);
> - int dpmsState;
> -
> - if (!pScreenPriv->card->cfuncs->dpms)
> - return FALSE;
> -
> - dpmsState = pScreenPriv->dpmsState;
> - switch (on) {
> - case SCREEN_SAVER_OFF:
> - dpmsState = KD_DPMS_NORMAL;
> - break;
> - case SCREEN_SAVER_ON:
> - if (dpmsState == KD_DPMS_NORMAL)
> - dpmsState = KD_DPMS_NORMAL + 1;
> - break;
> - case SCREEN_SAVER_CYCLE:
> - if (dpmsState < KD_DPMS_MAX)
> - dpmsState++;
> - break;
> - case SCREEN_SAVER_FORCER:
> - break;
> - }
> - if (dpmsState != pScreenPriv->dpmsState) {
> - if (pScreenPriv->enabled)
> - (*pScreenPriv->card->cfuncs->dpms) (pScreen, dpmsState);
> - pScreenPriv->dpmsState = dpmsState;
> - }
> - return TRUE;
> + return FALSE;
> }
This is the only functional change I spotted: SaveScreen is now going to
return FALSE instead of TRUE. Given that we haven't actually blanked
the screen, this seems like an appropriate return value.
With a note in the commit message about this behavior change (or, even
better, if DPMS was pulled into a separate commit), the series will be:
Reviewed-by: Eric Anholt <eric at anholt.net>
While doing the meson stuff, I had the thought that we sure do have a
lot of probably-dead kdrive code left. Thanks for taking care of some
of it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170324/55d41e1c/attachment.sig>
More information about the xorg-devel
mailing list