diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-05-31 08:03:15 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-06-01 00:59:39 -0400 |
commit | b201e743f42d143f4bcdcb14587caf7cb1d99229 (patch) | |
tree | 0f4c35b21fb0154d8871f4f39a976a1529b50565 | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) |
drm: add missing drm_mode_set_crtcinfo call
When setting mode via MODE_ID property,
drm_atomic_set_mode_prop_for_crtc() does not call
drm_mode_set_crtcinfo() which possibly causes:
"[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 32: Can't
calculate constants, dotclock = 0!"
Whether the error is seen depends on the previous data in state->mode,
as state->mode is not cleared when setting new mode.
This patch adds drm_mode_set_crtcinfo() call to
drm_mode_convert_umode(), which is called in both legacy and atomic
paths. This should be fine as there's no reason to call
drm_mode_convert_umode() without also setting the crtc related fields.
drm_mode_set_crtcinfo() is removed from the legacy drm_mode_setcrtc() as
that is no longer needed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d2a6d958ca76..06b6e2173697 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -2821,8 +2821,6 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, | |||
2821 | goto out; | 2821 | goto out; |
2822 | } | 2822 | } |
2823 | 2823 | ||
2824 | drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); | ||
2825 | |||
2826 | /* | 2824 | /* |
2827 | * Check whether the primary plane supports the fb pixel format. | 2825 | * Check whether the primary plane supports the fb pixel format. |
2828 | * Drivers not implementing the universal planes API use a | 2826 | * Drivers not implementing the universal planes API use a |
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 7def3d58da18..e5e6f504d8cc 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c | |||
@@ -1518,6 +1518,8 @@ int drm_mode_convert_umode(struct drm_display_mode *out, | |||
1518 | if (out->status != MODE_OK) | 1518 | if (out->status != MODE_OK) |
1519 | goto out; | 1519 | goto out; |
1520 | 1520 | ||
1521 | drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V); | ||
1522 | |||
1521 | ret = 0; | 1523 | ret = 0; |
1522 | 1524 | ||
1523 | out: | 1525 | out: |