]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/udl: Add register constants for video locks
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 6 Oct 2022 09:53:53 +0000 (11:53 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 7 Oct 2022 11:47:18 +0000 (13:47 +0200)
Add register constants for the video lock. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221006095355.23579-15-tzimmermann@suse.de
drivers/gpu/drm/udl/udl_modeset.c
drivers/gpu/drm/udl/udl_proto.h

index f8562d46b707c04094545b313cf4f72ed06b241d..ea0388ccbd7e974298ec7fef233191629a6fa065 100644 (file)
@@ -41,12 +41,12 @@ static char *udl_set_register(char *buf, u8 reg, u8 val)
 
 static char *udl_vidreg_lock(char *buf)
 {
-       return udl_set_register(buf, 0xFF, 0x00);
+       return udl_set_register(buf, UDL_REG_VIDREG, UDL_VIDREG_LOCK);
 }
 
 static char *udl_vidreg_unlock(char *buf)
 {
-       return udl_set_register(buf, 0xFF, 0xFF);
+       return udl_set_register(buf, UDL_REG_VIDREG, UDL_VIDREG_UNLOCK);
 }
 
 static char *udl_set_blank_mode(char *buf, u8 mode)
index 22bc1ae8420cbe02ca0089b5513b678b8ae7073b..8e7d1a0906449783446363e2d011a14262bbd1bb 100644 (file)
@@ -31,4 +31,9 @@
 #define UDL_BLANKMODE_HSYNC_OFF                0x05 /* hsync off, blanked */
 #define UDL_BLANKMODE_POWERDOWN                0x07 /* powered off; requires modeset */
 
+/* Lock/unlock video registers */
+#define UDL_REG_VIDREG                 0xff
+#define UDL_VIDREG_LOCK                        0x00
+#define UDL_VIDREG_UNLOCK              0xff
+
 #endif