Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1302414
| From | Mark yao <mark.yao@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7 3/5] drm: rockchip: Support Synopsys DW MIPI DSI |
| Date | 2016-01-06 07:40 +0100 |
| Message-ID | <qNPVf-5U1-3@gated-at.bofh.it> (permalink) |
| References | <qNNA6-4rM-13@gated-at.bofh.it> <qNNA8-4rM-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Chris
Looks good for me except some tiny issues.
On 2016年01月06日 12:03, Chris Zhong wrote:
> +struct dw_mipi_dsi {
> + struct drm_encoder encoder;
> + struct drm_connector connector;
> + struct mipi_dsi_host dsi_host;
> + struct drm_panel *panel;
> + struct device *dev;
> + struct regmap *grf_regmap;
> + void __iomem *base;
> +
> + struct clk *pllref_clk;
> + struct clk *pclk;
> +
> + unsigned int lane_mbps; /* per lane */
> + u32 channel;
> + u32 lanes;
> + u32 format;
> + u16 input_div;
> + u16 feedback_div;
> + struct drm_display_mode *mode;
> +
> + const struct dw_mipi_dsi_plat_data *pdata;
> +
remove this blank line.
> +};
> +
[...]
> +static void dw_mipi_dsi_encoder_mode_set(struct drm_encoder *encoder,
> + struct drm_display_mode *mode,
> + struct drm_display_mode *adjusted_mode)
> +{
> + struct dw_mipi_dsi *dsi = encoder_to_dsi(encoder);
> + int ret;
> +
> + dsi->mode = adjusted_mode;
> +
> + ret = dw_mipi_dsi_get_lane_bps(dsi);
> + if (ret < 0)
> + return;
> +
> + if (clk_prepare_enable(dsi->pclk)) {
> + dev_err(dsi->dev, "%s: Failed to enable pclk\n", __func__);
> + return;
> + }
> +
> + dw_mipi_dsi_init(dsi);
> + dw_mipi_dsi_dpi_config(dsi, mode);
> + dw_mipi_dsi_packet_handler_config(dsi);
> + dw_mipi_dsi_video_mode_config(dsi);
> + dw_mipi_dsi_video_packet_config(dsi, mode);
> + dw_mipi_dsi_command_mode_config(dsi);
> + dw_mipi_dsi_line_timer_config(dsi);
> + dw_mipi_dsi_vertical_timing_config(dsi);
> + dw_mipi_dsi_dphy_timing_config(dsi);
> + dw_mipi_dsi_dphy_interface_config(dsi);
> + dw_mipi_dsi_clear_err(dsi);
> + if (drm_panel_prepare(dsi->panel)) {
> + dev_err(dsi->dev, "failed to prepare panel\n");
Don't forget doing clk_disable_unprepare when run into error path.
> + return;
> + }
> + clk_disable_unprepare(dsi->pclk);
> +}
> +
--
Mark Yao
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v7 0/5] Add mipi dsi support for rk3288 Chris Zhong <zyw@rock-chips.com> - 2016-01-06 05:10 +0100
[PATCH v7 4/5] ARM: dts: rockchip: add rk3288 mipi_dsi nodes Chris Zhong <zyw@rock-chips.com> - 2016-01-06 05:10 +0100
[PATCH v7 3/5] drm: rockchip: Support Synopsys DW MIPI DSI Chris Zhong <zyw@rock-chips.com> - 2016-01-06 05:10 +0100
Re: [PATCH v7 3/5] drm: rockchip: Support Synopsys DW MIPI DSI Mark yao <mark.yao@rock-chips.com> - 2016-01-06 07:40 +0100
[PATCH v7.1 3/5] drm: rockchip: Support Synopsys DW MIPI DSI Chris Zhong <zyw@rock-chips.com> - 2016-01-06 08:20 +0100
[PATCH v7.2 3/5] drm: rockchip: Support Synopsys DW MIPI DSI Chris Zhong <zyw@rock-chips.com> - 2016-01-06 09:20 +0100
Re: [PATCH v7 0/5] Add mipi dsi support for rk3288 Mark yao <mark.yao@rock-chips.com> - 2016-01-06 09:40 +0100
csiph-web