imx-drm: encoder prepare/mode_set must use adjusted mode
The encoder ->prepare() and ->mode_set() methods need to use the hw adjusted mode, not the original mode. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
0c460a55dd
commit
eb10d63555
|
@ -1341,8 +1341,8 @@ static void dw_hdmi_poweroff(struct dw_hdmi *hdmi)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
|
static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *orig_mode,
|
||||||
struct drm_display_mode *adjusted_mode)
|
struct drm_display_mode *mode)
|
||||||
{
|
{
|
||||||
struct dw_hdmi *hdmi = bridge->driver_private;
|
struct dw_hdmi *hdmi = bridge->driver_private;
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder)
|
||||||
{
|
{
|
||||||
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
|
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
|
||||||
struct imx_ldb *ldb = imx_ldb_ch->ldb;
|
struct imx_ldb *ldb = imx_ldb_ch->ldb;
|
||||||
struct drm_display_mode *mode = &encoder->crtc->mode;
|
struct drm_display_mode *mode = &encoder->crtc->hwmode;
|
||||||
u32 pixel_fmt;
|
u32 pixel_fmt;
|
||||||
unsigned long serial_clk;
|
unsigned long serial_clk;
|
||||||
unsigned long di_clk = mode->clock * 1000;
|
unsigned long di_clk = mode->clock * 1000;
|
||||||
|
@ -241,8 +241,8 @@ static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void imx_ldb_encoder_mode_set(struct drm_encoder *encoder,
|
static void imx_ldb_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *orig_mode,
|
||||||
struct drm_display_mode *adjusted_mode)
|
struct drm_display_mode *mode)
|
||||||
{
|
{
|
||||||
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
|
struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
|
||||||
struct imx_ldb *ldb = imx_ldb_ch->ldb;
|
struct imx_ldb *ldb = imx_ldb_ch->ldb;
|
||||||
|
|
|
@ -307,8 +307,8 @@ static void imx_tve_encoder_prepare(struct drm_encoder *encoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void imx_tve_encoder_mode_set(struct drm_encoder *encoder,
|
static void imx_tve_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *orig_mode,
|
||||||
struct drm_display_mode *adjusted_mode)
|
struct drm_display_mode *mode)
|
||||||
{
|
{
|
||||||
struct imx_tve *tve = enc_to_tve(encoder);
|
struct imx_tve *tve = enc_to_tve(encoder);
|
||||||
unsigned long rounded_rate;
|
unsigned long rounded_rate;
|
||||||
|
|
|
@ -130,8 +130,8 @@ static void imx_pd_encoder_commit(struct drm_encoder *encoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
|
static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *orig_mode,
|
||||||
struct drm_display_mode *adjusted_mode)
|
struct drm_display_mode *mode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue