diff options
author | Daniel Stone <daniels@collabora.com> | 2015-05-26 15:36:48 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-05-26 15:50:34 +0200 |
commit | 819364da20fd914aba2fd03e95ee0467286752f5 (patch) | |
tree | 4e3cf5c56d47401a57e30389ae88cc82777770b1 /drivers/gpu/drm/drm_crtc_helper.c | |
parent | drm: check for garbage in unused addfb2 fields (diff) | |
download | linux-819364da20fd914aba2fd03e95ee0467286752f5.tar.xz linux-819364da20fd914aba2fd03e95ee0467286752f5.zip |
drm: Add drm_atomic_set_mode_for_crtc
Add a new helper, to be used later for blob property management, that
sets the mode for a CRTC state, as well as updating the CRTC enable/active
state at the same time.
v2: Do not touch active/mode_changed in CRTC state. Document return
value. Remove stray drm_atomic_set_mode_prop_for_crtc declaration.
v3: Remove i915 changes, and leave it directly bashing crtc_state->mode
for the meantime.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 9297a61a7c95..393114df88a3 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -937,10 +937,11 @@ int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mod crtc_state->crtc = crtc; } - crtc_state->enable = true; crtc_state->planes_changed = true; crtc_state->mode_changed = true; - drm_mode_copy(&crtc_state->mode, mode); + ret = drm_atomic_set_mode_for_crtc(crtc_state, mode); + if (ret) + goto out; drm_mode_copy(&crtc_state->adjusted_mode, adjusted_mode); if (crtc_funcs->atomic_check) { |