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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/06/2017 07:21 AM, Dan Carpenter wrote:
> 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
> 

Thanks for the report, I'll post a fix for this.

This worked since 0 in enc_in_bus_format and enc_in_encoding were handled as RGB888 by default.

Neil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux