diff options
| author | 2020-04-16 14:35:16 +0300 | |
|---|---|---|
| committer | 2020-04-16 14:35:16 +0300 | |
| commit | 2b703bbda2713fd2a7d98029ea6c44f9c3159f34 (patch) | |
| tree | 00aabbb35186a4541ccccf89dead04e251d0541d /drivers/gpu/drm/drm_modes.c | |
| parent | drm/i915: HDCP: fix Ri prime check done during link check (diff) | |
| parent | Linux 5.7-rc1 (diff) | |
| download | wireguard-linux-2b703bbda2713fd2a7d98029ea6c44f9c3159f34.tar.xz wireguard-linux-2b703bbda2713fd2a7d98029ea6c44f9c3159f34.zip | |
Merge drm/drm-next into drm-intel-next-queued
Backmerging in order to pull "topic/phy-compliance".
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
| -rw-r--r-- | drivers/gpu/drm/drm_modes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 10336b144c72..d4d64518e11b 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1698,6 +1698,13 @@ static int drm_mode_parse_cmdline_options(const char *str, if (rotation && freestanding) return -EINVAL; + if (!(rotation & DRM_MODE_ROTATE_MASK)) + rotation |= DRM_MODE_ROTATE_0; + + /* Make sure there is exactly one rotation defined */ + if (!is_power_of_2(rotation & DRM_MODE_ROTATE_MASK)) + return -EINVAL; + mode->rotation_reflection = rotation; return 0; |
