Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/modes: Don't apply cmdline's rotation if it wasn't specified

The rotation mode from cmdline shouldn't be taken into account if it
wasn't specified in the cmdline. This fixes ignored default display
orientation when display mode is given using cmdline without the
rotation being specified.

Fixes: 1bf4e09227c3 ("drm/modes: Allow to specify rotation and reflection on the commandline")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711021313.29445-1-digetx@gmail.com

authored by

Dmitry Osipenko and committed by
Maxime Ripard
7aaddd96 7f3bbc0b

+1 -1
+1 -1
drivers/gpu/drm/drm_client_modeset.c
··· 859 859 * simple XOR between the two handle the addition nicely. 860 860 */ 861 861 cmdline = &connector->cmdline_mode; 862 - if (cmdline->specified) { 862 + if (cmdline->specified && cmdline->rotation_reflection) { 863 863 unsigned int cmdline_rest, panel_rest; 864 864 unsigned int cmdline_rot, panel_rot; 865 865 unsigned int sum_rot, sum_rest;