diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-10-07 14:43:38 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-10-08 15:26:55 +0200 |
commit | 8f2fd57d834d83fb4f5e0f39a3415bcbe4c1d3b6 (patch) | |
tree | 926936671b3bdeb0819cf3a27c347dbdca0ca7ca /drivers/gpu/drm/solomon | |
parent | dbbf933d365da1a76a540211bee3d57bde520194 (diff) | |
download | lwn-8f2fd57d834d83fb4f5e0f39a3415bcbe4c1d3b6.tar.gz lwn-8f2fd57d834d83fb4f5e0f39a3415bcbe4c1d3b6.zip |
drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state()
Rename the atomic helper function drm_atomic_helper_check_crtc_state()
to drm_atomic_helper_check_crtc_primary_plane() and only check for an
attached primary plane. Adapt callers.
Instead of having one big function to check for various CRTC state
conditions, we rather want smaller functions that drivers can pick
individually.
v5:
* rebase on top of udl changes
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221007124338.24152-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/solomon')
-rw-r--r-- | drivers/gpu/drm/solomon/ssd130x.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index f456b233d2e7..57e48355c008 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -651,10 +651,14 @@ static int ssd130x_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *new_crtc_state = drm_atomic_get_new_crtc_state(new_state, crtc); int ret; - ret = drm_atomic_helper_check_crtc_state(new_crtc_state, false); + if (!new_crtc_state->enable) + goto out; + + ret = drm_atomic_helper_check_crtc_primary_plane(new_crtc_state); if (ret) return ret; +out: return drm_atomic_add_affected_planes(new_state, crtc); } |