All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: javierm@redhat.com, airlied@redhat.com, sean@poorly.run, daniel@ffwll.ch
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH v2 13/16] drm/udl: Add register constants for color depth
Date: Thu,  6 Oct 2022 11:53:52 +0200	[thread overview]
Message-ID: <20221006095355.23579-14-tzimmermann@suse.de> (raw)
In-Reply-To: <20221006095355.23579-1-tzimmermann@suse.de>

Add the register constants for setting the color depth. The driver
only uses 16bpp. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
---
 drivers/gpu/drm/udl/udl_modeset.c | 2 +-
 drivers/gpu/drm/udl/udl_proto.h   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index 12385bcc71eb..f8562d46b707 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -56,7 +56,7 @@ static char *udl_set_blank_mode(char *buf, u8 mode)
 
 static char *udl_set_color_depth(char *buf, u8 selection)
 {
-	return udl_set_register(buf, 0x00, selection);
+	return udl_set_register(buf, UDL_REG_COLORDEPTH, selection);
 }
 
 static char *udl_set_base16bpp(char *wrptr, u32 base)
diff --git a/drivers/gpu/drm/udl/udl_proto.h b/drivers/gpu/drm/udl/udl_proto.h
index 5a6c960bd10d..22bc1ae8420c 100644
--- a/drivers/gpu/drm/udl/udl_proto.h
+++ b/drivers/gpu/drm/udl/udl_proto.h
@@ -3,7 +3,10 @@
 #ifndef UDL_PROTO_H
 #define UDL_PROTO_H
 
+/* Color depth */
+#define UDL_REG_COLORDEPTH		0x00
 #define UDL_COLORDEPTH_16BPP		0
+#define UDL_COLORDEPTH_24BPP		1
 
 /* Display-mode settings */
 #define UDL_REG_XDISPLAYSTART		0x01
-- 
2.37.3


  parent reply	other threads:[~2022-10-06  9:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  9:53 [PATCH v2 00/16] drm/udl: Better modesetting, hot-unplug, protocol Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 01/16] drm/udl: Rename struct udl_drm_connector to struct udl_connector Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 02/16] drm/udl: Test pixel limit in mode-config's mode-valid function Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 03/16] drm/udl: Use USB timeout constant when reading EDID Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 04/16] drm/udl: Various improvements to the connector Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 05/16] drm/udl: Move connector to modesetting code Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 06/16] drm/udl: Remove udl_simple_display_pipe_mode_valid() Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 07/16] drm/udl: Convert to atomic-modesetting helpers Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 08/16] drm/udl: Simplify modesetting in CRTC's enable function Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 09/16] drm/udl: Support DRM hot-unplugging Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 10/16] drm/udl: Use damage iterator Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 11/16] drm/udl: Move register constants to udl_proto.h Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 12/16] drm/udl: Add constants for display-mode registers Thomas Zimmermann
2022-10-06  9:53 ` Thomas Zimmermann [this message]
2022-10-06  9:53 ` [PATCH v2 14/16] drm/udl: Add register constants for video locks Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 15/16] drm/udl: Add register constants for framebuffer scanout addresses Thomas Zimmermann
2022-10-06  9:53 ` [PATCH v2 16/16] drm/udl: Add constants for commands Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221006095355.23579-14-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.