Hi Am 09.12.19 um 15:35 schrieb Emil Velikov: > On Fri, 6 Dec 2019 at 12:47, Thomas Zimmermann <tzimmermann@xxxxxxx> wrote: >> >> DPMS functionality is only used by the CRTC's enable and disable >> functions. Inline the code. >> >> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> >> --- >> drivers/gpu/drm/udl/udl_modeset.c | 84 +++++++++++-------------------- >> 1 file changed, 30 insertions(+), 54 deletions(-) >> >> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c >> index 72884cbda131..4681446c2323 100644 >> --- a/drivers/gpu/drm/udl/udl_modeset.c >> +++ b/drivers/gpu/drm/udl/udl_modeset.c >> @@ -48,25 +48,9 @@ static char *udl_vidreg_unlock(char *buf) >> * 0x01 H and V sync off (screen blank but powered) >> * 0x07 DPMS powerdown (requires modeset to come back) >> */ >> -static char *udl_set_blank(char *buf, int dpms_mode) >> +static char *udl_set_blank_mode(char *buf, u8 mode) >> { >> - u8 reg; >> - switch (dpms_mode) { >> - case DRM_MODE_DPMS_OFF: >> - reg = 0x07; >> - break; >> - case DRM_MODE_DPMS_STANDBY: >> - reg = 0x05; >> - break; >> - case DRM_MODE_DPMS_SUSPEND: >> - reg = 0x01; >> - break; >> - case DRM_MODE_DPMS_ON: >> - reg = 0x00; >> - break; >> - } >> - > As a follow-up, please add/use symbolic names for the the four states. > Apart from the cosmetic aspect, this allows us to trivially change > from DPMS_OFF to DPMS_SUSPEND or DPMS_STANDBY at any random point. > > As-is the series is: > Reviewed-by: Emil Velikov <emil.l.velikov@xxxxxxxxx> Thanks. The symbolic names are trivial to add here. I'll put them into v3 of this patchset. Best regards Thomas > > Thanks > Emil > -- 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
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel