diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-10 05:50:39 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-11-02 04:38:28 -0400 |
| commit | aaf7642e98917fc95c260cbee98d2f426754b265 (patch) | |
| tree | 83fcd7dcf32c461b50ab516edf2b3db4fc4781ca /drivers/gpu/drm/omapdrm/omap_plane.c | |
| parent | fb422950c6cd726fd36eb72a7cf84583440a18a2 (diff) | |
drm/omap: fix plane check when crtc is disabled
I sometimes see:
[drm:drm_framebuffer_remove [drm]] *ERROR* failed to reset crtc ed2a6c00
when fb was deleted: -22
which comes from drm_framebuffer_remove() when it's disabling the crtc
with zeroed drm_mode_set.
The problem in omap_plane_atomic_check() is that it will use those
zeroed fields to verify if the setup is correct.
This patch makes omap_plane_atomic_check() return 0 if the crtc is
disabled.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 0ffd5b930ec0..7bd24185f33c 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -164,6 +164,9 @@ static int omap_plane_atomic_check(struct drm_plane *plane, | |||
| 164 | if (IS_ERR(crtc_state)) | 164 | if (IS_ERR(crtc_state)) |
| 165 | return PTR_ERR(crtc_state); | 165 | return PTR_ERR(crtc_state); |
| 166 | 166 | ||
| 167 | if (!crtc_state->enable) | ||
| 168 | return 0; | ||
| 169 | |||
| 167 | if (state->crtc_x < 0 || state->crtc_y < 0) | 170 | if (state->crtc_x < 0 || state->crtc_y < 0) |
| 168 | return -EINVAL; | 171 | return -EINVAL; |
| 169 | 172 | ||
