Re: [PATCH] drm: dsi: Add lane clock rate fields to DSI device

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

 



On 17.10.2018 16:04, Linus Walleij wrote:
> The DSI devices have a maximum operating frequency specified
> in their data sheet per the MIPI specification, and DSI hosts
> that can scale their frequency need this information to set
> their clock dividers right.
>
> As current panel drivers often lack this information, specify
> that setting it to zero will make the DSI host use some
> reasonable default.
>
> Cc: Andrzej Hajda <a.hajda@xxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
>  include/drm/drm_mipi_dsi.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index 4fef19064b0f..a57105776e08 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -168,6 +168,10 @@ struct mipi_dsi_device_info {
>   * @format: pixel format for video mode
>   * @lanes: number of active data lanes
>   * @mode_flags: DSI operation mode related flags
> + * @hs_rate_hz: Maximum lane frequency for high speed operation, if zero
> + * the driver can assume some safe default
> + * @lp_rate_hz: Maximum lane frequency for low power operation, if zero
> + * the driver can assume some safe default

I think it would be enough to describe which units are used, putting
them in prop name seems to be overkill.

s/operation/mode/ - spec uses mode in context of HS/LP.

Regarding zero value - there is no such thing as safe default, all dsi
devices have some limit, there is no universal limit.
Currently decision what to do in case of zero is up to dsi master, but
after this patch will be settled down we can at least add some warning
in mipi_dsi_attach to report incomplete dsi device description, or
attachment can be even aborted.
So the description should be in style: drivers should set it to real
limits of the hardware, zero is accepted only to keep backward
compatibility.

Regards
Andrzej

>   */
>  struct mipi_dsi_device {
>  	struct mipi_dsi_host *host;
> @@ -178,6 +182,8 @@ struct mipi_dsi_device {
>  	unsigned int lanes;
>  	enum mipi_dsi_pixel_format format;
>  	unsigned long mode_flags;
> +	unsigned long hs_rate_hz;
> +	unsigned long lp_rate_hz;
>  };
>  
>  #define MIPI_DSI_MODULE_PREFIX "mipi-dsi:"


_______________________________________________
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