]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/ast: Only warn about unsupported TX chips on Gen4 and later
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 17 Jan 2025 10:29:13 +0000 (11:29 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 22 Jan 2025 12:52:51 +0000 (13:52 +0100)
Only Gen4 and later read the installed TX chip from the SoC. So only
warn on those generations about unsupported chips.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250117103450.28692-9-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_main.c

index b0d1b99ed532b2bd4dc9556e284102c5e210a763..ba69280b33e783db8205036ac88cf06e541c258c 100644 (file)
@@ -78,21 +78,6 @@ static void ast_detect_tx_chip(struct ast_device *ast, bool need_post)
        struct drm_device *dev = &ast->base;
        u8 vgacra3, vgacrd1;
 
-       /*
-        * Several of the listed TX chips are not explicitly supported
-        * by the ast driver. If these exist in real-world devices, they
-        * are most likely reported as VGA or SIL164 outputs. We warn here
-        * to get bug reports for these devices. If none come in for some
-        * time, we can begin to fail device probing on these values.
-        */
-       vgacrd1 = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xd1, AST_IO_VGACRD1_TX_TYPE_MASK);
-       drm_WARN(dev, vgacrd1 == AST_IO_VGACRD1_TX_ITE66121_VBIOS,
-                "ITE IT66121 detected, 0x%x, Gen%lu\n", vgacrd1, AST_GEN(ast));
-       drm_WARN(dev, vgacrd1 == AST_IO_VGACRD1_TX_CH7003_VBIOS,
-                "Chrontel CH7003 detected, 0x%x, Gen%lu\n", vgacrd1, AST_GEN(ast));
-       drm_WARN(dev, vgacrd1 == AST_IO_VGACRD1_TX_ANX9807_VBIOS,
-                "Analogix ANX9807 detected, 0x%x, Gen%lu\n", vgacrd1, AST_GEN(ast));
-
        /* Check 3rd Tx option (digital output afaik) */
        ast->tx_chip = AST_TX_NONE;
 
@@ -116,9 +101,9 @@ static void ast_detect_tx_chip(struct ast_device *ast, bool need_post)
                 * the SOC scratch register #1 bits 11:8 (interestingly marked
                 * as "reserved" in the spec)
                 */
-               jreg = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xd1,
-                                             AST_IO_VGACRD1_TX_TYPE_MASK);
-               switch (jreg) {
+               vgacrd1 = ast_get_index_reg_mask(ast, AST_IO_VGACRI, 0xd1,
+                                                AST_IO_VGACRD1_TX_TYPE_MASK);
+               switch (vgacrd1) {
                /*
                 * GEN4 to GEN6
                 */
@@ -144,6 +129,25 @@ static void ast_detect_tx_chip(struct ast_device *ast, bool need_post)
                case AST_IO_VGACRD1_TX_ASTDP:
                        ast->tx_chip = AST_TX_ASTDP;
                        break;
+               /*
+                * Several of the listed TX chips are not explicitly supported
+                * by the ast driver. If these exist in real-world devices, they
+                * are most likely reported as VGA or SIL164 outputs. We warn here
+                * to get bug reports for these devices. If none come in for some
+                * time, we can begin to fail device probing on these values.
+                */
+               case AST_IO_VGACRD1_TX_ITE66121_VBIOS:
+                       drm_warn(dev, "ITE IT66121 detected, 0x%x, Gen%lu\n",
+                                vgacrd1, AST_GEN(ast));
+                       break;
+               case AST_IO_VGACRD1_TX_CH7003_VBIOS:
+                       drm_warn(dev, "Chrontel CH7003 detected, 0x%x, Gen%lu\n",
+                                vgacrd1, AST_GEN(ast));
+                       break;
+               case AST_IO_VGACRD1_TX_ANX9807_VBIOS:
+                       drm_warn(dev, "Analogix ANX9807 detected, 0x%x, Gen%lu\n",
+                                vgacrd1, AST_GEN(ast));
+                       break;
                }
        }