Przeglądaj źródła

drm/bridge: cdns-mhdp: fix warnings when using DVI monitor

When using a DVI monitor via a DP-HDMI adapter, warnings about color
format and bpc are seen. These warnings are invalid, as with DVI, those
values do not exist in the EDID data.

Avoid the warnings by checking if the color_format and bpc fields are !=
0 before giving any warnings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Tomi Valkeinen 6 lat temu
rodzic
commit
3e4eca398e
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      drivers/gpu/drm/bridge/cdns-mhdp.c

+ 4 - 2
drivers/gpu/drm/bridge/cdns-mhdp.c

@@ -802,13 +802,15 @@ static int cdns_mhdp_get_modes(struct drm_connector *connector)
 	 * HACK: Warn about unsupported display formats until we deal
 	 *       with them correctly.
 	 */
-	if (!(connector->display_info.color_formats &
+	if (connector->display_info.color_formats &&
+	    !(connector->display_info.color_formats &
 	      mhdp->display_fmt.color_format))
 		dev_warn(mhdp->dev,
 			 "%s: No supported color_format found (0x%08x)\n",
 			__func__, connector->display_info.color_formats);
 
-	if (connector->display_info.bpc < mhdp->display_fmt.bpc)
+	if (connector->display_info.bpc &&
+	    connector->display_info.bpc < mhdp->display_fmt.bpc)
 		dev_warn(mhdp->dev, "%s: Display bpc only %d < %d\n",
 			 __func__, connector->display_info.bpc,
 			 mhdp->display_fmt.bpc);