Commit 311521e2 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Inki Dae

drm/exynos: fix adjusted_mode pointer in exynos_plane_mode_set

exynos_plane_mode_set should use adjusted_mode from the same atomic state as
plane state. Otherwise it will result in incorrect behavior in case
crtc mode changes.

The patch fixes bug with black console framebuffer in case of command mode
panels.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 55c4b906
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
#include <drm/drmP.h> #include <drm/drmP.h>
#include <drm/exynos_drm.h> #include <drm/drm_atomic.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_plane_helper.h>
#include <drm/exynos_drm.h>
#include "exynos_drm_drv.h" #include "exynos_drm_drv.h"
#include "exynos_drm_crtc.h" #include "exynos_drm_crtc.h"
#include "exynos_drm_fb.h" #include "exynos_drm_fb.h"
...@@ -57,11 +58,12 @@ static int exynos_plane_get_size(int start, unsigned length, unsigned last) ...@@ -57,11 +58,12 @@ static int exynos_plane_get_size(int start, unsigned length, unsigned last)
} }
static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state) static void exynos_plane_mode_set(struct exynos_drm_plane_state *exynos_state)
{ {
struct drm_plane_state *state = &exynos_state->base; struct drm_plane_state *state = &exynos_state->base;
struct drm_crtc *crtc = exynos_state->base.crtc; struct drm_crtc *crtc = state->crtc;
struct drm_display_mode *mode = &crtc->state->adjusted_mode; struct drm_crtc_state *crtc_state =
drm_atomic_get_existing_crtc_state(state->state, crtc);
struct drm_display_mode *mode = &crtc_state->adjusted_mode;
int crtc_x, crtc_y; int crtc_x, crtc_y;
unsigned int crtc_w, crtc_h; unsigned int crtc_w, crtc_h;
unsigned int src_x, src_y; unsigned int src_x, src_y;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment