mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 05:10:20 +01:00
check previous mode first
This commit is contained in:
parent
1ba2bb3a7e
commit
8020724615
1 changed files with 4 additions and 2 deletions
|
|
@ -320,9 +320,11 @@ static int intelfb_set_par(struct fb_info *info)
|
|||
drm_mode_attachmode_crtc(dev, par->crtc, par->fb_mode);
|
||||
}
|
||||
|
||||
if (!drm_crtc_set_mode(par->crtc, drm_mode, 0, 0))
|
||||
if (par->crtc->enabled) {
|
||||
if (!drm_mode_equal(&par->crtc->mode, drm_mode))
|
||||
if (!drm_crtc_set_mode(par->crtc, drm_mode, 0, 0))
|
||||
return -EINVAL;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue