[bug report] drm: bridge: dw-hdmi: Switch to V4L bus format and encodings

Dan Carpenter dan.carpenter at oracle.com
Thu Apr 6 05:21:20 UTC 2017


Hello Neil Armstrong,

The patch def23aa7e982: "drm: bridge: dw-hdmi: Switch to V4L bus
format and encodings" from Apr 4, 2017, leads to the following static
checker warning:

	drivers/gpu/drm/bridge/synopsys/dw-hdmi.c:1670 dw_hdmi_setup()
	warn: always true condition '(hdmi->plat_data->input_bus_format >= 0) => (0-u64max >= 0)'

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
  1667          hdmi->hdmi_data.video_mode.mpixelrepetitionoutput = 0;
  1668          hdmi->hdmi_data.video_mode.mpixelrepetitioninput = 0;
  1669  
  1670          /* TOFIX: Get input format from plat data or fallback to RGB888 */
  1671          if (hdmi->plat_data->input_bus_format >= 0)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1672                  hdmi->hdmi_data.enc_in_bus_format =
  1673                          hdmi->plat_data->input_bus_format;
  1674          else
  1675                  hdmi->hdmi_data.enc_in_bus_format = MEDIA_BUS_FMT_RGB888_1X24;
  1676  
  1677          /* TOFIX: Get input encoding from plat data or fallback to none */
  1678          if (hdmi->plat_data->input_bus_encoding >= 0)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1679                  hdmi->hdmi_data.enc_in_encoding =
  1680                          hdmi->plat_data->input_bus_encoding;
  1681          else
  1682                  hdmi->hdmi_data.enc_in_encoding = V4L2_YCBCR_ENC_DEFAULT;
  1683  
  1684          /* TOFIX: Default to RGB888 output format */
  1685          hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24;


regards,
dan carpenter


More information about the dri-devel mailing list