diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-01-23 19:08:55 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-05 20:35:14 +0200 |
commit | 57270b8191a9d3d15d8c77287733ba1ce5213937 (patch) | |
tree | bd00b8f2064e19341d6597a2b24ddec6482b6f25 /drivers | |
parent | d8eb9de42320a0d02bd12118a8ac51d14bcaf5e1 (diff) |
drm/armada: Construct a temporary crtc state for plane checks
As armada isn't an atomic driver trying to pass a non-populated
crtc->state to drm_atomic_helper_check_plane_state() will end in tears.
Construct a temporary crtc state a la drm_plane_helper_check_update()
and pass that instead. For now we just really need crtc_state->enable
to be there.
Cc: Dave Airlie <airlied@redhat.com>
Cc: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180123170857.13818-3-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/armada/armada_crtc.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/armada/armada_overlay.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index e2adfbef7d6b..9621ed5d3f98 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c @@ -1200,13 +1200,17 @@ static int armada_drm_primary_update(struct drm_plane *plane, .crtc_h = crtc_h, .rotation = DRM_MODE_ROTATE_0, }; + struct drm_crtc_state crtc_state = { + .crtc = crtc, + .enable = crtc->enabled, + }; const struct drm_rect clip = { .x2 = crtc->mode.hdisplay, .y2 = crtc->mode.vdisplay, }; int ret; - ret = drm_atomic_helper_check_plane_state(&state, crtc->state, &clip, 0, + ret = drm_atomic_helper_check_plane_state(&state, &crtc_state, &clip, 0, INT_MAX, true, false); if (ret) return ret; diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index 77b55adaa2ac..825cb642b55e 100644 --- a/drivers/gpu/drm/armada/armada_overlay.c +++ b/drivers/gpu/drm/armada/armada_overlay.c @@ -205,6 +205,10 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, .crtc_h = crtc_h, .rotation = DRM_MODE_ROTATE_0, }; + struct drm_crtc_state crtc_state = { + .crtc = crtc, + .enable = crtc->enabled, + }; const struct drm_rect clip = { .x2 = crtc->mode.hdisplay, .y2 = crtc->mode.vdisplay, @@ -215,7 +219,7 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc, crtc_x, crtc_y, crtc_w, crtc_h, src_x, src_y, src_w, src_h); - ret = drm_atomic_helper_check_plane_state(&state, crtc->state, &clip, 0, + ret = drm_atomic_helper_check_plane_state(&state, &crtc_state, &clip, 0, INT_MAX, true, false); if (ret) return ret; |